diff --recursive --unified --new-file --exclude test --exclude Makefile 5.1.0-dev.20230307/lib/README.md 5.1.0-dev.20230308/lib/README.md --- 5.1.0-dev.20230307/lib/README.md 1985-10-26 09:15:00 +++ 5.1.0-dev.20230308/lib/README.md 1970-01-01 01:00:00 @@ -1,5 +0,0 @@ -# Read This! - -**These files are not meant to be edited by hand.** -If you need to make modifications, the respective files should be changed within the repository's top-level `src` directory. -Running `hereby LKG` will then appropriately update the files in this directory. diff --recursive --unified --new-file --exclude test --exclude Makefile 5.1.0-dev.20230307/lib/tsc.js 5.1.0-dev.20230308/lib/tsc.js --- 5.1.0-dev.20230307/lib/tsc.js 1985-10-26 09:15:00 +++ 5.1.0-dev.20230308/lib/tsc.js 1985-10-26 09:15:00 @@ -23,7 +23,7 @@ // src/compiler/corePublic.ts var versionMajorMinor = "5.1"; -var version = `${versionMajorMinor}.0-dev.20230307`; +var version = `${versionMajorMinor}.0-dev.20230308`; // src/compiler/core.ts var emptyArray = []; @@ -3165,304 +3165,305 @@ SyntaxKind4[SyntaxKind4["CaretEqualsToken"] = 78] = "CaretEqualsToken"; SyntaxKind4[SyntaxKind4["Identifier"] = 79] = "Identifier"; SyntaxKind4[SyntaxKind4["PrivateIdentifier"] = 80] = "PrivateIdentifier"; - SyntaxKind4[SyntaxKind4["BreakKeyword"] = 81] = "BreakKeyword"; - SyntaxKind4[SyntaxKind4["CaseKeyword"] = 82] = "CaseKeyword"; - SyntaxKind4[SyntaxKind4["CatchKeyword"] = 83] = "CatchKeyword"; - SyntaxKind4[SyntaxKind4["ClassKeyword"] = 84] = "ClassKeyword"; - SyntaxKind4[SyntaxKind4["ConstKeyword"] = 85] = "ConstKeyword"; - SyntaxKind4[SyntaxKind4["ContinueKeyword"] = 86] = "ContinueKeyword"; - SyntaxKind4[SyntaxKind4["DebuggerKeyword"] = 87] = "DebuggerKeyword"; - SyntaxKind4[SyntaxKind4["DefaultKeyword"] = 88] = "DefaultKeyword"; - SyntaxKind4[SyntaxKind4["DeleteKeyword"] = 89] = "DeleteKeyword"; - SyntaxKind4[SyntaxKind4["DoKeyword"] = 90] = "DoKeyword"; - SyntaxKind4[SyntaxKind4["ElseKeyword"] = 91] = "ElseKeyword"; - SyntaxKind4[SyntaxKind4["EnumKeyword"] = 92] = "EnumKeyword"; - SyntaxKind4[SyntaxKind4["ExportKeyword"] = 93] = "ExportKeyword"; - SyntaxKind4[SyntaxKind4["ExtendsKeyword"] = 94] = "ExtendsKeyword"; - SyntaxKind4[SyntaxKind4["FalseKeyword"] = 95] = "FalseKeyword"; - SyntaxKind4[SyntaxKind4["FinallyKeyword"] = 96] = "FinallyKeyword"; - SyntaxKind4[SyntaxKind4["ForKeyword"] = 97] = "ForKeyword"; - SyntaxKind4[SyntaxKind4["FunctionKeyword"] = 98] = "FunctionKeyword"; - SyntaxKind4[SyntaxKind4["IfKeyword"] = 99] = "IfKeyword"; - SyntaxKind4[SyntaxKind4["ImportKeyword"] = 100] = "ImportKeyword"; - SyntaxKind4[SyntaxKind4["InKeyword"] = 101] = "InKeyword"; - SyntaxKind4[SyntaxKind4["InstanceOfKeyword"] = 102] = "InstanceOfKeyword"; - SyntaxKind4[SyntaxKind4["NewKeyword"] = 103] = "NewKeyword"; - SyntaxKind4[SyntaxKind4["NullKeyword"] = 104] = "NullKeyword"; - SyntaxKind4[SyntaxKind4["ReturnKeyword"] = 105] = "ReturnKeyword"; - SyntaxKind4[SyntaxKind4["SuperKeyword"] = 106] = "SuperKeyword"; - SyntaxKind4[SyntaxKind4["SwitchKeyword"] = 107] = "SwitchKeyword"; - SyntaxKind4[SyntaxKind4["ThisKeyword"] = 108] = "ThisKeyword"; - SyntaxKind4[SyntaxKind4["ThrowKeyword"] = 109] = "ThrowKeyword"; - SyntaxKind4[SyntaxKind4["TrueKeyword"] = 110] = "TrueKeyword"; - SyntaxKind4[SyntaxKind4["TryKeyword"] = 111] = "TryKeyword"; - SyntaxKind4[SyntaxKind4["TypeOfKeyword"] = 112] = "TypeOfKeyword"; - SyntaxKind4[SyntaxKind4["VarKeyword"] = 113] = "VarKeyword"; - SyntaxKind4[SyntaxKind4["VoidKeyword"] = 114] = "VoidKeyword"; - SyntaxKind4[SyntaxKind4["WhileKeyword"] = 115] = "WhileKeyword"; - SyntaxKind4[SyntaxKind4["WithKeyword"] = 116] = "WithKeyword"; - SyntaxKind4[SyntaxKind4["ImplementsKeyword"] = 117] = "ImplementsKeyword"; - SyntaxKind4[SyntaxKind4["InterfaceKeyword"] = 118] = "InterfaceKeyword"; - SyntaxKind4[SyntaxKind4["LetKeyword"] = 119] = "LetKeyword"; - SyntaxKind4[SyntaxKind4["PackageKeyword"] = 120] = "PackageKeyword"; - SyntaxKind4[SyntaxKind4["PrivateKeyword"] = 121] = "PrivateKeyword"; - SyntaxKind4[SyntaxKind4["ProtectedKeyword"] = 122] = "ProtectedKeyword"; - SyntaxKind4[SyntaxKind4["PublicKeyword"] = 123] = "PublicKeyword"; - SyntaxKind4[SyntaxKind4["StaticKeyword"] = 124] = "StaticKeyword"; - SyntaxKind4[SyntaxKind4["YieldKeyword"] = 125] = "YieldKeyword"; - SyntaxKind4[SyntaxKind4["AbstractKeyword"] = 126] = "AbstractKeyword"; - SyntaxKind4[SyntaxKind4["AccessorKeyword"] = 127] = "AccessorKeyword"; - SyntaxKind4[SyntaxKind4["AsKeyword"] = 128] = "AsKeyword"; - SyntaxKind4[SyntaxKind4["AssertsKeyword"] = 129] = "AssertsKeyword"; - SyntaxKind4[SyntaxKind4["AssertKeyword"] = 130] = "AssertKeyword"; - SyntaxKind4[SyntaxKind4["AnyKeyword"] = 131] = "AnyKeyword"; - SyntaxKind4[SyntaxKind4["AsyncKeyword"] = 132] = "AsyncKeyword"; - SyntaxKind4[SyntaxKind4["AwaitKeyword"] = 133] = "AwaitKeyword"; - SyntaxKind4[SyntaxKind4["BooleanKeyword"] = 134] = "BooleanKeyword"; - SyntaxKind4[SyntaxKind4["ConstructorKeyword"] = 135] = "ConstructorKeyword"; - SyntaxKind4[SyntaxKind4["DeclareKeyword"] = 136] = "DeclareKeyword"; - SyntaxKind4[SyntaxKind4["GetKeyword"] = 137] = "GetKeyword"; - SyntaxKind4[SyntaxKind4["InferKeyword"] = 138] = "InferKeyword"; - SyntaxKind4[SyntaxKind4["IntrinsicKeyword"] = 139] = "IntrinsicKeyword"; - SyntaxKind4[SyntaxKind4["IsKeyword"] = 140] = "IsKeyword"; - SyntaxKind4[SyntaxKind4["KeyOfKeyword"] = 141] = "KeyOfKeyword"; - SyntaxKind4[SyntaxKind4["ModuleKeyword"] = 142] = "ModuleKeyword"; - SyntaxKind4[SyntaxKind4["NamespaceKeyword"] = 143] = "NamespaceKeyword"; - SyntaxKind4[SyntaxKind4["NeverKeyword"] = 144] = "NeverKeyword"; - SyntaxKind4[SyntaxKind4["OutKeyword"] = 145] = "OutKeyword"; - SyntaxKind4[SyntaxKind4["ReadonlyKeyword"] = 146] = "ReadonlyKeyword"; - SyntaxKind4[SyntaxKind4["RequireKeyword"] = 147] = "RequireKeyword"; - SyntaxKind4[SyntaxKind4["NumberKeyword"] = 148] = "NumberKeyword"; - SyntaxKind4[SyntaxKind4["ObjectKeyword"] = 149] = "ObjectKeyword"; - SyntaxKind4[SyntaxKind4["SatisfiesKeyword"] = 150] = "SatisfiesKeyword"; - SyntaxKind4[SyntaxKind4["SetKeyword"] = 151] = "SetKeyword"; - SyntaxKind4[SyntaxKind4["StringKeyword"] = 152] = "StringKeyword"; - SyntaxKind4[SyntaxKind4["SymbolKeyword"] = 153] = "SymbolKeyword"; - SyntaxKind4[SyntaxKind4["TypeKeyword"] = 154] = "TypeKeyword"; - SyntaxKind4[SyntaxKind4["UndefinedKeyword"] = 155] = "UndefinedKeyword"; - SyntaxKind4[SyntaxKind4["UniqueKeyword"] = 156] = "UniqueKeyword"; - SyntaxKind4[SyntaxKind4["UnknownKeyword"] = 157] = "UnknownKeyword"; - SyntaxKind4[SyntaxKind4["FromKeyword"] = 158] = "FromKeyword"; - SyntaxKind4[SyntaxKind4["GlobalKeyword"] = 159] = "GlobalKeyword"; - SyntaxKind4[SyntaxKind4["BigIntKeyword"] = 160] = "BigIntKeyword"; - SyntaxKind4[SyntaxKind4["OverrideKeyword"] = 161] = "OverrideKeyword"; - SyntaxKind4[SyntaxKind4["OfKeyword"] = 162] = "OfKeyword"; - SyntaxKind4[SyntaxKind4["QualifiedName"] = 163] = "QualifiedName"; - SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 164] = "ComputedPropertyName"; - SyntaxKind4[SyntaxKind4["TypeParameter"] = 165] = "TypeParameter"; - SyntaxKind4[SyntaxKind4["Parameter"] = 166] = "Parameter"; - SyntaxKind4[SyntaxKind4["Decorator"] = 167] = "Decorator"; - SyntaxKind4[SyntaxKind4["PropertySignature"] = 168] = "PropertySignature"; - SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 169] = "PropertyDeclaration"; - SyntaxKind4[SyntaxKind4["MethodSignature"] = 170] = "MethodSignature"; - SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 171] = "MethodDeclaration"; - SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 172] = "ClassStaticBlockDeclaration"; - SyntaxKind4[SyntaxKind4["Constructor"] = 173] = "Constructor"; - SyntaxKind4[SyntaxKind4["GetAccessor"] = 174] = "GetAccessor"; - SyntaxKind4[SyntaxKind4["SetAccessor"] = 175] = "SetAccessor"; - SyntaxKind4[SyntaxKind4["CallSignature"] = 176] = "CallSignature"; - SyntaxKind4[SyntaxKind4["ConstructSignature"] = 177] = "ConstructSignature"; - SyntaxKind4[SyntaxKind4["IndexSignature"] = 178] = "IndexSignature"; - SyntaxKind4[SyntaxKind4["TypePredicate"] = 179] = "TypePredicate"; - SyntaxKind4[SyntaxKind4["TypeReference"] = 180] = "TypeReference"; - SyntaxKind4[SyntaxKind4["FunctionType"] = 181] = "FunctionType"; - SyntaxKind4[SyntaxKind4["ConstructorType"] = 182] = "ConstructorType"; - SyntaxKind4[SyntaxKind4["TypeQuery"] = 183] = "TypeQuery"; - SyntaxKind4[SyntaxKind4["TypeLiteral"] = 184] = "TypeLiteral"; - SyntaxKind4[SyntaxKind4["ArrayType"] = 185] = "ArrayType"; - SyntaxKind4[SyntaxKind4["TupleType"] = 186] = "TupleType"; - SyntaxKind4[SyntaxKind4["OptionalType"] = 187] = "OptionalType"; - SyntaxKind4[SyntaxKind4["RestType"] = 188] = "RestType"; - SyntaxKind4[SyntaxKind4["UnionType"] = 189] = "UnionType"; - SyntaxKind4[SyntaxKind4["IntersectionType"] = 190] = "IntersectionType"; - SyntaxKind4[SyntaxKind4["ConditionalType"] = 191] = "ConditionalType"; - SyntaxKind4[SyntaxKind4["InferType"] = 192] = "InferType"; - SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 193] = "ParenthesizedType"; - SyntaxKind4[SyntaxKind4["ThisType"] = 194] = "ThisType"; - SyntaxKind4[SyntaxKind4["TypeOperator"] = 195] = "TypeOperator"; - SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 196] = "IndexedAccessType"; - SyntaxKind4[SyntaxKind4["MappedType"] = 197] = "MappedType"; - SyntaxKind4[SyntaxKind4["LiteralType"] = 198] = "LiteralType"; - SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 199] = "NamedTupleMember"; - SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 200] = "TemplateLiteralType"; - SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 201] = "TemplateLiteralTypeSpan"; - SyntaxKind4[SyntaxKind4["ImportType"] = 202] = "ImportType"; - SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 203] = "ObjectBindingPattern"; - SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 204] = "ArrayBindingPattern"; - SyntaxKind4[SyntaxKind4["BindingElement"] = 205] = "BindingElement"; - SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 206] = "ArrayLiteralExpression"; - SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 207] = "ObjectLiteralExpression"; - SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 208] = "PropertyAccessExpression"; - SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 209] = "ElementAccessExpression"; - SyntaxKind4[SyntaxKind4["CallExpression"] = 210] = "CallExpression"; - SyntaxKind4[SyntaxKind4["NewExpression"] = 211] = "NewExpression"; - SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 212] = "TaggedTemplateExpression"; - SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 213] = "TypeAssertionExpression"; - SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 214] = "ParenthesizedExpression"; - SyntaxKind4[SyntaxKind4["FunctionExpression"] = 215] = "FunctionExpression"; - SyntaxKind4[SyntaxKind4["ArrowFunction"] = 216] = "ArrowFunction"; - SyntaxKind4[SyntaxKind4["DeleteExpression"] = 217] = "DeleteExpression"; - SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 218] = "TypeOfExpression"; - SyntaxKind4[SyntaxKind4["VoidExpression"] = 219] = "VoidExpression"; - SyntaxKind4[SyntaxKind4["AwaitExpression"] = 220] = "AwaitExpression"; - SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 221] = "PrefixUnaryExpression"; - SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 222] = "PostfixUnaryExpression"; - SyntaxKind4[SyntaxKind4["BinaryExpression"] = 223] = "BinaryExpression"; - SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 224] = "ConditionalExpression"; - SyntaxKind4[SyntaxKind4["TemplateExpression"] = 225] = "TemplateExpression"; - SyntaxKind4[SyntaxKind4["YieldExpression"] = 226] = "YieldExpression"; - SyntaxKind4[SyntaxKind4["SpreadElement"] = 227] = "SpreadElement"; - SyntaxKind4[SyntaxKind4["ClassExpression"] = 228] = "ClassExpression"; - SyntaxKind4[SyntaxKind4["OmittedExpression"] = 229] = "OmittedExpression"; - SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 230] = "ExpressionWithTypeArguments"; - SyntaxKind4[SyntaxKind4["AsExpression"] = 231] = "AsExpression"; - SyntaxKind4[SyntaxKind4["NonNullExpression"] = 232] = "NonNullExpression"; - SyntaxKind4[SyntaxKind4["MetaProperty"] = 233] = "MetaProperty"; - SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 234] = "SyntheticExpression"; - SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 235] = "SatisfiesExpression"; - SyntaxKind4[SyntaxKind4["TemplateSpan"] = 236] = "TemplateSpan"; - SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 237] = "SemicolonClassElement"; - SyntaxKind4[SyntaxKind4["Block"] = 238] = "Block"; - SyntaxKind4[SyntaxKind4["EmptyStatement"] = 239] = "EmptyStatement"; - SyntaxKind4[SyntaxKind4["VariableStatement"] = 240] = "VariableStatement"; - SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 241] = "ExpressionStatement"; - SyntaxKind4[SyntaxKind4["IfStatement"] = 242] = "IfStatement"; - SyntaxKind4[SyntaxKind4["DoStatement"] = 243] = "DoStatement"; - SyntaxKind4[SyntaxKind4["WhileStatement"] = 244] = "WhileStatement"; - SyntaxKind4[SyntaxKind4["ForStatement"] = 245] = "ForStatement"; - SyntaxKind4[SyntaxKind4["ForInStatement"] = 246] = "ForInStatement"; - SyntaxKind4[SyntaxKind4["ForOfStatement"] = 247] = "ForOfStatement"; - SyntaxKind4[SyntaxKind4["ContinueStatement"] = 248] = "ContinueStatement"; - SyntaxKind4[SyntaxKind4["BreakStatement"] = 249] = "BreakStatement"; - SyntaxKind4[SyntaxKind4["ReturnStatement"] = 250] = "ReturnStatement"; - SyntaxKind4[SyntaxKind4["WithStatement"] = 251] = "WithStatement"; - SyntaxKind4[SyntaxKind4["SwitchStatement"] = 252] = "SwitchStatement"; - SyntaxKind4[SyntaxKind4["LabeledStatement"] = 253] = "LabeledStatement"; - SyntaxKind4[SyntaxKind4["ThrowStatement"] = 254] = "ThrowStatement"; - SyntaxKind4[SyntaxKind4["TryStatement"] = 255] = "TryStatement"; - SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 256] = "DebuggerStatement"; - SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 257] = "VariableDeclaration"; - SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 258] = "VariableDeclarationList"; - SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 259] = "FunctionDeclaration"; - SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 260] = "ClassDeclaration"; - SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 261] = "InterfaceDeclaration"; - SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 262] = "TypeAliasDeclaration"; - SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 263] = "EnumDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 264] = "ModuleDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleBlock"] = 265] = "ModuleBlock"; - SyntaxKind4[SyntaxKind4["CaseBlock"] = 266] = "CaseBlock"; - SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 267] = "NamespaceExportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 268] = "ImportEqualsDeclaration"; - SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 269] = "ImportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportClause"] = 270] = "ImportClause"; - SyntaxKind4[SyntaxKind4["NamespaceImport"] = 271] = "NamespaceImport"; - SyntaxKind4[SyntaxKind4["NamedImports"] = 272] = "NamedImports"; - SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 273] = "ImportSpecifier"; - SyntaxKind4[SyntaxKind4["ExportAssignment"] = 274] = "ExportAssignment"; - SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 275] = "ExportDeclaration"; - SyntaxKind4[SyntaxKind4["NamedExports"] = 276] = "NamedExports"; - SyntaxKind4[SyntaxKind4["NamespaceExport"] = 277] = "NamespaceExport"; - SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 278] = "ExportSpecifier"; - SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 279] = "MissingDeclaration"; - SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 280] = "ExternalModuleReference"; - SyntaxKind4[SyntaxKind4["JsxElement"] = 281] = "JsxElement"; - SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 282] = "JsxSelfClosingElement"; - SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 283] = "JsxOpeningElement"; - SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 284] = "JsxClosingElement"; - SyntaxKind4[SyntaxKind4["JsxFragment"] = 285] = "JsxFragment"; - SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 286] = "JsxOpeningFragment"; - SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 287] = "JsxClosingFragment"; - SyntaxKind4[SyntaxKind4["JsxAttribute"] = 288] = "JsxAttribute"; - SyntaxKind4[SyntaxKind4["JsxAttributes"] = 289] = "JsxAttributes"; - SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 290] = "JsxSpreadAttribute"; - SyntaxKind4[SyntaxKind4["JsxExpression"] = 291] = "JsxExpression"; - SyntaxKind4[SyntaxKind4["CaseClause"] = 292] = "CaseClause"; - SyntaxKind4[SyntaxKind4["DefaultClause"] = 293] = "DefaultClause"; - SyntaxKind4[SyntaxKind4["HeritageClause"] = 294] = "HeritageClause"; - SyntaxKind4[SyntaxKind4["CatchClause"] = 295] = "CatchClause"; - SyntaxKind4[SyntaxKind4["AssertClause"] = 296] = "AssertClause"; - SyntaxKind4[SyntaxKind4["AssertEntry"] = 297] = "AssertEntry"; - SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 298] = "ImportTypeAssertionContainer"; - SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 299] = "PropertyAssignment"; - SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 300] = "ShorthandPropertyAssignment"; - SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 301] = "SpreadAssignment"; - SyntaxKind4[SyntaxKind4["EnumMember"] = 302] = "EnumMember"; - SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 303] = "UnparsedPrologue"; - SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 304] = "UnparsedPrepend"; - SyntaxKind4[SyntaxKind4["UnparsedText"] = 305] = "UnparsedText"; - SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 306] = "UnparsedInternalText"; - SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 307] = "UnparsedSyntheticReference"; - SyntaxKind4[SyntaxKind4["SourceFile"] = 308] = "SourceFile"; - SyntaxKind4[SyntaxKind4["Bundle"] = 309] = "Bundle"; - SyntaxKind4[SyntaxKind4["UnparsedSource"] = 310] = "UnparsedSource"; - SyntaxKind4[SyntaxKind4["InputFiles"] = 311] = "InputFiles"; - SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 312] = "JSDocTypeExpression"; - SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 313] = "JSDocNameReference"; - SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 314] = "JSDocMemberName"; - SyntaxKind4[SyntaxKind4["JSDocAllType"] = 315] = "JSDocAllType"; - SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 316] = "JSDocUnknownType"; - SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 317] = "JSDocNullableType"; - SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 318] = "JSDocNonNullableType"; - SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 319] = "JSDocOptionalType"; - SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 320] = "JSDocFunctionType"; - SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 321] = "JSDocVariadicType"; - SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 322] = "JSDocNamepathType"; - SyntaxKind4[SyntaxKind4["JSDoc"] = 323] = "JSDoc"; - SyntaxKind4[SyntaxKind4["JSDocComment"] = 323 /* JSDoc */] = "JSDocComment"; - SyntaxKind4[SyntaxKind4["JSDocText"] = 324] = "JSDocText"; - SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 325] = "JSDocTypeLiteral"; - SyntaxKind4[SyntaxKind4["JSDocSignature"] = 326] = "JSDocSignature"; - SyntaxKind4[SyntaxKind4["JSDocLink"] = 327] = "JSDocLink"; - SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 328] = "JSDocLinkCode"; - SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 329] = "JSDocLinkPlain"; - SyntaxKind4[SyntaxKind4["JSDocTag"] = 330] = "JSDocTag"; - SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 331] = "JSDocAugmentsTag"; - SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 332] = "JSDocImplementsTag"; - SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 333] = "JSDocAuthorTag"; - SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 334] = "JSDocDeprecatedTag"; - SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 335] = "JSDocClassTag"; - SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 336] = "JSDocPublicTag"; - SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 337] = "JSDocPrivateTag"; - SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 338] = "JSDocProtectedTag"; - SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 339] = "JSDocReadonlyTag"; - SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 340] = "JSDocOverrideTag"; - SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 341] = "JSDocCallbackTag"; - SyntaxKind4[SyntaxKind4["JSDocOverloadTag"] = 342] = "JSDocOverloadTag"; - SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 343] = "JSDocEnumTag"; - SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 344] = "JSDocParameterTag"; - SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 345] = "JSDocReturnTag"; - SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 346] = "JSDocThisTag"; - SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 347] = "JSDocTypeTag"; - SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 348] = "JSDocTemplateTag"; - SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 349] = "JSDocTypedefTag"; - SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 350] = "JSDocSeeTag"; - SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 351] = "JSDocPropertyTag"; - SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 352] = "JSDocThrowsTag"; - SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag"; - SyntaxKind4[SyntaxKind4["SyntaxList"] = 354] = "SyntaxList"; - SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 355] = "NotEmittedStatement"; - SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression"; - SyntaxKind4[SyntaxKind4["CommaListExpression"] = 357] = "CommaListExpression"; - SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker"; - SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker"; - SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression"; - SyntaxKind4[SyntaxKind4["Count"] = 361] = "Count"; + SyntaxKind4[SyntaxKind4["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken"; + SyntaxKind4[SyntaxKind4["BreakKeyword"] = 82] = "BreakKeyword"; + SyntaxKind4[SyntaxKind4["CaseKeyword"] = 83] = "CaseKeyword"; + SyntaxKind4[SyntaxKind4["CatchKeyword"] = 84] = "CatchKeyword"; + SyntaxKind4[SyntaxKind4["ClassKeyword"] = 85] = "ClassKeyword"; + SyntaxKind4[SyntaxKind4["ConstKeyword"] = 86] = "ConstKeyword"; + SyntaxKind4[SyntaxKind4["ContinueKeyword"] = 87] = "ContinueKeyword"; + SyntaxKind4[SyntaxKind4["DebuggerKeyword"] = 88] = "DebuggerKeyword"; + SyntaxKind4[SyntaxKind4["DefaultKeyword"] = 89] = "DefaultKeyword"; + SyntaxKind4[SyntaxKind4["DeleteKeyword"] = 90] = "DeleteKeyword"; + SyntaxKind4[SyntaxKind4["DoKeyword"] = 91] = "DoKeyword"; + SyntaxKind4[SyntaxKind4["ElseKeyword"] = 92] = "ElseKeyword"; + SyntaxKind4[SyntaxKind4["EnumKeyword"] = 93] = "EnumKeyword"; + SyntaxKind4[SyntaxKind4["ExportKeyword"] = 94] = "ExportKeyword"; + SyntaxKind4[SyntaxKind4["ExtendsKeyword"] = 95] = "ExtendsKeyword"; + SyntaxKind4[SyntaxKind4["FalseKeyword"] = 96] = "FalseKeyword"; + SyntaxKind4[SyntaxKind4["FinallyKeyword"] = 97] = "FinallyKeyword"; + SyntaxKind4[SyntaxKind4["ForKeyword"] = 98] = "ForKeyword"; + SyntaxKind4[SyntaxKind4["FunctionKeyword"] = 99] = "FunctionKeyword"; + SyntaxKind4[SyntaxKind4["IfKeyword"] = 100] = "IfKeyword"; + SyntaxKind4[SyntaxKind4["ImportKeyword"] = 101] = "ImportKeyword"; + SyntaxKind4[SyntaxKind4["InKeyword"] = 102] = "InKeyword"; + SyntaxKind4[SyntaxKind4["InstanceOfKeyword"] = 103] = "InstanceOfKeyword"; + SyntaxKind4[SyntaxKind4["NewKeyword"] = 104] = "NewKeyword"; + SyntaxKind4[SyntaxKind4["NullKeyword"] = 105] = "NullKeyword"; + SyntaxKind4[SyntaxKind4["ReturnKeyword"] = 106] = "ReturnKeyword"; + SyntaxKind4[SyntaxKind4["SuperKeyword"] = 107] = "SuperKeyword"; + SyntaxKind4[SyntaxKind4["SwitchKeyword"] = 108] = "SwitchKeyword"; + SyntaxKind4[SyntaxKind4["ThisKeyword"] = 109] = "ThisKeyword"; + SyntaxKind4[SyntaxKind4["ThrowKeyword"] = 110] = "ThrowKeyword"; + SyntaxKind4[SyntaxKind4["TrueKeyword"] = 111] = "TrueKeyword"; + SyntaxKind4[SyntaxKind4["TryKeyword"] = 112] = "TryKeyword"; + SyntaxKind4[SyntaxKind4["TypeOfKeyword"] = 113] = "TypeOfKeyword"; + SyntaxKind4[SyntaxKind4["VarKeyword"] = 114] = "VarKeyword"; + SyntaxKind4[SyntaxKind4["VoidKeyword"] = 115] = "VoidKeyword"; + SyntaxKind4[SyntaxKind4["WhileKeyword"] = 116] = "WhileKeyword"; + SyntaxKind4[SyntaxKind4["WithKeyword"] = 117] = "WithKeyword"; + SyntaxKind4[SyntaxKind4["ImplementsKeyword"] = 118] = "ImplementsKeyword"; + SyntaxKind4[SyntaxKind4["InterfaceKeyword"] = 119] = "InterfaceKeyword"; + SyntaxKind4[SyntaxKind4["LetKeyword"] = 120] = "LetKeyword"; + SyntaxKind4[SyntaxKind4["PackageKeyword"] = 121] = "PackageKeyword"; + SyntaxKind4[SyntaxKind4["PrivateKeyword"] = 122] = "PrivateKeyword"; + SyntaxKind4[SyntaxKind4["ProtectedKeyword"] = 123] = "ProtectedKeyword"; + SyntaxKind4[SyntaxKind4["PublicKeyword"] = 124] = "PublicKeyword"; + SyntaxKind4[SyntaxKind4["StaticKeyword"] = 125] = "StaticKeyword"; + SyntaxKind4[SyntaxKind4["YieldKeyword"] = 126] = "YieldKeyword"; + SyntaxKind4[SyntaxKind4["AbstractKeyword"] = 127] = "AbstractKeyword"; + SyntaxKind4[SyntaxKind4["AccessorKeyword"] = 128] = "AccessorKeyword"; + SyntaxKind4[SyntaxKind4["AsKeyword"] = 129] = "AsKeyword"; + SyntaxKind4[SyntaxKind4["AssertsKeyword"] = 130] = "AssertsKeyword"; + SyntaxKind4[SyntaxKind4["AssertKeyword"] = 131] = "AssertKeyword"; + SyntaxKind4[SyntaxKind4["AnyKeyword"] = 132] = "AnyKeyword"; + SyntaxKind4[SyntaxKind4["AsyncKeyword"] = 133] = "AsyncKeyword"; + SyntaxKind4[SyntaxKind4["AwaitKeyword"] = 134] = "AwaitKeyword"; + SyntaxKind4[SyntaxKind4["BooleanKeyword"] = 135] = "BooleanKeyword"; + SyntaxKind4[SyntaxKind4["ConstructorKeyword"] = 136] = "ConstructorKeyword"; + SyntaxKind4[SyntaxKind4["DeclareKeyword"] = 137] = "DeclareKeyword"; + SyntaxKind4[SyntaxKind4["GetKeyword"] = 138] = "GetKeyword"; + SyntaxKind4[SyntaxKind4["InferKeyword"] = 139] = "InferKeyword"; + SyntaxKind4[SyntaxKind4["IntrinsicKeyword"] = 140] = "IntrinsicKeyword"; + SyntaxKind4[SyntaxKind4["IsKeyword"] = 141] = "IsKeyword"; + SyntaxKind4[SyntaxKind4["KeyOfKeyword"] = 142] = "KeyOfKeyword"; + SyntaxKind4[SyntaxKind4["ModuleKeyword"] = 143] = "ModuleKeyword"; + SyntaxKind4[SyntaxKind4["NamespaceKeyword"] = 144] = "NamespaceKeyword"; + SyntaxKind4[SyntaxKind4["NeverKeyword"] = 145] = "NeverKeyword"; + SyntaxKind4[SyntaxKind4["OutKeyword"] = 146] = "OutKeyword"; + SyntaxKind4[SyntaxKind4["ReadonlyKeyword"] = 147] = "ReadonlyKeyword"; + SyntaxKind4[SyntaxKind4["RequireKeyword"] = 148] = "RequireKeyword"; + SyntaxKind4[SyntaxKind4["NumberKeyword"] = 149] = "NumberKeyword"; + SyntaxKind4[SyntaxKind4["ObjectKeyword"] = 150] = "ObjectKeyword"; + SyntaxKind4[SyntaxKind4["SatisfiesKeyword"] = 151] = "SatisfiesKeyword"; + SyntaxKind4[SyntaxKind4["SetKeyword"] = 152] = "SetKeyword"; + SyntaxKind4[SyntaxKind4["StringKeyword"] = 153] = "StringKeyword"; + SyntaxKind4[SyntaxKind4["SymbolKeyword"] = 154] = "SymbolKeyword"; + SyntaxKind4[SyntaxKind4["TypeKeyword"] = 155] = "TypeKeyword"; + SyntaxKind4[SyntaxKind4["UndefinedKeyword"] = 156] = "UndefinedKeyword"; + SyntaxKind4[SyntaxKind4["UniqueKeyword"] = 157] = "UniqueKeyword"; + SyntaxKind4[SyntaxKind4["UnknownKeyword"] = 158] = "UnknownKeyword"; + SyntaxKind4[SyntaxKind4["FromKeyword"] = 159] = "FromKeyword"; + SyntaxKind4[SyntaxKind4["GlobalKeyword"] = 160] = "GlobalKeyword"; + SyntaxKind4[SyntaxKind4["BigIntKeyword"] = 161] = "BigIntKeyword"; + SyntaxKind4[SyntaxKind4["OverrideKeyword"] = 162] = "OverrideKeyword"; + SyntaxKind4[SyntaxKind4["OfKeyword"] = 163] = "OfKeyword"; + SyntaxKind4[SyntaxKind4["QualifiedName"] = 164] = "QualifiedName"; + SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 165] = "ComputedPropertyName"; + SyntaxKind4[SyntaxKind4["TypeParameter"] = 166] = "TypeParameter"; + SyntaxKind4[SyntaxKind4["Parameter"] = 167] = "Parameter"; + SyntaxKind4[SyntaxKind4["Decorator"] = 168] = "Decorator"; + SyntaxKind4[SyntaxKind4["PropertySignature"] = 169] = "PropertySignature"; + SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 170] = "PropertyDeclaration"; + SyntaxKind4[SyntaxKind4["MethodSignature"] = 171] = "MethodSignature"; + SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 172] = "MethodDeclaration"; + SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 173] = "ClassStaticBlockDeclaration"; + SyntaxKind4[SyntaxKind4["Constructor"] = 174] = "Constructor"; + SyntaxKind4[SyntaxKind4["GetAccessor"] = 175] = "GetAccessor"; + SyntaxKind4[SyntaxKind4["SetAccessor"] = 176] = "SetAccessor"; + SyntaxKind4[SyntaxKind4["CallSignature"] = 177] = "CallSignature"; + SyntaxKind4[SyntaxKind4["ConstructSignature"] = 178] = "ConstructSignature"; + SyntaxKind4[SyntaxKind4["IndexSignature"] = 179] = "IndexSignature"; + SyntaxKind4[SyntaxKind4["TypePredicate"] = 180] = "TypePredicate"; + SyntaxKind4[SyntaxKind4["TypeReference"] = 181] = "TypeReference"; + SyntaxKind4[SyntaxKind4["FunctionType"] = 182] = "FunctionType"; + SyntaxKind4[SyntaxKind4["ConstructorType"] = 183] = "ConstructorType"; + SyntaxKind4[SyntaxKind4["TypeQuery"] = 184] = "TypeQuery"; + SyntaxKind4[SyntaxKind4["TypeLiteral"] = 185] = "TypeLiteral"; + SyntaxKind4[SyntaxKind4["ArrayType"] = 186] = "ArrayType"; + SyntaxKind4[SyntaxKind4["TupleType"] = 187] = "TupleType"; + SyntaxKind4[SyntaxKind4["OptionalType"] = 188] = "OptionalType"; + SyntaxKind4[SyntaxKind4["RestType"] = 189] = "RestType"; + SyntaxKind4[SyntaxKind4["UnionType"] = 190] = "UnionType"; + SyntaxKind4[SyntaxKind4["IntersectionType"] = 191] = "IntersectionType"; + SyntaxKind4[SyntaxKind4["ConditionalType"] = 192] = "ConditionalType"; + SyntaxKind4[SyntaxKind4["InferType"] = 193] = "InferType"; + SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 194] = "ParenthesizedType"; + SyntaxKind4[SyntaxKind4["ThisType"] = 195] = "ThisType"; + SyntaxKind4[SyntaxKind4["TypeOperator"] = 196] = "TypeOperator"; + SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 197] = "IndexedAccessType"; + SyntaxKind4[SyntaxKind4["MappedType"] = 198] = "MappedType"; + SyntaxKind4[SyntaxKind4["LiteralType"] = 199] = "LiteralType"; + SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 200] = "NamedTupleMember"; + SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 201] = "TemplateLiteralType"; + SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 202] = "TemplateLiteralTypeSpan"; + SyntaxKind4[SyntaxKind4["ImportType"] = 203] = "ImportType"; + SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 204] = "ObjectBindingPattern"; + SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 205] = "ArrayBindingPattern"; + SyntaxKind4[SyntaxKind4["BindingElement"] = 206] = "BindingElement"; + SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 207] = "ArrayLiteralExpression"; + SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 208] = "ObjectLiteralExpression"; + SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 209] = "PropertyAccessExpression"; + SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 210] = "ElementAccessExpression"; + SyntaxKind4[SyntaxKind4["CallExpression"] = 211] = "CallExpression"; + SyntaxKind4[SyntaxKind4["NewExpression"] = 212] = "NewExpression"; + SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 213] = "TaggedTemplateExpression"; + SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 214] = "TypeAssertionExpression"; + SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 215] = "ParenthesizedExpression"; + SyntaxKind4[SyntaxKind4["FunctionExpression"] = 216] = "FunctionExpression"; + SyntaxKind4[SyntaxKind4["ArrowFunction"] = 217] = "ArrowFunction"; + SyntaxKind4[SyntaxKind4["DeleteExpression"] = 218] = "DeleteExpression"; + SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 219] = "TypeOfExpression"; + SyntaxKind4[SyntaxKind4["VoidExpression"] = 220] = "VoidExpression"; + SyntaxKind4[SyntaxKind4["AwaitExpression"] = 221] = "AwaitExpression"; + SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 222] = "PrefixUnaryExpression"; + SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 223] = "PostfixUnaryExpression"; + SyntaxKind4[SyntaxKind4["BinaryExpression"] = 224] = "BinaryExpression"; + SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 225] = "ConditionalExpression"; + SyntaxKind4[SyntaxKind4["TemplateExpression"] = 226] = "TemplateExpression"; + SyntaxKind4[SyntaxKind4["YieldExpression"] = 227] = "YieldExpression"; + SyntaxKind4[SyntaxKind4["SpreadElement"] = 228] = "SpreadElement"; + SyntaxKind4[SyntaxKind4["ClassExpression"] = 229] = "ClassExpression"; + SyntaxKind4[SyntaxKind4["OmittedExpression"] = 230] = "OmittedExpression"; + SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 231] = "ExpressionWithTypeArguments"; + SyntaxKind4[SyntaxKind4["AsExpression"] = 232] = "AsExpression"; + SyntaxKind4[SyntaxKind4["NonNullExpression"] = 233] = "NonNullExpression"; + SyntaxKind4[SyntaxKind4["MetaProperty"] = 234] = "MetaProperty"; + SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 235] = "SyntheticExpression"; + SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 236] = "SatisfiesExpression"; + SyntaxKind4[SyntaxKind4["TemplateSpan"] = 237] = "TemplateSpan"; + SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 238] = "SemicolonClassElement"; + SyntaxKind4[SyntaxKind4["Block"] = 239] = "Block"; + SyntaxKind4[SyntaxKind4["EmptyStatement"] = 240] = "EmptyStatement"; + SyntaxKind4[SyntaxKind4["VariableStatement"] = 241] = "VariableStatement"; + SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 242] = "ExpressionStatement"; + SyntaxKind4[SyntaxKind4["IfStatement"] = 243] = "IfStatement"; + SyntaxKind4[SyntaxKind4["DoStatement"] = 244] = "DoStatement"; + SyntaxKind4[SyntaxKind4["WhileStatement"] = 245] = "WhileStatement"; + SyntaxKind4[SyntaxKind4["ForStatement"] = 246] = "ForStatement"; + SyntaxKind4[SyntaxKind4["ForInStatement"] = 247] = "ForInStatement"; + SyntaxKind4[SyntaxKind4["ForOfStatement"] = 248] = "ForOfStatement"; + SyntaxKind4[SyntaxKind4["ContinueStatement"] = 249] = "ContinueStatement"; + SyntaxKind4[SyntaxKind4["BreakStatement"] = 250] = "BreakStatement"; + SyntaxKind4[SyntaxKind4["ReturnStatement"] = 251] = "ReturnStatement"; + SyntaxKind4[SyntaxKind4["WithStatement"] = 252] = "WithStatement"; + SyntaxKind4[SyntaxKind4["SwitchStatement"] = 253] = "SwitchStatement"; + SyntaxKind4[SyntaxKind4["LabeledStatement"] = 254] = "LabeledStatement"; + SyntaxKind4[SyntaxKind4["ThrowStatement"] = 255] = "ThrowStatement"; + SyntaxKind4[SyntaxKind4["TryStatement"] = 256] = "TryStatement"; + SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 257] = "DebuggerStatement"; + SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 258] = "VariableDeclaration"; + SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 259] = "VariableDeclarationList"; + SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 260] = "FunctionDeclaration"; + SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 261] = "ClassDeclaration"; + SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 262] = "InterfaceDeclaration"; + SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 263] = "TypeAliasDeclaration"; + SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 264] = "EnumDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 265] = "ModuleDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleBlock"] = 266] = "ModuleBlock"; + SyntaxKind4[SyntaxKind4["CaseBlock"] = 267] = "CaseBlock"; + SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 268] = "NamespaceExportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 269] = "ImportEqualsDeclaration"; + SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 270] = "ImportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportClause"] = 271] = "ImportClause"; + SyntaxKind4[SyntaxKind4["NamespaceImport"] = 272] = "NamespaceImport"; + SyntaxKind4[SyntaxKind4["NamedImports"] = 273] = "NamedImports"; + SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 274] = "ImportSpecifier"; + SyntaxKind4[SyntaxKind4["ExportAssignment"] = 275] = "ExportAssignment"; + SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 276] = "ExportDeclaration"; + SyntaxKind4[SyntaxKind4["NamedExports"] = 277] = "NamedExports"; + SyntaxKind4[SyntaxKind4["NamespaceExport"] = 278] = "NamespaceExport"; + SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 279] = "ExportSpecifier"; + SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 280] = "MissingDeclaration"; + SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 281] = "ExternalModuleReference"; + SyntaxKind4[SyntaxKind4["JsxElement"] = 282] = "JsxElement"; + SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 283] = "JsxSelfClosingElement"; + SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 284] = "JsxOpeningElement"; + SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 285] = "JsxClosingElement"; + SyntaxKind4[SyntaxKind4["JsxFragment"] = 286] = "JsxFragment"; + SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 287] = "JsxOpeningFragment"; + SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 288] = "JsxClosingFragment"; + SyntaxKind4[SyntaxKind4["JsxAttribute"] = 289] = "JsxAttribute"; + SyntaxKind4[SyntaxKind4["JsxAttributes"] = 290] = "JsxAttributes"; + SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 291] = "JsxSpreadAttribute"; + SyntaxKind4[SyntaxKind4["JsxExpression"] = 292] = "JsxExpression"; + SyntaxKind4[SyntaxKind4["CaseClause"] = 293] = "CaseClause"; + SyntaxKind4[SyntaxKind4["DefaultClause"] = 294] = "DefaultClause"; + SyntaxKind4[SyntaxKind4["HeritageClause"] = 295] = "HeritageClause"; + SyntaxKind4[SyntaxKind4["CatchClause"] = 296] = "CatchClause"; + SyntaxKind4[SyntaxKind4["AssertClause"] = 297] = "AssertClause"; + SyntaxKind4[SyntaxKind4["AssertEntry"] = 298] = "AssertEntry"; + SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 299] = "ImportTypeAssertionContainer"; + SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 300] = "PropertyAssignment"; + SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 301] = "ShorthandPropertyAssignment"; + SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 302] = "SpreadAssignment"; + SyntaxKind4[SyntaxKind4["EnumMember"] = 303] = "EnumMember"; + SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 304] = "UnparsedPrologue"; + SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 305] = "UnparsedPrepend"; + SyntaxKind4[SyntaxKind4["UnparsedText"] = 306] = "UnparsedText"; + SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 307] = "UnparsedInternalText"; + SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 308] = "UnparsedSyntheticReference"; + SyntaxKind4[SyntaxKind4["SourceFile"] = 309] = "SourceFile"; + SyntaxKind4[SyntaxKind4["Bundle"] = 310] = "Bundle"; + SyntaxKind4[SyntaxKind4["UnparsedSource"] = 311] = "UnparsedSource"; + SyntaxKind4[SyntaxKind4["InputFiles"] = 312] = "InputFiles"; + SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 313] = "JSDocTypeExpression"; + SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 314] = "JSDocNameReference"; + SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 315] = "JSDocMemberName"; + SyntaxKind4[SyntaxKind4["JSDocAllType"] = 316] = "JSDocAllType"; + SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 317] = "JSDocUnknownType"; + SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 318] = "JSDocNullableType"; + SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 319] = "JSDocNonNullableType"; + SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 320] = "JSDocOptionalType"; + SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 321] = "JSDocFunctionType"; + SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 322] = "JSDocVariadicType"; + SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 323] = "JSDocNamepathType"; + SyntaxKind4[SyntaxKind4["JSDoc"] = 324] = "JSDoc"; + SyntaxKind4[SyntaxKind4["JSDocComment"] = 324 /* JSDoc */] = "JSDocComment"; + SyntaxKind4[SyntaxKind4["JSDocText"] = 325] = "JSDocText"; + SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 326] = "JSDocTypeLiteral"; + SyntaxKind4[SyntaxKind4["JSDocSignature"] = 327] = "JSDocSignature"; + SyntaxKind4[SyntaxKind4["JSDocLink"] = 328] = "JSDocLink"; + SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 329] = "JSDocLinkCode"; + SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 330] = "JSDocLinkPlain"; + SyntaxKind4[SyntaxKind4["JSDocTag"] = 331] = "JSDocTag"; + SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 332] = "JSDocAugmentsTag"; + SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 333] = "JSDocImplementsTag"; + SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 334] = "JSDocAuthorTag"; + SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 335] = "JSDocDeprecatedTag"; + SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 336] = "JSDocClassTag"; + SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 337] = "JSDocPublicTag"; + SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 338] = "JSDocPrivateTag"; + SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 339] = "JSDocProtectedTag"; + SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 340] = "JSDocReadonlyTag"; + SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 341] = "JSDocOverrideTag"; + SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 342] = "JSDocCallbackTag"; + SyntaxKind4[SyntaxKind4["JSDocOverloadTag"] = 343] = "JSDocOverloadTag"; + SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 344] = "JSDocEnumTag"; + SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 345] = "JSDocParameterTag"; + SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 346] = "JSDocReturnTag"; + SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 347] = "JSDocThisTag"; + SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 348] = "JSDocTypeTag"; + SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 349] = "JSDocTemplateTag"; + SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 350] = "JSDocTypedefTag"; + SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 351] = "JSDocSeeTag"; + SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 352] = "JSDocPropertyTag"; + SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 353] = "JSDocThrowsTag"; + SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 354] = "JSDocSatisfiesTag"; + SyntaxKind4[SyntaxKind4["SyntaxList"] = 355] = "SyntaxList"; + SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 356] = "NotEmittedStatement"; + SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 357] = "PartiallyEmittedExpression"; + SyntaxKind4[SyntaxKind4["CommaListExpression"] = 358] = "CommaListExpression"; + SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 359] = "MergeDeclarationMarker"; + SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 360] = "EndOfDeclarationMarker"; + SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression"; + SyntaxKind4[SyntaxKind4["Count"] = 362] = "Count"; SyntaxKind4[SyntaxKind4["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment"; SyntaxKind4[SyntaxKind4["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment"; SyntaxKind4[SyntaxKind4["LastCompoundAssignment"] = 78 /* CaretEqualsToken */] = "LastCompoundAssignment"; - SyntaxKind4[SyntaxKind4["FirstReservedWord"] = 81 /* BreakKeyword */] = "FirstReservedWord"; - SyntaxKind4[SyntaxKind4["LastReservedWord"] = 116 /* WithKeyword */] = "LastReservedWord"; - SyntaxKind4[SyntaxKind4["FirstKeyword"] = 81 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind4[SyntaxKind4["LastKeyword"] = 162 /* OfKeyword */] = "LastKeyword"; - SyntaxKind4[SyntaxKind4["FirstFutureReservedWord"] = 117 /* ImplementsKeyword */] = "FirstFutureReservedWord"; - SyntaxKind4[SyntaxKind4["LastFutureReservedWord"] = 125 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 179 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind4[SyntaxKind4["LastTypeNode"] = 202 /* ImportType */] = "LastTypeNode"; + SyntaxKind4[SyntaxKind4["FirstReservedWord"] = 82 /* BreakKeyword */] = "FirstReservedWord"; + SyntaxKind4[SyntaxKind4["LastReservedWord"] = 117 /* WithKeyword */] = "LastReservedWord"; + SyntaxKind4[SyntaxKind4["FirstKeyword"] = 82 /* BreakKeyword */] = "FirstKeyword"; + SyntaxKind4[SyntaxKind4["LastKeyword"] = 163 /* OfKeyword */] = "LastKeyword"; + SyntaxKind4[SyntaxKind4["FirstFutureReservedWord"] = 118 /* ImplementsKeyword */] = "FirstFutureReservedWord"; + SyntaxKind4[SyntaxKind4["LastFutureReservedWord"] = 126 /* YieldKeyword */] = "LastFutureReservedWord"; + SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 180 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind4[SyntaxKind4["LastTypeNode"] = 203 /* ImportType */] = "LastTypeNode"; SyntaxKind4[SyntaxKind4["FirstPunctuation"] = 18 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind4[SyntaxKind4["LastPunctuation"] = 78 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind4[SyntaxKind4["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind4[SyntaxKind4["LastToken"] = 162 /* LastKeyword */] = "LastToken"; + SyntaxKind4[SyntaxKind4["LastToken"] = 163 /* LastKeyword */] = "LastToken"; SyntaxKind4[SyntaxKind4["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind4[SyntaxKind4["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind4[SyntaxKind4["FirstLiteralToken"] = 8 /* NumericLiteral */] = "FirstLiteralToken"; @@ -3471,15 +3472,15 @@ SyntaxKind4[SyntaxKind4["LastTemplateToken"] = 17 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind4[SyntaxKind4["FirstBinaryOperator"] = 29 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind4[SyntaxKind4["LastBinaryOperator"] = 78 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind4[SyntaxKind4["FirstStatement"] = 240 /* VariableStatement */] = "FirstStatement"; - SyntaxKind4[SyntaxKind4["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind4[SyntaxKind4["FirstNode"] = 163 /* QualifiedName */] = "FirstNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; - SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind4[SyntaxKind4["FirstStatement"] = 241 /* VariableStatement */] = "FirstStatement"; + SyntaxKind4[SyntaxKind4["LastStatement"] = 257 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind4[SyntaxKind4["FirstNode"] = 164 /* QualifiedName */] = "FirstNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 313 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 354 /* JSDocSatisfiesTag */] = "LastJSDocNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 331 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 354 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; + SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 127 /* AbstractKeyword */] = "FirstContextualKeyword"; + SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 163 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind4; })(SyntaxKind || {}); var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { @@ -3715,7 +3716,6 @@ TypeFlags2[TypeFlags2["DefinitelyFalsy"] = 117632] = "DefinitelyFalsy"; TypeFlags2[TypeFlags2["PossiblyFalsy"] = 117724] = "PossiblyFalsy"; TypeFlags2[TypeFlags2["Intrinsic"] = 67359327] = "Intrinsic"; - TypeFlags2[TypeFlags2["Primitive"] = 134348796] = "Primitive"; TypeFlags2[TypeFlags2["StringLike"] = 402653316] = "StringLike"; TypeFlags2[TypeFlags2["NumberLike"] = 296] = "NumberLike"; TypeFlags2[TypeFlags2["BigIntLike"] = 2112] = "BigIntLike"; @@ -3723,6 +3723,7 @@ TypeFlags2[TypeFlags2["EnumLike"] = 1056] = "EnumLike"; TypeFlags2[TypeFlags2["ESSymbolLike"] = 12288] = "ESSymbolLike"; TypeFlags2[TypeFlags2["VoidLike"] = 49152] = "VoidLike"; + TypeFlags2[TypeFlags2["Primitive"] = 402784252] = "Primitive"; TypeFlags2[TypeFlags2["DefinitelyNonNullable"] = 470302716] = "DefinitelyNonNullable"; TypeFlags2[TypeFlags2["DisjointDomains"] = 469892092] = "DisjointDomains"; TypeFlags2[TypeFlags2["UnionOrIntersection"] = 3145728] = "UnionOrIntersection"; @@ -3736,7 +3737,7 @@ TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable"; TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton"; TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable"; - TypeFlags2[TypeFlags2["IncludesMask"] = 205258751] = "IncludesMask"; + TypeFlags2[TypeFlags2["IncludesMask"] = 473694207] = "IncludesMask"; TypeFlags2[TypeFlags2["IncludesMissingType"] = 262144 /* TypeParameter */] = "IncludesMissingType"; TypeFlags2[TypeFlags2["IncludesNonWideningType"] = 4194304 /* Index */] = "IncludesNonWideningType"; TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard"; @@ -3814,6 +3815,7 @@ } var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => { ModuleResolutionKind2[ModuleResolutionKind2["Classic"] = 1] = "Classic"; + ModuleResolutionKind2[ModuleResolutionKind2["NodeJs"] = 2] = "NodeJs"; ModuleResolutionKind2[ModuleResolutionKind2["Node10"] = 2] = "Node10"; ModuleResolutionKind2[ModuleResolutionKind2["Node16"] = 3] = "Node16"; ModuleResolutionKind2[ModuleResolutionKind2["NodeNext"] = 99] = "NodeNext"; @@ -6854,12 +6856,14 @@ Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."), An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."), Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."), - Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecat_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), - Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."), + Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), + Option_0_has_been_removed_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."), Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."), Option_0_is_redundant_and_cannot_be_specified_with_option_1: diag(5104, 1 /* Error */, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."), Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: diag(5105, 1 /* Error */, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."), Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), + Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), + Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -7799,88 +7803,88 @@ return token === 31 /* GreaterThanToken */ || tokenIsIdentifierOrKeyword(token); } var textToKeywordObj = { - abstract: 126 /* AbstractKeyword */, - accessor: 127 /* AccessorKeyword */, - any: 131 /* AnyKeyword */, - as: 128 /* AsKeyword */, - asserts: 129 /* AssertsKeyword */, - assert: 130 /* AssertKeyword */, - bigint: 160 /* BigIntKeyword */, - boolean: 134 /* BooleanKeyword */, - break: 81 /* BreakKeyword */, - case: 82 /* CaseKeyword */, - catch: 83 /* CatchKeyword */, - class: 84 /* ClassKeyword */, - continue: 86 /* ContinueKeyword */, - const: 85 /* ConstKeyword */, - ["constructor"]: 135 /* ConstructorKeyword */, - debugger: 87 /* DebuggerKeyword */, - declare: 136 /* DeclareKeyword */, - default: 88 /* DefaultKeyword */, - delete: 89 /* DeleteKeyword */, - do: 90 /* DoKeyword */, - else: 91 /* ElseKeyword */, - enum: 92 /* EnumKeyword */, - export: 93 /* ExportKeyword */, - extends: 94 /* ExtendsKeyword */, - false: 95 /* FalseKeyword */, - finally: 96 /* FinallyKeyword */, - for: 97 /* ForKeyword */, - from: 158 /* FromKeyword */, - function: 98 /* FunctionKeyword */, - get: 137 /* GetKeyword */, - if: 99 /* IfKeyword */, - implements: 117 /* ImplementsKeyword */, - import: 100 /* ImportKeyword */, - in: 101 /* InKeyword */, - infer: 138 /* InferKeyword */, - instanceof: 102 /* InstanceOfKeyword */, - interface: 118 /* InterfaceKeyword */, - intrinsic: 139 /* IntrinsicKeyword */, - is: 140 /* IsKeyword */, - keyof: 141 /* KeyOfKeyword */, - let: 119 /* LetKeyword */, - module: 142 /* ModuleKeyword */, - namespace: 143 /* NamespaceKeyword */, - never: 144 /* NeverKeyword */, - new: 103 /* NewKeyword */, - null: 104 /* NullKeyword */, - number: 148 /* NumberKeyword */, - object: 149 /* ObjectKeyword */, - package: 120 /* PackageKeyword */, - private: 121 /* PrivateKeyword */, - protected: 122 /* ProtectedKeyword */, - public: 123 /* PublicKeyword */, - override: 161 /* OverrideKeyword */, - out: 145 /* OutKeyword */, - readonly: 146 /* ReadonlyKeyword */, - require: 147 /* RequireKeyword */, - global: 159 /* GlobalKeyword */, - return: 105 /* ReturnKeyword */, - satisfies: 150 /* SatisfiesKeyword */, - set: 151 /* SetKeyword */, - static: 124 /* StaticKeyword */, - string: 152 /* StringKeyword */, - super: 106 /* SuperKeyword */, - switch: 107 /* SwitchKeyword */, - symbol: 153 /* SymbolKeyword */, - this: 108 /* ThisKeyword */, - throw: 109 /* ThrowKeyword */, - true: 110 /* TrueKeyword */, - try: 111 /* TryKeyword */, - type: 154 /* TypeKeyword */, - typeof: 112 /* TypeOfKeyword */, - undefined: 155 /* UndefinedKeyword */, - unique: 156 /* UniqueKeyword */, - unknown: 157 /* UnknownKeyword */, - var: 113 /* VarKeyword */, - void: 114 /* VoidKeyword */, - while: 115 /* WhileKeyword */, - with: 116 /* WithKeyword */, - yield: 125 /* YieldKeyword */, - async: 132 /* AsyncKeyword */, - await: 133 /* AwaitKeyword */, - of: 162 /* OfKeyword */ + abstract: 127 /* AbstractKeyword */, + accessor: 128 /* AccessorKeyword */, + any: 132 /* AnyKeyword */, + as: 129 /* AsKeyword */, + asserts: 130 /* AssertsKeyword */, + assert: 131 /* AssertKeyword */, + bigint: 161 /* BigIntKeyword */, + boolean: 135 /* BooleanKeyword */, + break: 82 /* BreakKeyword */, + case: 83 /* CaseKeyword */, + catch: 84 /* CatchKeyword */, + class: 85 /* ClassKeyword */, + continue: 87 /* ContinueKeyword */, + const: 86 /* ConstKeyword */, + ["constructor"]: 136 /* ConstructorKeyword */, + debugger: 88 /* DebuggerKeyword */, + declare: 137 /* DeclareKeyword */, + default: 89 /* DefaultKeyword */, + delete: 90 /* DeleteKeyword */, + do: 91 /* DoKeyword */, + else: 92 /* ElseKeyword */, + enum: 93 /* EnumKeyword */, + export: 94 /* ExportKeyword */, + extends: 95 /* ExtendsKeyword */, + false: 96 /* FalseKeyword */, + finally: 97 /* FinallyKeyword */, + for: 98 /* ForKeyword */, + from: 159 /* FromKeyword */, + function: 99 /* FunctionKeyword */, + get: 138 /* GetKeyword */, + if: 100 /* IfKeyword */, + implements: 118 /* ImplementsKeyword */, + import: 101 /* ImportKeyword */, + in: 102 /* InKeyword */, + infer: 139 /* InferKeyword */, + instanceof: 103 /* InstanceOfKeyword */, + interface: 119 /* InterfaceKeyword */, + intrinsic: 140 /* IntrinsicKeyword */, + is: 141 /* IsKeyword */, + keyof: 142 /* KeyOfKeyword */, + let: 120 /* LetKeyword */, + module: 143 /* ModuleKeyword */, + namespace: 144 /* NamespaceKeyword */, + never: 145 /* NeverKeyword */, + new: 104 /* NewKeyword */, + null: 105 /* NullKeyword */, + number: 149 /* NumberKeyword */, + object: 150 /* ObjectKeyword */, + package: 121 /* PackageKeyword */, + private: 122 /* PrivateKeyword */, + protected: 123 /* ProtectedKeyword */, + public: 124 /* PublicKeyword */, + override: 162 /* OverrideKeyword */, + out: 146 /* OutKeyword */, + readonly: 147 /* ReadonlyKeyword */, + require: 148 /* RequireKeyword */, + global: 160 /* GlobalKeyword */, + return: 106 /* ReturnKeyword */, + satisfies: 151 /* SatisfiesKeyword */, + set: 152 /* SetKeyword */, + static: 125 /* StaticKeyword */, + string: 153 /* StringKeyword */, + super: 107 /* SuperKeyword */, + switch: 108 /* SwitchKeyword */, + symbol: 154 /* SymbolKeyword */, + this: 109 /* ThisKeyword */, + throw: 110 /* ThrowKeyword */, + true: 111 /* TrueKeyword */, + try: 112 /* TryKeyword */, + type: 155 /* TypeKeyword */, + typeof: 113 /* TypeOfKeyword */, + undefined: 156 /* UndefinedKeyword */, + unique: 157 /* UniqueKeyword */, + unknown: 158 /* UnknownKeyword */, + var: 114 /* VarKeyword */, + void: 115 /* VoidKeyword */, + while: 116 /* WhileKeyword */, + with: 117 /* WithKeyword */, + yield: 126 /* YieldKeyword */, + async: 133 /* AsyncKeyword */, + await: 134 /* AwaitKeyword */, + of: 163 /* OfKeyword */ }; var textToKeyword = new Map(Object.entries(textToKeywordObj)); var textToToken = new Map(Object.entries({ @@ -8433,8 +8437,8 @@ var text = textInitial; var pos; var end; - var startPos; - var tokenPos; + var fullStartPos; + var tokenStart; var token; var tokenValue; var tokenFlags; @@ -8442,18 +8446,21 @@ var inJSDocType = 0; setText(text, start, length2); var scanner = { - getStartPos: () => startPos, + getTokenFullStart: () => fullStartPos, + getStartPos: () => fullStartPos, + getTokenEnd: () => pos, getTextPos: () => pos, getToken: () => token, - getTokenPos: () => tokenPos, - getTokenText: () => text.substring(tokenPos, pos), + getTokenStart: () => tokenStart, + getTokenPos: () => tokenStart, + getTokenText: () => text.substring(tokenStart, pos), getTokenValue: () => tokenValue, hasUnicodeEscape: () => (tokenFlags & 1024 /* UnicodeEscape */) !== 0, hasExtendedUnicodeEscape: () => (tokenFlags & 8 /* ExtendedUnicodeEscape */) !== 0, hasPrecedingLineBreak: () => (tokenFlags & 1 /* PrecedingLineBreak */) !== 0, hasPrecedingJSDocComment: () => (tokenFlags & 2 /* PrecedingJSDocComment */) !== 0, - isIdentifier: () => token === 79 /* Identifier */ || token > 116 /* LastReservedWord */, - isReservedWord: () => token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */, + isIdentifier: () => token === 79 /* Identifier */ || token > 117 /* LastReservedWord */, + isReservedWord: () => token >= 82 /* FirstReservedWord */ && token <= 117 /* LastReservedWord */, isUnterminated: () => (tokenFlags & 4 /* Unterminated */) !== 0, getCommentDirectives: () => commentDirectives, getNumericLiteralFlags: () => tokenFlags & 1008 /* NumericLiteralFlags */, @@ -8473,6 +8480,7 @@ reScanInvalidIdentifier, scanJsxToken, scanJsDocToken, + scanJSDocCommentTextToken, scan, getText, clearCommentDirectives, @@ -8480,7 +8488,8 @@ setScriptTarget, setLanguageVariant, setOnError, - setTextPos, + resetTokenState, + setTextPos: resetTokenState, setInJSDocType, tryScan, lookAhead, @@ -8490,7 +8499,7 @@ Object.defineProperty(scanner, "__debugShowCurrentPositionInText", { get: () => { const text2 = scanner.getText(); - return text2.slice(0, scanner.getStartPos()) + "\u2551" + text2.slice(scanner.getStartPos()); + return text2.slice(0, scanner.getTokenFullStart()) + "\u2551" + text2.slice(scanner.getTokenFullStart()); } }); } @@ -9013,11 +9022,11 @@ } } function scan() { - startPos = pos; + fullStartPos = pos; tokenFlags = 0 /* None */; let asteriskSeen = false; while (true) { - tokenPos = pos; + tokenStart = pos; if (pos >= end) { return token = 1 /* EndOfFileToken */; } @@ -9176,9 +9185,9 @@ } commentDirectives = appendIfCommentDirective( commentDirectives, - text.slice(tokenPos, pos), + text.slice(tokenStart, pos), commentDirectiveRegExSingleLine, - tokenPos + tokenStart ); if (skipTrivia2) { continue; @@ -9192,7 +9201,7 @@ tokenFlags |= 2 /* PrecedingJSDocComment */; } let commentClosed = false; - let lastLineStart = tokenPos; + let lastLineStart = tokenStart; while (pos < end) { const ch2 = text.charCodeAt(pos); if (ch2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { @@ -9470,7 +9479,7 @@ } function reScanInvalidIdentifier() { Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."); - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; tokenFlags = 0; const ch = codePointAt(text, pos); const identifierKind = scanIdentifier(ch, 99 /* ESNext */); @@ -9486,7 +9495,7 @@ pos += charSize(ch); while (pos < end && isIdentifierPart(ch = codePointAt(text, pos), languageVersion2)) pos += charSize(ch); - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } @@ -9517,12 +9526,12 @@ } function reScanAsteriskEqualsToken() { Debug.assert(token === 66 /* AsteriskEqualsToken */, "'reScanAsteriskEqualsToken' should only be called on a '*='"); - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 63 /* EqualsToken */; } function reScanSlashToken() { if (token === 43 /* SlashToken */ || token === 68 /* SlashEqualsToken */) { - let p = tokenPos + 1; + let p = tokenStart + 1; let inEscape = false; let inCharacterClass = false; while (true) { @@ -9555,7 +9564,7 @@ p++; } pos = p; - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); token = 13 /* RegularExpressionLiteral */; } return token; @@ -9588,41 +9597,41 @@ } function reScanTemplateToken(isTaggedTemplate) { Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); - pos = tokenPos; + pos = tokenStart; return token = scanTemplateAndSetTokenValue(isTaggedTemplate); } function reScanTemplateHeadOrNoSubstitutionTemplate() { - pos = tokenPos; + pos = tokenStart; return token = scanTemplateAndSetTokenValue( /* isTaggedTemplate */ true ); } function reScanJsxToken(allowMultilineJsxText = true) { - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; return token = scanJsxToken(allowMultilineJsxText); } function reScanLessThanToken() { if (token === 47 /* LessThanLessThanToken */) { - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 29 /* LessThanToken */; } return token; } function reScanHashToken() { if (token === 80 /* PrivateIdentifier */) { - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 62 /* HashToken */; } return token; } function reScanQuestionToken() { Debug.assert(token === 60 /* QuestionQuestionToken */, "'reScanQuestionToken' should only be called on a '??'"); - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 57 /* QuestionToken */; } function scanJsxToken(allowMultilineJsxText = true) { - startPos = tokenPos = pos; + fullStartPos = tokenStart = pos; if (pos >= end) { return token = 1 /* EndOfFileToken */; } @@ -9667,7 +9676,7 @@ } pos++; } - tokenValue = text.substring(startPos, pos); + tokenValue = text.substring(fullStartPos, pos); return firstNonWhitespace === -1 ? 12 /* JsxTextAllWhiteSpaces */ : 11 /* JsxText */; } function scanJsxIdentifier() { @@ -9701,7 +9710,7 @@ return token; } function scanJsxAttributeValue() { - startPos = pos; + fullStartPos = pos; switch (text.charCodeAt(pos)) { case 34 /* doubleQuote */: case 39 /* singleQuote */: @@ -9715,11 +9724,32 @@ } } function reScanJsxAttributeValue() { - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; return scanJsxAttributeValue(); } + function scanJSDocCommentTextToken(inBackticks) { + fullStartPos = tokenStart = pos; + tokenFlags = 0 /* None */; + if (pos >= end) { + return token = 1 /* EndOfFileToken */; + } + for (let ch = text.charCodeAt(pos); pos < end && (!isLineBreak(ch) && ch !== 96 /* backtick */); ch = codePointAt(text, ++pos)) { + if (!inBackticks) { + if (ch === 123 /* openBrace */) { + break; + } else if (ch === 64 /* at */ && pos - 1 >= 0 && isWhiteSpaceSingleLine(text.charCodeAt(pos - 1)) && !(pos + 1 < end && isWhiteSpaceLike(text.charCodeAt(pos + 1)))) { + break; + } + } + } + if (pos === tokenStart) { + return scanJsDocToken(); + } + tokenValue = text.substring(tokenStart, pos); + return token = 81 /* JSDocCommentTextToken */; + } function scanJsDocToken() { - startPos = tokenPos = pos; + fullStartPos = tokenStart = pos; tokenFlags = 0 /* None */; if (pos >= end) { return token = 1 /* EndOfFileToken */; @@ -9791,7 +9821,7 @@ let char = ch; while (pos < end && isIdentifierPart(char = codePointAt(text, pos), languageVersion) || text.charCodeAt(pos) === 45 /* minus */) pos += charSize(char); - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); if (char === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } @@ -9802,16 +9832,16 @@ } function speculationHelper(callback, isLookahead) { const savePos = pos; - const saveStartPos = startPos; - const saveTokenPos = tokenPos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; const saveToken = token; const saveTokenValue = tokenValue; const saveTokenFlags = tokenFlags; const result = callback(); if (!result || isLookahead) { pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; token = saveToken; tokenValue = saveTokenValue; tokenFlags = saveTokenFlags; @@ -9821,8 +9851,8 @@ function scanRange(start2, length3, callback) { const saveEnd = end; const savePos = pos; - const saveStartPos = startPos; - const saveTokenPos = tokenPos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; const saveToken = token; const saveTokenValue = tokenValue; const saveTokenFlags = tokenFlags; @@ -9831,8 +9861,8 @@ const result = callback(); end = saveEnd; pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; token = saveToken; tokenValue = saveTokenValue; tokenFlags = saveTokenFlags; @@ -9862,7 +9892,7 @@ function setText(newText, start2, length3) { text = newText || ""; end = length3 === void 0 ? text.length : start2 + length3; - setTextPos(start2 || 0); + resetTokenState(start2 || 0); } function setOnError(errorCallback) { onError = errorCallback; @@ -9873,11 +9903,11 @@ function setLanguageVariant(variant) { languageVariant = variant; } - function setTextPos(textPos) { - Debug.assert(textPos >= 0); - pos = textPos; - startPos = textPos; - tokenPos = textPos; + function resetTokenState(position) { + Debug.assert(position >= 0); + pos = position; + fullStartPos = position; + tokenStart = position; token = 0 /* Unknown */; tokenValue = void 0; tokenFlags = 0 /* None */; @@ -9989,7 +10019,7 @@ } var unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); function isParameterPropertyDeclaration(node, parent) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 173 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 174 /* Constructor */; } function walkUpBindingElementsAndPatterns(binding) { let node = binding.parent; @@ -10003,14 +10033,14 @@ node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 257 /* VariableDeclaration */) { + if (node.kind === 258 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 258 /* VariableDeclarationList */) { + if (node && node.kind === 259 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 240 /* VariableStatement */) { + if (node && node.kind === 241 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -10140,30 +10170,30 @@ return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 223 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { + if (expr.kind === 224 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return expr.name; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 214 /* ParenthesizedExpression */: { + case 215 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 253 /* LabeledStatement */: { + case 254 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -10194,16 +10224,16 @@ switch (declaration.kind) { case 79 /* Identifier */: return declaration; - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: { + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 163 /* QualifiedName */) { + if (name.kind === 164 /* QualifiedName */) { return name.right; } break; } - case 210 /* CallExpression */: - case 223 /* BinaryExpression */: { + case 211 /* CallExpression */: + case 224 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -10219,15 +10249,15 @@ return void 0; } } - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 343 /* JSDocEnumTag */: + case 344 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -10449,10 +10479,10 @@ return getJSDocTags(node).filter(predicate); } function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 324 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 325 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 327 /* JSDocLink */ ? "link" : link.kind === 328 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 328 /* JSDocLink */ ? "link" : link.kind === 329 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -10468,7 +10498,7 @@ return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 323 /* JSDoc */); + Debug.assert(node.parent.kind === 324 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -10496,7 +10526,7 @@ return node.kind === 79 /* Identifier */ || node.kind === 80 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 175 /* SetAccessor */ || node.kind === 174 /* GetAccessor */; + return node.kind === 176 /* SetAccessor */ || node.kind === 175 /* GetAccessor */; } function isPropertyAccessChain(node) { return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); @@ -10509,7 +10539,7 @@ } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */ || kind === 210 /* CallExpression */ || kind === 232 /* NonNullExpression */); + return !!(node.flags & 32 /* OptionalChain */) && (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */ || kind === 211 /* CallExpression */ || kind === 233 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -10521,7 +10551,7 @@ return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + return node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -10533,28 +10563,28 @@ return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); } function isNamedExportBindings(node) { - return node.kind === 277 /* NamespaceExport */ || node.kind === 276 /* NamedExports */; + return node.kind === 278 /* NamespaceExport */ || node.kind === 277 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 305 /* UnparsedText */: - case 306 /* UnparsedInternalText */: + case 306 /* UnparsedText */: + case 307 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 303 /* UnparsedPrologue */ || node.kind === 307 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 304 /* UnparsedPrologue */ || node.kind === 308 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 351 /* JSDocPropertyTag */ || node.kind === 344 /* JSDocParameterTag */; + return node.kind === 352 /* JSDocPropertyTag */ || node.kind === 345 /* JSDocParameterTag */; } function isNodeKind(kind) { - return kind >= 163 /* FirstNode */; + return kind >= 164 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 162 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 163 /* LastToken */; } function isNodeArray(array) { return hasProperty(array, "pos") && hasProperty(array, "end"); @@ -10567,11 +10597,11 @@ } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: case 13 /* RegularExpressionLiteral */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: return true; } return false; @@ -10588,23 +10618,23 @@ } function isTypeOnlyImportDeclaration(node) { switch (node.kind) { - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.isTypeOnly; - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: return node.isTypeOnly; } return false; } function isTypeOnlyExportDeclaration(node) { switch (node.kind) { - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause; - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return node.parent.isTypeOnly; } return false; @@ -10631,21 +10661,21 @@ } function isModifierKind(token) { switch (token) { - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 132 /* AsyncKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 88 /* DefaultKeyword */: - case 93 /* ExportKeyword */: - case 101 /* InKeyword */: - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 124 /* StaticKeyword */: - case 145 /* OutKeyword */: - case 161 /* OverrideKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 133 /* AsyncKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 89 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 102 /* InKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 125 /* StaticKeyword */: + case 146 /* OutKeyword */: + case 162 /* OverrideKeyword */: return true; } return false; @@ -10654,22 +10684,22 @@ return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 124 /* StaticKeyword */ || idToken === 161 /* OverrideKeyword */ || idToken === 127 /* AccessorKeyword */; + return isParameterPropertyModifier(idToken) || idToken === 125 /* StaticKeyword */ || idToken === 162 /* OverrideKeyword */ || idToken === 128 /* AccessorKeyword */; } function isModifier(node) { return isModifierKind(node.kind); } function isEntityName(node) { const kind = node.kind; - return kind === 163 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 164 /* QualifiedName */ || kind === 79 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 164 /* ComputedPropertyName */; + return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 165 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 203 /* ObjectBindingPattern */ || kind === 204 /* ArrayBindingPattern */; + return kind === 79 /* Identifier */ || kind === 204 /* ObjectBindingPattern */ || kind === 205 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -10681,17 +10711,17 @@ return node && isFunctionLikeDeclarationKind(node.kind); } function isBooleanLiteral(node) { - return node.kind === 110 /* TrueKeyword */ || node.kind === 95 /* FalseKeyword */; + return node.kind === 111 /* TrueKeyword */ || node.kind === 96 /* FalseKeyword */; } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: return false; @@ -10699,14 +10729,14 @@ } function isFunctionLikeKind(kind) { switch (kind) { - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 181 /* FunctionType */: - case 320 /* JSDocFunctionType */: - case 182 /* ConstructorType */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 182 /* FunctionType */: + case 321 /* JSDocFunctionType */: + case 183 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -10717,22 +10747,22 @@ } function isClassElement(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 169 /* PropertyDeclaration */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 178 /* IndexSignature */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 237 /* SemicolonClassElement */; + return kind === 174 /* Constructor */ || kind === 170 /* PropertyDeclaration */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 179 /* IndexSignature */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 238 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */); + return node && (node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */); } function isAccessor(node) { - return node && (node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */); + return node && (node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -10740,10 +10770,10 @@ } function isNamedClassElement(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: return true; default: return false; @@ -10754,19 +10784,19 @@ } function isTypeElement(node) { const kind = node.kind; - return kind === 177 /* ConstructSignature */ || kind === 176 /* CallSignature */ || kind === 168 /* PropertySignature */ || kind === 170 /* MethodSignature */ || kind === 178 /* IndexSignature */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 178 /* ConstructSignature */ || kind === 177 /* CallSignature */ || kind === 169 /* PropertySignature */ || kind === 171 /* MethodSignature */ || kind === 179 /* IndexSignature */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 301 /* SpreadAssignment */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 302 /* SpreadAssignment */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return true; } return false; @@ -10774,23 +10804,23 @@ function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 204 /* ArrayBindingPattern */ || kind === 203 /* ObjectBindingPattern */; + return kind === 205 /* ArrayBindingPattern */ || kind === 204 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 206 /* ArrayLiteralExpression */ || kind === 207 /* ObjectLiteralExpression */; + return kind === 207 /* ArrayLiteralExpression */ || kind === 208 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 205 /* BindingElement */ || kind === 229 /* OmittedExpression */; + return kind === 206 /* BindingElement */ || kind === 230 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: return true; } return false; @@ -10803,40 +10833,40 @@ } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 203 /* ObjectBindingPattern */: - case 207 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 208 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return true; } return false; } function isArrayBindingOrAssignmentElement(node) { switch (node.kind) { - case 205 /* BindingElement */: - case 229 /* OmittedExpression */: - case 227 /* SpreadElement */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: + case 206 /* BindingElement */: + case 230 /* OmittedExpression */: + case 228 /* SpreadElement */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return true; } return isAssignmentExpression( @@ -10847,46 +10877,46 @@ } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */; + return kind === 209 /* PropertyAccessExpression */ || kind === 164 /* QualifiedName */ || kind === 203 /* ImportType */; } function isCallLikeExpression(node) { switch (node.kind) { - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 167 /* Decorator */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 168 /* Decorator */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 210 /* CallExpression */ || node.kind === 211 /* NewExpression */; + return node.kind === 211 /* CallExpression */ || node.kind === 212 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 225 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; + return kind === 226 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 211 /* NewExpression */: - case 210 /* CallExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: - case 212 /* TaggedTemplateExpression */: - case 206 /* ArrayLiteralExpression */: - case 214 /* ParenthesizedExpression */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 212 /* NewExpression */: + case 211 /* CallExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: + case 213 /* TaggedTemplateExpression */: + case 207 /* ArrayLiteralExpression */: + case 215 /* ParenthesizedExpression */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 13 /* RegularExpressionLiteral */: @@ -10894,17 +10924,17 @@ case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: - case 108 /* ThisKeyword */: - case 110 /* TrueKeyword */: - case 106 /* SuperKeyword */: - case 232 /* NonNullExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 233 /* MetaProperty */: - case 100 /* ImportKeyword */: - case 279 /* MissingDeclaration */: + case 226 /* TemplateExpression */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 109 /* ThisKeyword */: + case 111 /* TrueKeyword */: + case 107 /* SuperKeyword */: + case 233 /* NonNullExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 234 /* MetaProperty */: + case 101 /* ImportKeyword */: + case 280 /* MissingDeclaration */: return true; default: return false; @@ -10915,13 +10945,13 @@ } function isUnaryExpressionKind(kind) { switch (kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: - case 217 /* DeleteExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 220 /* AwaitExpression */: - case 213 /* TypeAssertionExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 218 /* DeleteExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 221 /* AwaitExpression */: + case 214 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -10929,10 +10959,10 @@ } function isLiteralTypeLiteral(node) { switch (node.kind) { - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 221 /* PrefixUnaryExpression */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 222 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -10943,16 +10973,16 @@ } function isExpressionKind(kind) { switch (kind) { - case 224 /* ConditionalExpression */: - case 226 /* YieldExpression */: - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 227 /* SpreadElement */: - case 231 /* AsExpression */: - case 229 /* OmittedExpression */: - case 357 /* CommaListExpression */: - case 356 /* PartiallyEmittedExpression */: - case 235 /* SatisfiesExpression */: + case 225 /* ConditionalExpression */: + case 227 /* YieldExpression */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 228 /* SpreadElement */: + case 232 /* AsExpression */: + case 230 /* OmittedExpression */: + case 358 /* CommaListExpression */: + case 357 /* PartiallyEmittedExpression */: + case 236 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -10960,17 +10990,17 @@ } function isAssertionExpression(node) { const kind = node.kind; - return kind === 213 /* TypeAssertionExpression */ || kind === 231 /* AsExpression */; + return kind === 214 /* TypeAssertionExpression */ || kind === 232 /* AsExpression */; } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return true; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -10988,7 +11018,7 @@ return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); } function isForInOrOfStatement(node) { - return node.kind === 246 /* ForInStatement */ || node.kind === 247 /* ForOfStatement */; + return node.kind === 247 /* ForInStatement */ || node.kind === 248 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -10998,81 +11028,81 @@ } function isModuleBody(node) { const kind = node.kind; - return kind === 265 /* ModuleBlock */ || kind === 264 /* ModuleDeclaration */ || kind === 79 /* Identifier */; + return kind === 266 /* ModuleBlock */ || kind === 265 /* ModuleDeclaration */ || kind === 79 /* Identifier */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 272 /* NamedImports */ || kind === 271 /* NamespaceImport */; + return kind === 273 /* NamedImports */ || kind === 272 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */ || node.kind === 263 /* EnumDeclaration */; + return node.kind === 265 /* ModuleDeclaration */ || node.kind === 264 /* EnumDeclaration */; } function canHaveSymbol(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 205 /* BindingElement */: - case 210 /* CallExpression */: - case 176 /* CallSignature */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 172 /* ClassStaticBlockDeclaration */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 209 /* ElementAccessExpression */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: - case 278 /* ExportSpecifier */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 206 /* BindingElement */: + case 211 /* CallExpression */: + case 177 /* CallSignature */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 173 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 210 /* ElementAccessExpression */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: + case 279 /* ExportSpecifier */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: case 79 /* Identifier */: - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: - case 320 /* JSDocFunctionType */: - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: - case 326 /* JSDocSignature */: - case 349 /* JSDocTypedefTag */: - case 325 /* JSDocTypeLiteral */: - case 288 /* JsxAttribute */: - case 289 /* JsxAttributes */: - case 290 /* JsxSpreadAttribute */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 199 /* NamedTupleMember */: - case 277 /* NamespaceExport */: - case 267 /* NamespaceExportDeclaration */: - case 271 /* NamespaceImport */: - case 211 /* NewExpression */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: + case 321 /* JSDocFunctionType */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 327 /* JSDocSignature */: + case 350 /* JSDocTypedefTag */: + case 326 /* JSDocTypeLiteral */: + case 289 /* JsxAttribute */: + case 290 /* JsxAttributes */: + case 291 /* JsxSpreadAttribute */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 200 /* NamedTupleMember */: + case 278 /* NamespaceExport */: + case 268 /* NamespaceExportDeclaration */: + case 272 /* NamespaceImport */: + case 212 /* NewExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - case 207 /* ObjectLiteralExpression */: - case 166 /* Parameter */: - case 208 /* PropertyAccessExpression */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 308 /* SourceFile */: - case 301 /* SpreadAssignment */: + case 208 /* ObjectLiteralExpression */: + case 167 /* Parameter */: + case 209 /* PropertyAccessExpression */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 309 /* SourceFile */: + case 302 /* SpreadAssignment */: case 10 /* StringLiteral */: - case 262 /* TypeAliasDeclaration */: - case 184 /* TypeLiteral */: - case 165 /* TypeParameter */: - case 257 /* VariableDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 185 /* TypeLiteral */: + case 166 /* TypeParameter */: + case 258 /* VariableDeclaration */: return true; default: return false; @@ -11080,53 +11110,53 @@ } function canHaveLocals(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 238 /* Block */: - case 176 /* CallSignature */: - case 266 /* CaseBlock */: - case 295 /* CatchClause */: - case 172 /* ClassStaticBlockDeclaration */: - case 191 /* ConditionalType */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: - case 178 /* IndexSignature */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 349 /* JSDocTypedefTag */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 175 /* SetAccessor */: - case 308 /* SourceFile */: - case 262 /* TypeAliasDeclaration */: + case 217 /* ArrowFunction */: + case 239 /* Block */: + case 177 /* CallSignature */: + case 267 /* CaseBlock */: + case 296 /* CatchClause */: + case 173 /* ClassStaticBlockDeclaration */: + case 192 /* ConditionalType */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: + case 179 /* IndexSignature */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 350 /* JSDocTypedefTag */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 176 /* SetAccessor */: + case 309 /* SourceFile */: + case 263 /* TypeAliasDeclaration */: return true; default: return false; } } function isDeclarationKind(kind) { - return kind === 216 /* ArrowFunction */ || kind === 205 /* BindingElement */ || kind === 260 /* ClassDeclaration */ || kind === 228 /* ClassExpression */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 173 /* Constructor */ || kind === 263 /* EnumDeclaration */ || kind === 302 /* EnumMember */ || kind === 278 /* ExportSpecifier */ || kind === 259 /* FunctionDeclaration */ || kind === 215 /* FunctionExpression */ || kind === 174 /* GetAccessor */ || kind === 270 /* ImportClause */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 273 /* ImportSpecifier */ || kind === 261 /* InterfaceDeclaration */ || kind === 288 /* JsxAttribute */ || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 264 /* ModuleDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 271 /* NamespaceImport */ || kind === 277 /* NamespaceExport */ || kind === 166 /* Parameter */ || kind === 299 /* PropertyAssignment */ || kind === 169 /* PropertyDeclaration */ || kind === 168 /* PropertySignature */ || kind === 175 /* SetAccessor */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 262 /* TypeAliasDeclaration */ || kind === 165 /* TypeParameter */ || kind === 257 /* VariableDeclaration */ || kind === 349 /* JSDocTypedefTag */ || kind === 341 /* JSDocCallbackTag */ || kind === 351 /* JSDocPropertyTag */; + return kind === 217 /* ArrowFunction */ || kind === 206 /* BindingElement */ || kind === 261 /* ClassDeclaration */ || kind === 229 /* ClassExpression */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 174 /* Constructor */ || kind === 264 /* EnumDeclaration */ || kind === 303 /* EnumMember */ || kind === 279 /* ExportSpecifier */ || kind === 260 /* FunctionDeclaration */ || kind === 216 /* FunctionExpression */ || kind === 175 /* GetAccessor */ || kind === 271 /* ImportClause */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 274 /* ImportSpecifier */ || kind === 262 /* InterfaceDeclaration */ || kind === 289 /* JsxAttribute */ || kind === 172 /* MethodDeclaration */ || kind === 171 /* MethodSignature */ || kind === 265 /* ModuleDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 272 /* NamespaceImport */ || kind === 278 /* NamespaceExport */ || kind === 167 /* Parameter */ || kind === 300 /* PropertyAssignment */ || kind === 170 /* PropertyDeclaration */ || kind === 169 /* PropertySignature */ || kind === 176 /* SetAccessor */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 263 /* TypeAliasDeclaration */ || kind === 166 /* TypeParameter */ || kind === 258 /* VariableDeclaration */ || kind === 350 /* JSDocTypedefTag */ || kind === 342 /* JSDocCallbackTag */ || kind === 352 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 259 /* FunctionDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 267 /* NamespaceExportDeclaration */; + return kind === 260 /* FunctionDeclaration */ || kind === 280 /* MissingDeclaration */ || kind === 261 /* ClassDeclaration */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 275 /* ExportAssignment */ || kind === 268 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 355 /* NotEmittedStatement */ || kind === 359 /* EndOfDeclarationMarker */ || kind === 358 /* MergeDeclarationMarker */; + return kind === 250 /* BreakStatement */ || kind === 249 /* ContinueStatement */ || kind === 257 /* DebuggerStatement */ || kind === 244 /* DoStatement */ || kind === 242 /* ExpressionStatement */ || kind === 240 /* EmptyStatement */ || kind === 247 /* ForInStatement */ || kind === 248 /* ForOfStatement */ || kind === 246 /* ForStatement */ || kind === 243 /* IfStatement */ || kind === 254 /* LabeledStatement */ || kind === 251 /* ReturnStatement */ || kind === 253 /* SwitchStatement */ || kind === 255 /* ThrowStatement */ || kind === 256 /* TryStatement */ || kind === 241 /* VariableStatement */ || kind === 245 /* WhileStatement */ || kind === 252 /* WithStatement */ || kind === 356 /* NotEmittedStatement */ || kind === 360 /* EndOfDeclarationMarker */ || kind === 359 /* MergeDeclarationMarker */; } function isDeclaration(node) { - if (node.kind === 165 /* TypeParameter */) { - return node.parent && node.parent.kind !== 348 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 166 /* TypeParameter */) { + return node.parent && node.parent.kind !== 349 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -11141,10 +11171,10 @@ return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 238 /* Block */) + if (node.kind !== 239 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 255 /* TryStatement */ || node.parent.kind === 295 /* CatchClause */) { + if (node.parent.kind === 256 /* TryStatement */ || node.parent.kind === 296 /* CatchClause */) { return false; } } @@ -11152,47 +11182,47 @@ } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 238 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 239 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 280 /* ExternalModuleReference */ || kind === 163 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 281 /* ExternalModuleReference */ || kind === 164 /* QualifiedName */ || kind === 79 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 108 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 208 /* PropertyAccessExpression */; + return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 209 /* PropertyAccessExpression */; } function isJsxChild(node) { const kind = node.kind; - return kind === 281 /* JsxElement */ || kind === 291 /* JsxExpression */ || kind === 282 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 285 /* JsxFragment */; + return kind === 282 /* JsxElement */ || kind === 292 /* JsxExpression */ || kind === 283 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 286 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 288 /* JsxAttribute */ || kind === 290 /* JsxSpreadAttribute */; + return kind === 289 /* JsxAttribute */ || kind === 291 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 10 /* StringLiteral */ || kind === 291 /* JsxExpression */; + return kind === 10 /* StringLiteral */ || kind === 292 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 283 /* JsxOpeningElement */ || kind === 282 /* JsxSelfClosingElement */; + return kind === 284 /* JsxOpeningElement */ || kind === 283 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */; + return kind === 293 /* CaseClause */ || kind === 294 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */; + return node.kind >= 313 /* FirstJSDocNode */ && node.kind <= 354 /* LastJSDocNode */; } function isJSDocTag(node) { - return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */; + return node.kind >= 331 /* FirstJSDocTagNode */ && node.kind <= 354 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 175 /* SetAccessor */; + return node.kind === 176 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 174 /* GetAccessor */; + return node.kind === 175 /* GetAccessor */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) @@ -11208,19 +11238,19 @@ } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: - case 299 /* PropertyAssignment */: - case 302 /* EnumMember */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: + case 300 /* PropertyAssignment */: + case 303 /* EnumMember */: return true; default: return false; } } function isTypeReferenceType(node) { - return node.kind === 180 /* TypeReference */ || node.kind === 230 /* ExpressionWithTypeArguments */; + return node.kind === 181 /* TypeReference */ || node.kind === 231 /* ExpressionWithTypeArguments */; } var MAX_SMI_X86 = 1073741823; function guessIndentation(lines) { @@ -11248,7 +11278,7 @@ return node.kind === 10 /* StringLiteral */ || node.kind === 14 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 327 /* JSDocLink */ || node.kind === 328 /* JSDocLinkCode */ || node.kind === 329 /* JSDocLinkPlain */; + return node.kind === 328 /* JSDocLink */ || node.kind === 329 /* JSDocLinkCode */ || node.kind === 330 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -11256,7 +11286,7 @@ } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 321 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 322 /* JSDocVariadicType */; } // src/compiler/utilities.ts @@ -11437,7 +11467,7 @@ } } function getSourceFileOfNode(node) { - while (node && node.kind !== 308 /* SourceFile */) { + while (node && node.kind !== 309 /* SourceFile */) { node = node.parent; } return node; @@ -11450,11 +11480,11 @@ } function isStatementWithLocals(node) { switch (node.kind) { - case 238 /* Block */: - case 266 /* CaseBlock */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return true; } return false; @@ -11571,7 +11601,7 @@ if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 355 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return skipTrivia( @@ -12076,7 +12106,7 @@ } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 257 /* VariableDeclaration */ && node.parent.kind === 295 /* CatchClause */; + return node.kind === 258 /* VariableDeclaration */ && node.parent.kind === 296 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 10 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -12094,10 +12124,10 @@ return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 264 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 265 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 308 /* SourceFile */ || node.kind === 264 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 309 /* SourceFile */ || node.kind === 265 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { return !!(module2.flags & 1024 /* GlobalAugmentation */); @@ -12107,9 +12137,9 @@ } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return isExternalModule(node.parent); - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -12156,32 +12186,32 @@ } function isBlockScope(node, parentNode) { switch (node.kind) { - case 308 /* SourceFile */: - case 266 /* CaseBlock */: - case 295 /* CatchClause */: - case 264 /* ModuleDeclaration */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 169 /* PropertyDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: + case 309 /* SourceFile */: + case 267 /* CaseBlock */: + case 296 /* CatchClause */: + case 265 /* ModuleDeclaration */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 170 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return true; - case 238 /* Block */: + case 239 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; } function isAnyImportSyntax(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: return true; default: return false; @@ -12189,15 +12219,15 @@ } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 240 /* VariableStatement */: - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 241 /* VariableStatement */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: return true; default: return false; @@ -12226,7 +12256,7 @@ return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 164 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 165 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a2; @@ -12238,7 +12268,7 @@ case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; @@ -12251,20 +12281,20 @@ } function entityNameToString(name) { switch (name.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return "this"; case 80 /* PrivateIdentifier */: case 79 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 314 /* JSDocMemberName */: + case 315 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); default: return Debug.assertNever(name); @@ -12351,8 +12381,8 @@ pos ); scanner.scan(); - const start = scanner.getTokenPos(); - return createTextSpanFromBounds(start, scanner.getTextPos()); + const start = scanner.getTokenStart(); + return createTextSpanFromBounds(start, scanner.getTokenEnd()); } function scanTokenAtPosition(sourceFile, pos) { const scanner = createScanner( @@ -12370,7 +12400,7 @@ } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 238 /* Block */) { + if (node.body && node.body.kind === 239 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -12382,7 +12412,7 @@ function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 308 /* SourceFile */: { + case 309 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -12394,35 +12424,35 @@ } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 262 /* TypeAliasDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 271 /* NamespaceImport */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 263 /* TypeAliasDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 272 /* NamespaceImport */: errorNode = node.name; break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: { + case 293 /* CaseClause */: + case 294 /* DefaultClause */: { const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); } - case 250 /* ReturnStatement */: - case 226 /* YieldExpression */: { + case 251 /* ReturnStatement */: + case 227 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } @@ -12461,19 +12491,19 @@ return !!(getCombinedNodeFlags(node) & 1 /* Let */); } function isSuperCall(n) { - return n.kind === 210 /* CallExpression */ && n.expression.kind === 106 /* SuperKeyword */; + return n.kind === 211 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 210 /* CallExpression */ && n.expression.kind === 100 /* ImportKeyword */; + return n.kind === 211 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; } function isImportMeta(n) { - return isMetaProperty(n) && n.keywordToken === 100 /* ImportKeyword */ && n.name.escapedText === "meta"; + return isMetaProperty(n) && n.keywordToken === 101 /* ImportKeyword */ && n.name.escapedText === "meta"; } function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 241 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; + return node.kind === 242 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -12491,7 +12521,7 @@ return node.kind !== 11 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 166 /* Parameter */ || node.kind === 165 /* TypeParameter */ || node.kind === 215 /* FunctionExpression */ || node.kind === 216 /* ArrowFunction */ || node.kind === 214 /* ParenthesizedExpression */ || node.kind === 257 /* VariableDeclaration */ || node.kind === 278 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 167 /* Parameter */ || node.kind === 166 /* TypeParameter */ || node.kind === 216 /* FunctionExpression */ || node.kind === 217 /* ArrowFunction */ || node.kind === 215 /* ParenthesizedExpression */ || node.kind === 258 /* VariableDeclaration */ || node.kind === 279 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } var fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; @@ -12499,81 +12529,82 @@ var fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; var defaultLibReferenceRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (179 /* FirstTypeNode */ <= node.kind && node.kind <= 202 /* LastTypeNode */) { + if (180 /* FirstTypeNode */ <= node.kind && node.kind <= 203 /* LastTypeNode */) { return true; } switch (node.kind) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 152 /* StringKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 149 /* ObjectKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 153 /* StringKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 150 /* ObjectKeyword */: + case 156 /* UndefinedKeyword */: + case 105 /* NullKeyword */: + case 145 /* NeverKeyword */: return true; - case 114 /* VoidKeyword */: - return node.parent.kind !== 219 /* VoidExpression */; - case 230 /* ExpressionWithTypeArguments */: + case 115 /* VoidKeyword */: + return node.parent.kind !== 220 /* VoidExpression */; + case 231 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 165 /* TypeParameter */: - return node.parent.kind === 197 /* MappedType */ || node.parent.kind === 192 /* InferType */; + case 166 /* TypeParameter */: + return node.parent.kind === 198 /* MappedType */ || node.parent.kind === 193 /* InferType */; case 79 /* Identifier */: - if (node.parent.kind === 163 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 164 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 79 /* Identifier */ || node.kind === 163 /* QualifiedName */ || node.kind === 208 /* PropertyAccessExpression */, + node.kind === 79 /* Identifier */ || node.kind === 164 /* QualifiedName */ || node.kind === 209 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 163 /* QualifiedName */: - case 208 /* PropertyAccessExpression */: - case 108 /* ThisKeyword */: { + case 164 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 109 /* ThisKeyword */: { const { parent } = node; - if (parent.kind === 183 /* TypeQuery */) { + if (parent.kind === 184 /* TypeQuery */) { return false; } - if (parent.kind === 202 /* ImportType */) { + if (parent.kind === 203 /* ImportType */) { return !parent.isTypeOf; } - if (179 /* FirstTypeNode */ <= parent.kind && parent.kind <= 202 /* LastTypeNode */) { + if (180 /* FirstTypeNode */ <= parent.kind && parent.kind <= 203 /* LastTypeNode */) { return true; } switch (parent.kind) { - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isHeritageClause(parent.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent); - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return node === parent.constraint; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return node === parent.constraint; - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 166 /* Parameter */: - case 257 /* VariableDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 167 /* Parameter */: + case 258 /* VariableDeclaration */: return node === parent.type; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return node === parent.type; - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return node === parent.type; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return node === parent.type; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return contains(parent.typeArguments, node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return false; } } @@ -12593,23 +12624,23 @@ return traverse(body); function traverse(node) { switch (node.kind) { - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitor(node); - case 266 /* CaseBlock */: - case 238 /* Block */: - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 251 /* WithStatement */: - case 252 /* SwitchStatement */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 253 /* LabeledStatement */: - case 255 /* TryStatement */: - case 295 /* CatchClause */: + case 267 /* CaseBlock */: + case 239 /* Block */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 252 /* WithStatement */: + case 253 /* SwitchStatement */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 254 /* LabeledStatement */: + case 256 /* TryStatement */: + case 296 /* CatchClause */: return forEachChild(node, traverse); } } @@ -12618,21 +12649,21 @@ return traverse(body); function traverse(node) { switch (node.kind) { - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 263 /* EnumDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 165 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -12643,9 +12674,9 @@ } } function getRestParameterElementType(node) { - if (node && node.kind === 185 /* ArrayType */) { + if (node && node.kind === 186 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 180 /* TypeReference */) { + } else if (node && node.kind === 181 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -12653,26 +12684,26 @@ } function getMembersOfDeclaration(node) { switch (node.kind) { - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 184 /* TypeLiteral */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 185 /* TypeLiteral */: return node.members; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 205 /* BindingElement */: - case 302 /* EnumMember */: - case 166 /* Parameter */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 300 /* ShorthandPropertyAssignment */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 303 /* EnumMember */: + case 167 /* Parameter */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 301 /* ShorthandPropertyAssignment */: + case 258 /* VariableDeclaration */: return true; } } @@ -12682,7 +12713,7 @@ return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 258 /* VariableDeclarationList */ && node.parent.parent.kind === 240 /* VariableStatement */; + return node.parent.kind === 259 /* VariableDeclarationList */ && node.parent.parent.kind === 241 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -12699,13 +12730,13 @@ } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return true; } return false; @@ -12715,27 +12746,27 @@ if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 253 /* LabeledStatement */) { + if (node.statement.kind !== 254 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 238 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 239 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 171 /* MethodDeclaration */ && node.parent.kind === 207 /* ObjectLiteralExpression */; + return node && node.kind === 172 /* MethodDeclaration */ && node.parent.kind === 208 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 171 /* MethodDeclaration */ || node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */) && (node.parent.kind === 207 /* ObjectLiteralExpression */ || node.parent.kind === 228 /* ClassExpression */); + return (node.kind === 172 /* MethodDeclaration */ || node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */) && (node.parent.kind === 208 /* ObjectLiteralExpression */ || node.parent.kind === 229 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; } function getPropertyAssignment(objectLiteral, key, key2) { return objectLiteral.properties.filter((property) => { - if (property.kind === 299 /* PropertyAssignment */) { + if (property.kind === 300 /* PropertyAssignment */) { const propName = tryGetTextOfPropertyName(property.name); return key === propName || !!key2 && key2 === propName; } @@ -12764,67 +12795,75 @@ function getContainingClass(node) { return findAncestor(node.parent, isClassLike); } +function getContainingClassStaticBlock(node) { + return findAncestor(node.parent, (n) => { + if (isClassLike(n) || isFunctionLike(n)) { + return "quit"; + } + return isClassStaticBlockDeclaration(n); + }); +} function getContainingFunctionOrClassStaticBlock(node) { return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration); } function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) { - Debug.assert(node.kind !== 308 /* SourceFile */); + Debug.assert(node.kind !== 309 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) { return node; } node = node.parent.parent; break; - case 167 /* Decorator */: - if (node.parent.kind === 166 /* Parameter */ && isClassElement(node.parent.parent)) { + case 168 /* Decorator */: + if (node.parent.kind === 167 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 264 /* ModuleDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 263 /* EnumDeclaration */: - case 308 /* SourceFile */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 265 /* ModuleDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 264 /* EnumDeclaration */: + case 309 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 169 /* PropertyDeclaration */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 170 /* PropertyDeclaration */: return true; - case 238 /* Block */: + case 239 /* Block */: switch (node.parent.kind) { - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -12856,9 +12895,9 @@ ); if (container) { switch (container.kind) { - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return container; } } @@ -12871,26 +12910,26 @@ return void 0; } switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: node = node.parent; break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: return node; - case 167 /* Decorator */: - if (node.parent.kind === 166 /* Parameter */ && isClassElement(node.parent.parent)) { + case 168 /* Decorator */: + if (node.parent.kind === 167 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -12900,51 +12939,51 @@ } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 215 /* FunctionExpression */ || func.kind === 216 /* ArrowFunction */) { + if (func.kind === 216 /* FunctionExpression */ || func.kind === 217 /* ArrowFunction */) { let prev = func; let parent = func.parent; - while (parent.kind === 214 /* ParenthesizedExpression */) { + while (parent.kind === 215 /* ParenthesizedExpression */) { prev = parent; parent = parent.parent; } - if (parent.kind === 210 /* CallExpression */ && parent.expression === prev) { + if (parent.kind === 211 /* CallExpression */ && parent.expression === prev) { return parent; } } } function isSuperProperty(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && node.expression.kind === 106 /* SuperKeyword */; + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && node.expression.kind === 108 /* ThisKeyword */; + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a2; - return !!node && isVariableDeclaration(node) && ((_a2 = node.initializer) == null ? void 0 : _a2.kind) === 108 /* ThisKeyword */; + return !!node && isVariableDeclaration(node) && ((_a2 = node.initializer) == null ? void 0 : _a2.kind) === 109 /* ThisKeyword */; } function isThisInitializedObjectBindingExpression(node) { - return !!node && (isShorthandPropertyAssignment(node) || isPropertyAssignment(node)) && isBinaryExpression(node.parent.parent) && node.parent.parent.operatorToken.kind === 63 /* EqualsToken */ && node.parent.parent.right.kind === 108 /* ThisKeyword */; + return !!node && (isShorthandPropertyAssignment(node) || isPropertyAssignment(node)) && isBinaryExpression(node.parent.parent) && node.parent.parent.operatorToken.kind === 63 /* EqualsToken */ && node.parent.parent.right.kind === 109 /* ThisKeyword */; } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 79 /* Identifier */: - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return node.tag; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -12955,20 +12994,20 @@ return false; } switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return true; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return !useLegacyDecorators; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return parent !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent) : isClassLike(parent) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: return node.body !== void 0 && parent !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent) : isClassLike(parent)); - case 166 /* Parameter */: + case 167 /* Parameter */: if (!useLegacyDecorators) return false; - return parent !== void 0 && parent.body !== void 0 && (parent.kind === 173 /* Constructor */ || parent.kind === 171 /* MethodDeclaration */ || parent.kind === 175 /* SetAccessor */) && getThisParameter(parent) !== node && grandparent !== void 0 && grandparent.kind === 260 /* ClassDeclaration */; + return parent !== void 0 && parent.body !== void 0 && (parent.kind === 174 /* Constructor */ || parent.kind === 172 /* MethodDeclaration */ || parent.kind === 176 /* SetAccessor */) && getThisParameter(parent) !== node && grandparent !== void 0 && grandparent.kind === 261 /* ClassDeclaration */; } return false; } @@ -12980,13 +13019,13 @@ } function childIsDecorated(useLegacyDecorators, node, parent) { switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent)); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent)); - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent)); default: return false; @@ -13037,73 +13076,73 @@ } function isJSXTagName(node) { const { parent } = node; - if (parent.kind === 283 /* JsxOpeningElement */ || parent.kind === 282 /* JsxSelfClosingElement */ || parent.kind === 284 /* JsxClosingElement */) { + if (parent.kind === 284 /* JsxOpeningElement */ || parent.kind === 283 /* JsxSelfClosingElement */ || parent.kind === 285 /* JsxClosingElement */) { return parent.tagName === node; } return false; } function isExpressionNode(node) { switch (node.kind) { - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 13 /* RegularExpressionLiteral */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 231 /* AsExpression */: - case 213 /* TypeAssertionExpression */: - case 235 /* SatisfiesExpression */: - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 218 /* TypeOfExpression */: - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: - case 223 /* BinaryExpression */: - case 224 /* ConditionalExpression */: - case 227 /* SpreadElement */: - case 225 /* TemplateExpression */: - case 229 /* OmittedExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: - case 226 /* YieldExpression */: - case 220 /* AwaitExpression */: - case 233 /* MetaProperty */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 232 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 236 /* SatisfiesExpression */: + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 219 /* TypeOfExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 224 /* BinaryExpression */: + case 225 /* ConditionalExpression */: + case 228 /* SpreadElement */: + case 226 /* TemplateExpression */: + case 230 /* OmittedExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: + case 227 /* YieldExpression */: + case 221 /* AwaitExpression */: + case 234 /* MetaProperty */: return true; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); - case 163 /* QualifiedName */: - while (node.parent.kind === 163 /* QualifiedName */) { + case 164 /* QualifiedName */: + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 314 /* JSDocMemberName */: + return node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 315 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); case 80 /* PrivateIdentifier */: - return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 101 /* InKeyword */; + return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 102 /* InKeyword */; case 79 /* Identifier */: - if (node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return isInExpressionContext(node); default: return false; @@ -13112,64 +13151,64 @@ function isInExpressionContext(node) { const { parent } = node; switch (parent.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 302 /* EnumMember */: - case 299 /* PropertyAssignment */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 303 /* EnumMember */: + case 300 /* PropertyAssignment */: + case 206 /* BindingElement */: return parent.initializer === node; - case 241 /* ExpressionStatement */: - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 250 /* ReturnStatement */: - case 251 /* WithStatement */: - case 252 /* SwitchStatement */: - case 292 /* CaseClause */: - case 254 /* ThrowStatement */: + case 242 /* ExpressionStatement */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 251 /* ReturnStatement */: + case 252 /* WithStatement */: + case 253 /* SwitchStatement */: + case 293 /* CaseClause */: + case 255 /* ThrowStatement */: return parent.expression === node; - case 245 /* ForStatement */: + case 246 /* ForStatement */: const forStatement = parent; - return forStatement.initializer === node && forStatement.initializer.kind !== 258 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 259 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: const forInStatement = parent; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 258 /* VariableDeclarationList */ || forInStatement.expression === node; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 259 /* VariableDeclarationList */ || forInStatement.expression === node; + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return node === parent.expression; - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return node === parent.expression; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return node === parent.expression; - case 167 /* Decorator */: - case 291 /* JsxExpression */: - case 290 /* JsxSpreadAttribute */: - case 301 /* SpreadAssignment */: + case 168 /* Decorator */: + case 292 /* JsxExpression */: + case 291 /* JsxSpreadAttribute */: + case 302 /* SpreadAssignment */: return true; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return parent.expression === node && !isPartOfTypeNode(parent); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return parent.objectAssignmentInitializer === node; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return node === parent.expression; default: return isExpressionNode(parent); } } function isPartOfTypeQuery(node) { - while (node.kind === 163 /* QualifiedName */ || node.kind === 79 /* Identifier */) { + while (node.kind === 164 /* QualifiedName */ || node.kind === 79 /* Identifier */) { node = node.parent; } - return node.kind === 183 /* TypeQuery */; + return node.kind === 184 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 280 /* ExternalModuleReference */; + return node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 281 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -13179,7 +13218,7 @@ return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 280 /* ExternalModuleReference */; + return node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 281 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -13197,10 +13236,10 @@ return !!node && !!(node.flags & 8388608 /* JSDoc */); } function isJSDocIndexSignature(node) { - return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 152 /* StringKeyword */ || node.typeArguments[0].kind === 148 /* NumberKeyword */); + return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 153 /* StringKeyword */ || node.typeArguments[0].kind === 149 /* NumberKeyword */); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 210 /* CallExpression */) { + if (callExpression.kind !== 211 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -13277,9 +13316,9 @@ function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 215 /* FunctionExpression */ || e.kind === 216 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 216 /* FunctionExpression */ || e.kind === 217 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 215 /* FunctionExpression */ || initializer.kind === 228 /* ClassExpression */ || initializer.kind === 216 /* ArrowFunction */) { + if (initializer.kind === 216 /* FunctionExpression */ || initializer.kind === 229 /* ClassExpression */ || initializer.kind === 217 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -13310,7 +13349,7 @@ if (isPropertyNameLiteral(name) && isPropertyNameLiteral(initializer)) { return getTextOfIdentifierOrLiteral(name) === getTextOfIdentifierOrLiteral(initializer); } - if (isMemberName(name) && isLiteralLikeAccess(initializer) && (initializer.expression.kind === 108 /* ThisKeyword */ || isIdentifier(initializer.expression) && (initializer.expression.escapedText === "window" || initializer.expression.escapedText === "self" || initializer.expression.escapedText === "global"))) { + if (isMemberName(name) && isLiteralLikeAccess(initializer) && (initializer.expression.kind === 109 /* ThisKeyword */ || isIdentifier(initializer.expression) && (initializer.expression.escapedText === "window" || initializer.expression.escapedText === "self" || initializer.expression.escapedText === "global"))) { return isSameEntityName(name, getNameOrArgument(initializer)); } if (isLiteralLikeAccess(name) && isLiteralLikeAccess(initializer)) { @@ -13355,14 +13394,14 @@ return isElementAccessExpression(node) && isStringOrNumericLiteralLike(node.argumentExpression); } function isBindableStaticAccessExpression(node, excludeThisKeyword) { - return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 108 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( + return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 109 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( node.expression, /*excludeThisKeyword*/ true )) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 108 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( + return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 109 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( node.expression, /*excludeThisKeyword*/ true @@ -13429,7 +13468,7 @@ return void 0; } function getAssignmentDeclarationPropertyAccessKind(lhs) { - if (lhs.expression.kind === 108 /* ThisKeyword */) { + if (lhs.expression.kind === 109 /* ThisKeyword */) { return 4 /* ThisProperty */; } else if (isModuleExportsAccessExpression(lhs)) { return 2 /* ModuleExports */; @@ -13470,7 +13509,7 @@ return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 241 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 242 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; @@ -13483,29 +13522,29 @@ return false; } const decl = symbol.valueDeclaration; - return decl.kind === 259 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 260 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a2, _b; switch (node.kind) { - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: return (_a2 = findAncestor(node.initializer, (node2) => isRequireCall( node2, /*requireStringLiteralLikeArgument*/ true ))) == null ? void 0 : _a2.arguments[0]; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); - case 270 /* ImportClause */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 278 /* NamespaceExport */: return tryCast(node.parent.moduleSpecifier, isStringLiteralLike); - case 271 /* NamespaceImport */: - case 278 /* ExportSpecifier */: + case 272 /* NamespaceImport */: + case 279 /* ExportSpecifier */: return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); default: Debug.assertNever(node); @@ -13513,16 +13552,16 @@ } function getExternalModuleName(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: return node.moduleSpecifier; - case 268 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 280 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 202 /* ImportType */: + case 269 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 281 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 203 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return node.arguments[0]; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return node.name.kind === 10 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -13530,18 +13569,18 @@ } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return node; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 269 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 270 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -13558,13 +13597,13 @@ function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 166 /* Parameter */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 300 /* ShorthandPropertyAssignment */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 167 /* Parameter */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 301 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -13576,7 +13615,7 @@ return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 349 /* JSDocTypedefTag */ || node.kind === 341 /* JSDocCallbackTag */ || node.kind === 343 /* JSDocEnumTag */; + return node.kind === 350 /* JSDocTypedefTag */ || node.kind === 342 /* JSDocCallbackTag */ || node.kind === 344 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -13589,12 +13628,12 @@ } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return node.initializer; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return node.initializer; } } @@ -13602,26 +13641,26 @@ return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 264 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 265 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveFlowNode(node) { - if (node.kind >= 240 /* FirstStatement */ && node.kind <= 256 /* LastStatement */) { + if (node.kind >= 241 /* FirstStatement */ && node.kind <= 257 /* LastStatement */) { return true; } switch (node.kind) { case 79 /* Identifier */: - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 163 /* QualifiedName */: - case 233 /* MetaProperty */: - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: - case 205 /* BindingElement */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 164 /* QualifiedName */: + case 234 /* MetaProperty */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 206 /* BindingElement */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -13629,71 +13668,71 @@ } function canHaveJSDoc(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 238 /* Block */: - case 249 /* BreakStatement */: - case 176 /* CallSignature */: - case 292 /* CaseClause */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 172 /* ClassStaticBlockDeclaration */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 248 /* ContinueStatement */: - case 256 /* DebuggerStatement */: - case 243 /* DoStatement */: - case 209 /* ElementAccessExpression */: - case 239 /* EmptyStatement */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 239 /* Block */: + case 250 /* BreakStatement */: + case 177 /* CallSignature */: + case 293 /* CaseClause */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 173 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 249 /* ContinueStatement */: + case 257 /* DebuggerStatement */: + case 244 /* DoStatement */: + case 210 /* ElementAccessExpression */: + case 240 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: - case 278 /* ExportSpecifier */: - case 241 /* ExpressionStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: + case 279 /* ExportSpecifier */: + case 242 /* ExpressionStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: case 79 /* Identifier */: - case 242 /* IfStatement */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 253 /* LabeledStatement */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 199 /* NamedTupleMember */: - case 267 /* NamespaceExportDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 166 /* Parameter */: - case 214 /* ParenthesizedExpression */: - case 208 /* PropertyAccessExpression */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 250 /* ReturnStatement */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: - case 252 /* SwitchStatement */: - case 254 /* ThrowStatement */: - case 255 /* TryStatement */: - case 262 /* TypeAliasDeclaration */: - case 165 /* TypeParameter */: - case 257 /* VariableDeclaration */: - case 240 /* VariableStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: + case 243 /* IfStatement */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 254 /* LabeledStatement */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 200 /* NamedTupleMember */: + case 268 /* NamespaceExportDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 167 /* Parameter */: + case 215 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 251 /* ReturnStatement */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: + case 253 /* SwitchStatement */: + case 255 /* ThrowStatement */: + case 256 /* TryStatement */: + case 263 /* TypeAliasDeclaration */: + case 166 /* TypeParameter */: + case 258 /* VariableDeclaration */: + case 241 /* VariableStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: return true; default: return false; @@ -13709,11 +13748,11 @@ if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 166 /* Parameter */) { + if (node.kind === 167 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 165 /* TypeParameter */) { + if (node.kind === 166 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -13733,7 +13772,7 @@ } function getNextJSDocCommentLocation(node) { const parent = node.parent; - if (parent.kind === 299 /* PropertyAssignment */ || parent.kind === 274 /* ExportAssignment */ || parent.kind === 169 /* PropertyDeclaration */ || parent.kind === 241 /* ExpressionStatement */ && node.kind === 208 /* PropertyAccessExpression */ || parent.kind === 250 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { + if (parent.kind === 300 /* PropertyAssignment */ || parent.kind === 275 /* ExportAssignment */ || parent.kind === 170 /* PropertyDeclaration */ || parent.kind === 242 /* ExpressionStatement */ && node.kind === 209 /* PropertyAccessExpression */ || parent.kind === 251 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { return parent; } else if (parent.parent && (getSingleVariableOfVariableStatement(parent.parent) === node || isBinaryExpression(parent) && parent.operatorToken.kind === 63 /* EqualsToken */)) { return parent.parent; @@ -13800,32 +13839,32 @@ let parent = node.parent; while (true) { switch (parent.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const binaryOperator = parent.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent.left === node ? binaryOperator === 63 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: const unaryOperator = parent.operator; return unaryOperator === 45 /* PlusPlusToken */ || unaryOperator === 46 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return parent.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 214 /* ParenthesizedExpression */: - case 206 /* ArrayLiteralExpression */: - case 227 /* SpreadElement */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 207 /* ArrayLiteralExpression */: + case 228 /* SpreadElement */: + case 233 /* NonNullExpression */: node = parent; break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: node = parent.parent; break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: if (parent.name !== node) { return 0 /* None */; } node = parent.parent; break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (parent.name === node) { return 0 /* None */; } @@ -13842,22 +13881,22 @@ } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 238 /* Block */: - case 240 /* VariableStatement */: - case 251 /* WithStatement */: - case 242 /* IfStatement */: - case 252 /* SwitchStatement */: - case 266 /* CaseBlock */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 253 /* LabeledStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 255 /* TryStatement */: - case 295 /* CatchClause */: + case 239 /* Block */: + case 241 /* VariableStatement */: + case 252 /* WithStatement */: + case 243 /* IfStatement */: + case 253 /* SwitchStatement */: + case 267 /* CaseBlock */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 254 /* LabeledStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 256 /* TryStatement */: + case 296 /* CatchClause */: return true; } return false; @@ -13872,14 +13911,14 @@ return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 193 /* ParenthesizedType */); + return walkUp(node, 194 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 214 /* ParenthesizedExpression */); + return walkUp(node, 215 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 193 /* ParenthesizedType */) { + while (node && node.kind === 194 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -13895,11 +13934,11 @@ return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 208 /* PropertyAccessExpression */ && node.kind !== 209 /* ElementAccessExpression */) { + if (node.kind !== 209 /* PropertyAccessExpression */ && node.kind !== 210 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 217 /* DeleteExpression */; + return node && node.kind === 218 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -13913,49 +13952,49 @@ return !isSourceFile(name) && !isBindingPattern(name) && isDeclaration(name.parent) && name.parent.name === name; } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 164 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 165 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent = node.parent; switch (parent.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 302 /* EnumMember */: - case 299 /* PropertyAssignment */: - case 208 /* PropertyAccessExpression */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 303 /* EnumMember */: + case 300 /* PropertyAssignment */: + case 209 /* PropertyAccessExpression */: return parent.name === node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return parent.right === node; - case 205 /* BindingElement */: - case 273 /* ImportSpecifier */: + case 206 /* BindingElement */: + case 274 /* ImportSpecifier */: return parent.propertyName === node; - case 278 /* ExportSpecifier */: - case 288 /* JsxAttribute */: - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: + case 279 /* ExportSpecifier */: + case 289 /* JsxAttribute */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: return true; } return false; } function getAliasDeclarationFromName(node) { switch (node.parent.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 271 /* NamespaceImport */: - case 278 /* ExportSpecifier */: - case 274 /* ExportAssignment */: - case 268 /* ImportEqualsDeclaration */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 272 /* NamespaceImport */: + case 279 /* ExportSpecifier */: + case 275 /* ExportAssignment */: + case 269 /* ImportEqualsDeclaration */: + case 278 /* NamespaceExport */: return node.parent; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 163 /* QualifiedName */); + } while (node.parent.kind === 164 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -13970,7 +14009,7 @@ return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 300 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 299 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 301 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 300 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -13983,19 +14022,19 @@ return baseType; } function getClassExtendsHeritageElement(node) { - const heritageClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : void 0; } function getEffectiveImplementsTypeNodes(node) { if (isInJSFile(node)) { return getJSDocImplementsTags(node).map((n) => n.class); } else { - const heritageClause = getHeritageClause(node.heritageClauses, 117 /* ImplementsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 118 /* ImplementsKeyword */); return heritageClause == null ? void 0 : heritageClause.types; } } function getInterfaceBaseTypeNodes(node) { - const heritageClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); return heritageClause ? heritageClause.types : void 0; } function getHeritageClause(clauses, kind) { @@ -14018,10 +14057,10 @@ return void 0; } function isKeyword(token) { - return 81 /* FirstKeyword */ <= token && token <= 162 /* LastKeyword */; + return 82 /* FirstKeyword */ <= token && token <= 163 /* LastKeyword */; } function isContextualKeyword(token) { - return 126 /* FirstContextualKeyword */ <= token && token <= 162 /* LastContextualKeyword */; + return 127 /* FirstContextualKeyword */ <= token && token <= 163 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); @@ -14040,13 +14079,13 @@ } let flags = 0 /* Normal */; switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -14059,10 +14098,10 @@ } function isAsyncFunction(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -14078,7 +14117,7 @@ return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 164 /* ComputedPropertyName */ || name.kind === 209 /* ElementAccessExpression */)) { + if (!(name.kind === 165 /* ComputedPropertyName */ || name.kind === 210 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -14092,7 +14131,7 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -14136,13 +14175,13 @@ function isAnonymousFunctionDefinition(node, cb) { node = skipOuterExpressions(node); switch (node.kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: if (node.name) { return false; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: break; default: return false; @@ -14151,19 +14190,19 @@ } function isNamedEvaluationSource(node) { switch (node.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return !isProtoSetter(node.name); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return !!node.objectAssignmentInitializer; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return isIdentifier(node.name) && !!node.initializer; - case 166 /* Parameter */: + case 167 /* Parameter */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return !!node.initializer; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 76 /* AmpersandAmpersandEqualsToken */: @@ -14172,7 +14211,7 @@ return isIdentifier(node.left); } break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return true; } return false; @@ -14181,18 +14220,18 @@ if (!isNamedEvaluationSource(node)) return false; switch (node.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb); - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isAnonymousFunctionDefinition(node.right, cb); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return isAnonymousFunctionDefinition(node.expression, cb); } } @@ -14201,39 +14240,39 @@ } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 166 /* Parameter */; + return root.kind === 167 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 205 /* BindingElement */) { + while (node.kind === 206 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 215 /* FunctionExpression */ || kind === 259 /* FunctionDeclaration */ || kind === 216 /* ArrowFunction */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 264 /* ModuleDeclaration */ || kind === 308 /* SourceFile */; + return kind === 174 /* Constructor */ || kind === 216 /* FunctionExpression */ || kind === 260 /* FunctionDeclaration */ || kind === 217 /* ArrowFunction */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 265 /* ModuleDeclaration */ || kind === 309 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); } function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 211 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 212 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 211 /* NewExpression */: + case 212 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 221 /* PrefixUnaryExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 220 /* AwaitExpression */: - case 224 /* ConditionalExpression */: - case 226 /* YieldExpression */: + case 222 /* PrefixUnaryExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 221 /* AwaitExpression */: + case 225 /* ConditionalExpression */: + case 227 /* YieldExpression */: return 1 /* Right */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (operator) { case 42 /* AsteriskAsteriskToken */: case 63 /* EqualsToken */: @@ -14259,13 +14298,13 @@ } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 211 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 212 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 223 /* BinaryExpression */) { + if (expression.kind === 224 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 221 /* PrefixUnaryExpression */ || expression.kind === 222 /* PostfixUnaryExpression */) { + } else if (expression.kind === 222 /* PrefixUnaryExpression */ || expression.kind === 223 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -14273,15 +14312,15 @@ } function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return 0 /* Comma */; - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return 1 /* Spread */; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return 2 /* Yield */; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return 4 /* Conditional */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (operatorKind) { case 27 /* CommaToken */: return 0 /* Comma */; @@ -14305,51 +14344,51 @@ default: return getBinaryOperatorPrecedence(operatorKind); } - case 213 /* TypeAssertionExpression */: - case 232 /* NonNullExpression */: - case 221 /* PrefixUnaryExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 220 /* AwaitExpression */: + case 214 /* TypeAssertionExpression */: + case 233 /* NonNullExpression */: + case 222 /* PrefixUnaryExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 221 /* AwaitExpression */: return 16 /* Unary */; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return 17 /* Update */; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return 18 /* LeftHandSide */; - case 211 /* NewExpression */: + case 212 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 212 /* TaggedTemplateExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 233 /* MetaProperty */: + case 213 /* TaggedTemplateExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 234 /* MetaProperty */: return 19 /* Member */; - case 231 /* AsExpression */: - case 235 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 236 /* SatisfiesExpression */: return 11 /* Relational */; - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 228 /* ClassExpression */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 229 /* ClassExpression */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 214 /* ParenthesizedExpression */: - case 229 /* OmittedExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: + case 226 /* TemplateExpression */: + case 215 /* ParenthesizedExpression */: + case 230 /* OmittedExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -14378,10 +14417,10 @@ case 31 /* GreaterThanToken */: case 32 /* LessThanEqualsToken */: case 33 /* GreaterThanEqualsToken */: - case 102 /* InstanceOfKeyword */: - case 101 /* InKeyword */: - case 128 /* AsKeyword */: - case 150 /* SatisfiesKeyword */: + case 103 /* InstanceOfKeyword */: + case 102 /* InKeyword */: + case 129 /* AsKeyword */: + case 151 /* SatisfiesKeyword */: return 11 /* Relational */; case 47 /* LessThanLessThanToken */: case 48 /* GreaterThanGreaterThanToken */: @@ -14402,7 +14441,7 @@ function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return !!i.expression; case 11 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -14906,7 +14945,7 @@ while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */; + return node.parent.kind === 184 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.escapedText === "this"; @@ -14918,9 +14957,9 @@ let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 174 /* GetAccessor */) { + if (accessor.kind === 175 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 175 /* SetAccessor */) { + } else if (accessor.kind === 176 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -14936,10 +14975,10 @@ } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 174 /* GetAccessor */ && !getAccessor) { + if (member.kind === 175 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 175 /* SetAccessor */ && !setAccessor) { + if (member.kind === 176 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -14968,7 +15007,7 @@ return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 323 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 324 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -15158,7 +15197,7 @@ return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 162 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 163 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -15224,37 +15263,37 @@ } function modifierToFlag(token) { switch (token) { - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: return 32 /* Static */; - case 123 /* PublicKeyword */: + case 124 /* PublicKeyword */: return 4 /* Public */; - case 122 /* ProtectedKeyword */: + case 123 /* ProtectedKeyword */: return 16 /* Protected */; - case 121 /* PrivateKeyword */: + case 122 /* PrivateKeyword */: return 8 /* Private */; - case 126 /* AbstractKeyword */: + case 127 /* AbstractKeyword */: return 256 /* Abstract */; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return 128 /* Accessor */; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return 1 /* Export */; - case 136 /* DeclareKeyword */: + case 137 /* DeclareKeyword */: return 2 /* Ambient */; - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: return 2048 /* Const */; - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return 1024 /* Default */; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return 512 /* Async */; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: return 64 /* Readonly */; - case 161 /* OverrideKeyword */: + case 162 /* OverrideKeyword */: return 16384 /* Override */; - case 101 /* InKeyword */: + case 102 /* InKeyword */: return 32768 /* In */; - case 145 /* OutKeyword */: + case 146 /* OutKeyword */: return 65536 /* Out */; - case 167 /* Decorator */: + case 168 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -15287,7 +15326,7 @@ function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node) { if (isExpressionWithTypeArguments(node)) { if (isHeritageClause(node.parent) && isClassLike(node.parent.parent)) { - return { class: node.parent.parent, isImplements: node.parent.token === 117 /* ImplementsKeyword */ }; + return { class: node.parent.parent, isImplements: node.parent.token === 118 /* ImplementsKeyword */ }; } if (isJSDocAugmentsTag(node.parent)) { const host = getEffectiveJSDocHost(node.parent); @@ -15308,7 +15347,7 @@ true )) { const kind = node.left.kind; - return kind === 207 /* ObjectLiteralExpression */ || kind === 206 /* ArrayLiteralExpression */; + return kind === 208 /* ObjectLiteralExpression */ || kind === 207 /* ArrayLiteralExpression */; } return false; } @@ -15322,12 +15361,12 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 79 /* Identifier */); @@ -15335,7 +15374,7 @@ } } function isDottedName(node) { - return node.kind === 79 /* Identifier */ || node.kind === 108 /* ThisKeyword */ || node.kind === 106 /* SuperKeyword */ || node.kind === 233 /* MetaProperty */ || node.kind === 208 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 214 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 234 /* MetaProperty */ || node.kind === 209 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 215 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -15360,16 +15399,16 @@ return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 163 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 164 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.name === node; } function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } function isEmptyObjectLiteral(expression) { - return expression.kind === 207 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 208 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 206 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 207 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -15574,8 +15613,8 @@ const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 263 /* EnumDeclaration */: - case 264 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -15624,34 +15663,29 @@ } function accessKind(node) { const { parent } = node; - if (!parent) - return 0 /* Read */; - switch (parent.kind) { - case 214 /* ParenthesizedExpression */: + switch (parent == null ? void 0 : parent.kind) { + case 215 /* ParenthesizedExpression */: return accessKind(parent); - case 222 /* PostfixUnaryExpression */: - case 221 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const { operator } = parent; - return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? writeOrReadWrite() : 0 /* Read */; - case 223 /* BinaryExpression */: + return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */; + case 224 /* BinaryExpression */: const { left, operatorToken } = parent; - return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : writeOrReadWrite() : 0 /* Read */; - case 208 /* PropertyAccessExpression */: + return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */; + case 209 /* PropertyAccessExpression */: return parent.name !== node ? 0 /* Read */ : accessKind(parent); - case 299 /* PropertyAssignment */: { + case 300 /* PropertyAssignment */: { const parentAccess = accessKind(parent.parent); return node === parent.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return node === parent.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent.parent); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return accessKind(parent); default: return 0 /* Read */; } - function writeOrReadWrite() { - return parent.parent && walkUpParenthesizedExpressions(parent.parent).kind === 241 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; - } } function reverseAccessKind(a) { switch (a) { @@ -15737,10 +15771,10 @@ return lastChild; } function isTypeNodeKind(kind) { - return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 139 /* IntrinsicKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */; + return kind >= 180 /* FirstTypeNode */ && kind <= 203 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 158 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 161 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 156 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 140 /* IntrinsicKeyword */ || kind === 231 /* ExpressionWithTypeArguments */ || kind === 316 /* JSDocAllType */ || kind === 317 /* JSDocUnknownType */ || kind === 318 /* JSDocNullableType */ || kind === 319 /* JSDocNonNullableType */ || kind === 320 /* JSDocOptionalType */ || kind === 321 /* JSDocFunctionType */ || kind === 322 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */; + return node.kind === 209 /* PropertyAccessExpression */ || node.kind === 210 /* ElementAccessExpression */; } function isBundleFileTextLike(section) { switch (section.kind) { @@ -15760,28 +15794,28 @@ function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: node = node.operand; continue; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: node = node.left; continue; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: node = node.condition; continue; - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: node = node.tag; continue; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 231 /* AsExpression */: - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: - case 232 /* NonNullExpression */: - case 356 /* PartiallyEmittedExpression */: - case 235 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 233 /* NonNullExpression */: + case 357 /* PartiallyEmittedExpression */: + case 236 /* SatisfiesExpression */: node = node.expression; continue; } @@ -16858,7 +16892,7 @@ result = scanner.scan(); } const flags = scanner.getTokenFlags(); - return success && result === 9 /* BigIntLiteral */ && scanner.getTextPos() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner.getTokenValue()) })); + return success && result === 9 /* BigIntLiteral */ && scanner.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner.getTokenValue()) })); } function isValidTypeOnlyAliasUseSite(useSite) { return !!(useSite.flags & 16777216 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); @@ -16867,33 +16901,33 @@ return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 79 /* Identifier */ || node.kind === 208 /* PropertyAccessExpression */) { + while (node.kind === 79 /* Identifier */ || node.kind === 209 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 164 /* ComputedPropertyName */) { + if (node.kind !== 165 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 261 /* InterfaceDeclaration */ || containerKind === 184 /* TypeLiteral */; + return containerKind === 262 /* InterfaceDeclaration */ || containerKind === 185 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 79 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent) => { switch (parent.kind) { - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return true; - case 208 /* PropertyAccessExpression */: - case 230 /* ExpressionWithTypeArguments */: + case 209 /* PropertyAccessExpression */: + case 231 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 117 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 261 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 262 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -17005,20 +17039,20 @@ if (!node.parent) return void 0; switch (node.kind) { - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: const { parent: parent2 } = node; - return parent2.kind === 192 /* InferType */ ? void 0 : parent2.typeParameters; - case 166 /* Parameter */: + return parent2.kind === 193 /* InferType */ ? void 0 : parent2.typeParameters; + case 167 /* Parameter */: return node.parent.parameters; - case 201 /* TemplateLiteralTypeSpan */: + case 202 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return node.parent.templateSpans; - case 167 /* Decorator */: { + case 168 /* Decorator */: { const { parent: parent3 } = node; return canHaveDecorators(parent3) ? parent3.modifiers : void 0; } - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return node.parent.heritageClauses; } const { parent } = node; @@ -17026,43 +17060,43 @@ return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent.kind) { - case 184 /* TypeLiteral */: - case 261 /* InterfaceDeclaration */: + case 185 /* TypeLiteral */: + case 262 /* InterfaceDeclaration */: return isTypeElement(node) ? parent.members : void 0; - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return parent.types; - case 186 /* TupleType */: - case 206 /* ArrayLiteralExpression */: - case 357 /* CommaListExpression */: - case 272 /* NamedImports */: - case 276 /* NamedExports */: + case 187 /* TupleType */: + case 207 /* ArrayLiteralExpression */: + case 358 /* CommaListExpression */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: return parent.elements; - case 207 /* ObjectLiteralExpression */: - case 289 /* JsxAttributes */: + case 208 /* ObjectLiteralExpression */: + case 290 /* JsxAttributes */: return parent.properties; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return isTypeNode(node) ? parent.typeArguments : parent.expression === node ? void 0 : parent.arguments; - case 281 /* JsxElement */: - case 285 /* JsxFragment */: + case 282 /* JsxElement */: + case 286 /* JsxFragment */: return isJsxChild(node) ? parent.children : void 0; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent.typeArguments : void 0; - case 238 /* Block */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 266 /* ModuleBlock */: return parent.statements; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return parent.clauses; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return isClassElement(node) ? parent.members : void 0; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return isEnumMember(node) ? parent.members : void 0; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return parent.statements; } } @@ -17071,7 +17105,7 @@ if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 216 /* ArrowFunction */) { + if (node.kind !== 217 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -17084,14 +17118,14 @@ return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 257 /* VariableDeclaration */ && node.parent.kind === 295 /* CatchClause */; + return node.kind === 258 /* VariableDeclaration */ && node.parent.kind === 296 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 215 /* FunctionExpression */ || node.kind === 216 /* ArrowFunction */; + return node.kind === 216 /* FunctionExpression */ || node.kind === 217 /* ArrowFunction */; } function isNumericLiteralName(name) { return (+name).toString() === name; @@ -17151,19 +17185,19 @@ } function isTypeDeclaration(node) { switch (node.kind) { - case 165 /* TypeParameter */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 166 /* TypeParameter */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return true; - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.isTypeOnly; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -17177,7 +17211,7 @@ return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 320 /* JSDocOptionalType */; } function canUsePropertyAccess(name, languageVersion) { if (name.length === 0) { @@ -17188,17 +17222,17 @@ } function isJSDocOptionalParameter(node) { return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType - (node.type && node.type.kind === 319 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */)); + (node.type && node.type.kind === 320 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 320 /* JSDocOptionalType */)); } function isOptionalDeclaration(declaration) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return !!declaration.questionToken; - case 166 /* Parameter */: + case 167 /* Parameter */: return !!declaration.questionToken || isJSDocOptionalParameter(declaration); - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: return isOptionalJSDocPropertyLikeTag(declaration); default: return false; @@ -17206,7 +17240,7 @@ } function isNonNullAccess(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression); + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && isNonNullExpression(node.expression); } function isJSDocSatisfiesExpression(node) { return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); @@ -17340,16 +17374,16 @@ return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(223 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(223 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(224 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(224 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 216 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 217 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 226 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 227 /* YieldExpression */) { return false; } return true; @@ -17383,7 +17417,7 @@ if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { + if (node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -17396,7 +17430,7 @@ } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 214 /* ParenthesizedExpression */) { + if (skipped.kind === 215 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -17422,7 +17456,7 @@ return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(224 /* ConditionalExpression */, 57 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(225 /* ConditionalExpression */, 57 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -17443,8 +17477,8 @@ /*stopAtCallExpression*/ false ).kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: needsParens = true; } } @@ -17457,16 +17491,16 @@ true ); switch (leftmostExpr.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 211 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 212 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -17484,7 +17518,7 @@ function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(223 /* BinaryExpression */, 27 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(224 /* BinaryExpression */, 27 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -17492,7 +17526,7 @@ if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 215 /* FunctionExpression */ || kind === 216 /* ArrowFunction */) { + if (kind === 216 /* FunctionExpression */ || kind === 217 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -17507,7 +17541,7 @@ /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 207 /* ObjectLiteralExpression */ || leftmostExpressionKind === 215 /* FunctionExpression */) { + if (leftmostExpressionKind === 208 /* ObjectLiteralExpression */ || leftmostExpressionKind === 216 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -17517,31 +17551,31 @@ body, /*stopAtCallExpressions*/ false - ).kind === 207 /* ObjectLiteralExpression */)) { + ).kind === 208 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 191 /* ConditionalType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 192 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -17551,8 +17585,8 @@ } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -17562,23 +17596,23 @@ } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 192 /* InferType */: - case 195 /* TypeOperator */: - case 183 /* TypeQuery */: + case 193 /* InferType */: + case 196 /* TypeOperator */: + case 184 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -17736,11 +17770,11 @@ } function convertToAssignmentPattern(node) { switch (node.kind) { - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 203 /* ObjectBindingPattern */: - case 207 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 208 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -18087,40 +18121,40 @@ updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(315 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(316 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(316 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(317 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(318 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(319 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(318 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(319 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(317 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(318 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(317 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(318 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(319 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(320 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(319 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(320 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(321 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(322 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(321 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(322 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(322 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(323 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(322 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(323 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -18160,82 +18194,82 @@ updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(347 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(348 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(347 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(345 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(346 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(345 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(346 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(346 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(347 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(346 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(347 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(333 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(334 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(333 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(334 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(335 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(336 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(335 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(336 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(339 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(339 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(340 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(340 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(341 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(341 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(334 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(335 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(334 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(335 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(352 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(353 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(354 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(354 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -18698,50 +18732,50 @@ return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 162 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 163 /* LastToken */, "Invalid token"); Debug.assert(token <= 14 /* FirstTemplateToken */ || token >= 17 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 8 /* FirstLiteralToken */ || token >= 14 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 79 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); const node = createBaseToken(token); let transformFlags = 0 /* None */; switch (token) { - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; break; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 126 /* AbstractKeyword */: - case 136 /* DeclareKeyword */: - case 85 /* ConstKeyword */: - case 131 /* AnyKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 144 /* NeverKeyword */: - case 149 /* ObjectKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - case 161 /* OverrideKeyword */: - case 152 /* StringKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 114 /* VoidKeyword */: - case 157 /* UnknownKeyword */: - case 155 /* UndefinedKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 127 /* AbstractKeyword */: + case 137 /* DeclareKeyword */: + case 86 /* ConstKeyword */: + case 132 /* AnyKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 145 /* NeverKeyword */: + case 150 /* ObjectKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + case 162 /* OverrideKeyword */: + case 153 /* StringKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 115 /* VoidKeyword */: + case 158 /* UnknownKeyword */: + case 156 /* UndefinedKeyword */: transformFlags = 1 /* ContainsTypeScript */; break; - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: transformFlags = 1024 /* ContainsES2015 */ | 134217728 /* ContainsLexicalSuper */; node.flowNode = void 0; break; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: transformFlags = 1024 /* ContainsES2015 */; break; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: transformFlags = 16777216 /* ContainsClassFields */; break; - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: transformFlags = 16384 /* ContainsLexicalThis */; node.flowNode = void 0; break; @@ -18752,19 +18786,19 @@ return node; } function createSuper() { - return createToken(106 /* SuperKeyword */); + return createToken(107 /* SuperKeyword */); } function createThis() { - return createToken(108 /* ThisKeyword */); + return createToken(109 /* ThisKeyword */); } function createNull() { - return createToken(104 /* NullKeyword */); + return createToken(105 /* NullKeyword */); } function createTrue() { - return createToken(110 /* TrueKeyword */); + return createToken(111 /* TrueKeyword */); } function createFalse() { - return createToken(95 /* FalseKeyword */); + return createToken(96 /* FalseKeyword */); } function createModifier(kind) { return createToken(kind); @@ -18772,39 +18806,39 @@ function createModifiersFromModifierFlags(flags2) { const result = []; if (flags2 & 1 /* Export */) - result.push(createModifier(93 /* ExportKeyword */)); + result.push(createModifier(94 /* ExportKeyword */)); if (flags2 & 2 /* Ambient */) - result.push(createModifier(136 /* DeclareKeyword */)); + result.push(createModifier(137 /* DeclareKeyword */)); if (flags2 & 1024 /* Default */) - result.push(createModifier(88 /* DefaultKeyword */)); + result.push(createModifier(89 /* DefaultKeyword */)); if (flags2 & 2048 /* Const */) - result.push(createModifier(85 /* ConstKeyword */)); + result.push(createModifier(86 /* ConstKeyword */)); if (flags2 & 4 /* Public */) - result.push(createModifier(123 /* PublicKeyword */)); + result.push(createModifier(124 /* PublicKeyword */)); if (flags2 & 8 /* Private */) - result.push(createModifier(121 /* PrivateKeyword */)); + result.push(createModifier(122 /* PrivateKeyword */)); if (flags2 & 16 /* Protected */) - result.push(createModifier(122 /* ProtectedKeyword */)); + result.push(createModifier(123 /* ProtectedKeyword */)); if (flags2 & 256 /* Abstract */) - result.push(createModifier(126 /* AbstractKeyword */)); + result.push(createModifier(127 /* AbstractKeyword */)); if (flags2 & 32 /* Static */) - result.push(createModifier(124 /* StaticKeyword */)); + result.push(createModifier(125 /* StaticKeyword */)); if (flags2 & 16384 /* Override */) - result.push(createModifier(161 /* OverrideKeyword */)); + result.push(createModifier(162 /* OverrideKeyword */)); if (flags2 & 64 /* Readonly */) - result.push(createModifier(146 /* ReadonlyKeyword */)); + result.push(createModifier(147 /* ReadonlyKeyword */)); if (flags2 & 128 /* Accessor */) - result.push(createModifier(127 /* AccessorKeyword */)); + result.push(createModifier(128 /* AccessorKeyword */)); if (flags2 & 512 /* Async */) - result.push(createModifier(132 /* AsyncKeyword */)); + result.push(createModifier(133 /* AsyncKeyword */)); if (flags2 & 32768 /* In */) - result.push(createModifier(101 /* InKeyword */)); + result.push(createModifier(102 /* InKeyword */)); if (flags2 & 65536 /* Out */) - result.push(createModifier(145 /* OutKeyword */)); + result.push(createModifier(146 /* OutKeyword */)); return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(163 /* QualifiedName */); + const node = createBaseNode(164 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -18815,7 +18849,7 @@ return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(164 /* ComputedPropertyName */); + const node = createBaseNode(165 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -18824,7 +18858,7 @@ return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(165 /* TypeParameter */); + const node = createBaseDeclaration(166 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -18839,7 +18873,7 @@ } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { var _a2, _b; - const node = createBaseDeclaration(166 /* Parameter */); + const node = createBaseDeclaration(167 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -18858,7 +18892,7 @@ return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(167 /* Decorator */); + const node = createBaseNode(168 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -18871,7 +18905,7 @@ return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(168 /* PropertySignature */); + const node = createBaseDeclaration(169 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -18891,7 +18925,7 @@ return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(169 /* PropertyDeclaration */); + const node = createBaseDeclaration(170 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; @@ -18907,7 +18941,7 @@ return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(170 /* MethodSignature */); + const node = createBaseDeclaration(171 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -18925,7 +18959,7 @@ return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(171 /* MethodDeclaration */); + const node = createBaseDeclaration(172 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -18962,7 +18996,7 @@ return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(172 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(173 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -18983,7 +19017,7 @@ return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(173 /* Constructor */); + const node = createBaseDeclaration(174 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; @@ -19009,7 +19043,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(174 /* GetAccessor */); + const node = createBaseDeclaration(175 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -19040,7 +19074,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(175 /* SetAccessor */); + const node = createBaseDeclaration(176 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -19072,7 +19106,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(176 /* CallSignature */); + const node = createBaseDeclaration(177 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -19087,7 +19121,7 @@ return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(177 /* ConstructSignature */); + const node = createBaseDeclaration(178 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -19102,7 +19136,7 @@ return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(178 /* IndexSignature */); + const node = createBaseDeclaration(179 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -19117,7 +19151,7 @@ return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(201 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(202 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -19130,7 +19164,7 @@ return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(179 /* TypePredicate */); + const node = createBaseNode(180 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -19141,7 +19175,7 @@ return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(180 /* TypeReference */); + const node = createBaseNode(181 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -19151,7 +19185,7 @@ return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(181 /* FunctionType */); + const node = createBaseDeclaration(182 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -19176,7 +19210,7 @@ return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(182 /* ConstructorType */); + const node = createBaseDeclaration(183 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -19207,7 +19241,7 @@ return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(183 /* TypeQuery */); + const node = createBaseNode(184 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -19217,7 +19251,7 @@ return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(184 /* TypeLiteral */); + const node = createBaseDeclaration(185 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19226,7 +19260,7 @@ return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(185 /* ArrayType */); + const node = createBaseNode(186 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19235,7 +19269,7 @@ return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(186 /* TupleType */); + const node = createBaseNode(187 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19244,7 +19278,7 @@ return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(199 /* NamedTupleMember */); + const node = createBaseDeclaration(200 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -19257,7 +19291,7 @@ return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(187 /* OptionalType */); + const node = createBaseNode(188 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19266,7 +19300,7 @@ return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(188 /* RestType */); + const node = createBaseNode(189 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19284,19 +19318,19 @@ return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(189 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(190 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(190 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(191 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(191 /* ConditionalType */); + const node = createBaseNode(192 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -19310,7 +19344,7 @@ return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(192 /* InferType */); + const node = createBaseNode(193 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19319,7 +19353,7 @@ return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(200 /* TemplateLiteralType */); + const node = createBaseNode(201 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -19329,7 +19363,7 @@ return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(202 /* ImportType */); + const node = createBaseNode(203 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -19342,7 +19376,7 @@ return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(193 /* ParenthesizedType */); + const node = createBaseNode(194 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19351,14 +19385,14 @@ return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(194 /* ThisType */); + const node = createBaseNode(195 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(195 /* TypeOperator */); + const node = createBaseNode(196 /* TypeOperator */); node.operator = operator; - node.type = operator === 146 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); + node.type = operator === 147 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; } @@ -19366,7 +19400,7 @@ return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(196 /* IndexedAccessType */); + const node = createBaseNode(197 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -19376,7 +19410,7 @@ return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(197 /* MappedType */); + const node = createBaseDeclaration(198 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -19392,7 +19426,7 @@ return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(198 /* LiteralType */); + const node = createBaseNode(199 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19401,7 +19435,7 @@ return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(203 /* ObjectBindingPattern */); + const node = createBaseNode(204 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -19413,7 +19447,7 @@ return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(204 /* ArrayBindingPattern */); + const node = createBaseNode(205 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -19422,7 +19456,7 @@ return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(205 /* BindingElement */); + const node = createBaseDeclaration(206 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -19435,7 +19469,7 @@ return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(206 /* ArrayLiteralExpression */); + const node = createBaseNode(207 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -19447,7 +19481,7 @@ return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(207 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(208 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -19458,7 +19492,7 @@ return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(208 /* PropertyAccessExpression */); + const node = createBaseDeclaration(209 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -19508,7 +19542,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(209 /* ElementAccessExpression */); + const node = createBaseDeclaration(210 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -19558,7 +19592,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(210 /* CallExpression */); + const node = createBaseDeclaration(211 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -19615,7 +19649,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(211 /* NewExpression */); + const node = createBaseDeclaration(212 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -19629,7 +19663,7 @@ return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(212 /* TaggedTemplateExpression */); + const node = createBaseNode(213 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -19650,7 +19684,7 @@ return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(213 /* TypeAssertionExpression */); + const node = createBaseNode(214 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -19660,7 +19694,7 @@ return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(214 /* ParenthesizedExpression */); + const node = createBaseNode(215 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -19670,7 +19704,7 @@ return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(215 /* FunctionExpression */); + const node = createBaseDeclaration(216 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -19695,7 +19729,7 @@ return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(216 /* ArrowFunction */); + const node = createBaseDeclaration(217 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -19717,7 +19751,7 @@ return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(217 /* DeleteExpression */); + const node = createBaseNode(218 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -19726,7 +19760,7 @@ return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(218 /* TypeOfExpression */); + const node = createBaseNode(219 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -19735,7 +19769,7 @@ return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(219 /* VoidExpression */); + const node = createBaseNode(220 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -19744,7 +19778,7 @@ return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(220 /* AwaitExpression */); + const node = createBaseNode(221 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -19753,7 +19787,7 @@ return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(221 /* PrefixUnaryExpression */); + const node = createBaseNode(222 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -19766,7 +19800,7 @@ return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(222 /* PostfixUnaryExpression */); + const node = createBaseNode(223 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -19779,7 +19813,7 @@ return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(223 /* BinaryExpression */); + const node = createBaseDeclaration(224 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -19799,7 +19833,7 @@ } else if (isLogicalOrCoalescingAssignmentOperator(operatorKind)) { node.transformFlags |= 16 /* ContainsES2021 */; } - if (operatorKind === 101 /* InKeyword */ && isPrivateIdentifier(node.left)) { + if (operatorKind === 102 /* InKeyword */ && isPrivateIdentifier(node.left)) { node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */; } node.jsDoc = void 0; @@ -19812,7 +19846,7 @@ return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(224 /* ConditionalExpression */); + const node = createBaseNode(225 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken != null ? questionToken : createToken(57 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -19825,7 +19859,7 @@ return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(225 /* TemplateExpression */); + const node = createBaseNode(226 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -19900,7 +19934,7 @@ } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(226 /* YieldExpression */); + const node = createBaseNode(227 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -19910,7 +19944,7 @@ return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(227 /* SpreadElement */); + const node = createBaseNode(228 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -19919,7 +19953,7 @@ return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(228 /* ClassExpression */); + const node = createBaseDeclaration(229 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -19933,10 +19967,10 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(229 /* OmittedExpression */); + return createBaseNode(230 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(230 /* ExpressionWithTypeArguments */); + const node = createBaseNode(231 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -19950,7 +19984,7 @@ return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(231 /* AsExpression */); + const node = createBaseNode(232 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -19960,7 +19994,7 @@ return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(232 /* NonNullExpression */); + const node = createBaseNode(233 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -19976,7 +20010,7 @@ return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(235 /* SatisfiesExpression */); + const node = createBaseNode(236 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -19986,7 +20020,7 @@ return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(232 /* NonNullExpression */); + const node = createBaseNode(233 /* NonNullExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, @@ -20001,15 +20035,15 @@ return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(233 /* MetaProperty */); + const node = createBaseNode(234 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); switch (keywordToken) { - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: node.transformFlags |= 1024 /* ContainsES2015 */; break; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: node.transformFlags |= 4 /* ContainsESNext */; break; default: @@ -20022,7 +20056,7 @@ return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(236 /* TemplateSpan */); + const node = createBaseNode(237 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -20032,12 +20066,12 @@ return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(237 /* SemicolonClassElement */); + const node = createBaseNode(238 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(238 /* Block */); + const node = createBaseNode(239 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -20050,7 +20084,7 @@ return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(240 /* VariableStatement */); + const node = createBaseNode(241 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -20065,12 +20099,12 @@ return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(239 /* EmptyStatement */); + const node = createBaseNode(240 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(241 /* ExpressionStatement */); + const node = createBaseNode(242 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -20081,7 +20115,7 @@ return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(242 /* IfStatement */); + const node = createBaseNode(243 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -20094,7 +20128,7 @@ return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(243 /* DoStatement */); + const node = createBaseNode(244 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -20106,7 +20140,7 @@ return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(244 /* WhileStatement */); + const node = createBaseNode(245 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -20118,7 +20152,7 @@ return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(245 /* ForStatement */); + const node = createBaseNode(246 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -20134,7 +20168,7 @@ return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(246 /* ForInStatement */); + const node = createBaseNode(247 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -20149,7 +20183,7 @@ return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(247 /* ForOfStatement */); + const node = createBaseNode(248 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -20167,7 +20201,7 @@ return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(248 /* ContinueStatement */); + const node = createBaseNode(249 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -20178,7 +20212,7 @@ return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(249 /* BreakStatement */); + const node = createBaseNode(250 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -20189,7 +20223,7 @@ return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(250 /* ReturnStatement */); + const node = createBaseNode(251 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -20200,7 +20234,7 @@ return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(251 /* WithStatement */); + const node = createBaseNode(252 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -20212,7 +20246,7 @@ return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(252 /* SwitchStatement */); + const node = createBaseNode(253 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -20225,7 +20259,7 @@ return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(253 /* LabeledStatement */); + const node = createBaseNode(254 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -20237,7 +20271,7 @@ return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(254 /* ThrowStatement */); + const node = createBaseNode(255 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -20248,7 +20282,7 @@ return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(255 /* TryStatement */); + const node = createBaseNode(256 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -20261,14 +20295,14 @@ return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(256 /* DebuggerStatement */); + const node = createBaseNode(257 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { var _a2; - const node = createBaseDeclaration(257 /* VariableDeclaration */); + const node = createBaseDeclaration(258 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -20281,7 +20315,7 @@ return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(258 /* VariableDeclarationList */); + const node = createBaseNode(259 /* VariableDeclarationList */); node.flags |= flags2 & 3 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -20294,7 +20328,7 @@ return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(259 /* FunctionDeclaration */); + const node = createBaseDeclaration(260 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -20330,7 +20364,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(260 /* ClassDeclaration */); + const node = createBaseDeclaration(261 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -20351,7 +20385,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(261 /* InterfaceDeclaration */); + const node = createBaseDeclaration(262 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -20365,7 +20399,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(262 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(263 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -20380,7 +20414,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(263 /* EnumDeclaration */); + const node = createBaseDeclaration(264 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -20393,7 +20427,7 @@ return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(264 /* ModuleDeclaration */); + const node = createBaseDeclaration(265 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); node.name = name; @@ -20413,7 +20447,7 @@ return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(265 /* ModuleBlock */); + const node = createBaseNode(266 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -20423,7 +20457,7 @@ return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(266 /* CaseBlock */); + const node = createBaseNode(267 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -20434,7 +20468,7 @@ return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(267 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(268 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -20451,7 +20485,7 @@ return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(268 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(269 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -20468,7 +20502,7 @@ return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(269 /* ImportDeclaration */); + const node = createBaseNode(270 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -20482,7 +20516,7 @@ return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(270 /* ImportClause */); + const node = createBaseDeclaration(271 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -20497,7 +20531,7 @@ return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(296 /* AssertClause */); + const node = createBaseNode(297 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -20507,7 +20541,7 @@ return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(297 /* AssertEntry */); + const node = createBaseNode(298 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -20517,7 +20551,7 @@ return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(298 /* ImportTypeAssertionContainer */); + const node = createBaseNode(299 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -20526,7 +20560,7 @@ return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(271 /* NamespaceImport */); + const node = createBaseDeclaration(272 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -20536,7 +20570,7 @@ return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(277 /* NamespaceExport */); + const node = createBaseDeclaration(278 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -20546,7 +20580,7 @@ return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(272 /* NamedImports */); + const node = createBaseNode(273 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -20556,7 +20590,7 @@ return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(273 /* ImportSpecifier */); + const node = createBaseDeclaration(274 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -20568,7 +20602,7 @@ return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(274 /* ExportAssignment */); + const node = createBaseDeclaration(275 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -20586,7 +20620,7 @@ return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(275 /* ExportDeclaration */); + const node = createBaseDeclaration(276 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -20609,7 +20643,7 @@ return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(276 /* NamedExports */); + const node = createBaseNode(277 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -20619,7 +20653,7 @@ return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(278 /* ExportSpecifier */); + const node = createBaseNode(279 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -20632,12 +20666,12 @@ return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(279 /* MissingDeclaration */); + const node = createBaseDeclaration(280 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(280 /* ExternalModuleReference */); + const node = createBaseNode(281 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -20669,7 +20703,7 @@ return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(320 /* JSDocFunctionType */); + const node = createBaseDeclaration(321 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -20683,7 +20717,7 @@ return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(325 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(326 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -20692,7 +20726,7 @@ return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(312 /* JSDocTypeExpression */); + const node = createBaseNode(313 /* JSDocTypeExpression */); node.type = type; return node; } @@ -20700,7 +20734,7 @@ return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(326 /* JSDocSignature */); + const node = createBaseDeclaration(327 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -20729,7 +20763,7 @@ return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(348 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); + const node = createBaseJSDocTag(349 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -20738,7 +20772,7 @@ return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(349 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(350 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -20750,7 +20784,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(344 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(345 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -20761,7 +20795,7 @@ return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(351 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(352 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -20772,7 +20806,7 @@ return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(341 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(342 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -20784,7 +20818,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(342 /* JSDocOverloadTag */, tagName != null ? tagName : createIdentifier("overload"), comment); + const node = createBaseJSDocTag(343 /* JSDocOverloadTag */, tagName != null ? tagName : createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -20792,7 +20826,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(331 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); + const node = createBaseJSDocTag(332 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); node.class = className; return node; } @@ -20800,12 +20834,12 @@ return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(332 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); + const node = createBaseJSDocTag(333 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(350 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); + const node = createBaseJSDocTag(351 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); node.name = name; return node; } @@ -20813,7 +20847,7 @@ return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(313 /* JSDocNameReference */); + const node = createBaseNode(314 /* JSDocNameReference */); node.name = name; return node; } @@ -20821,7 +20855,7 @@ return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(314 /* JSDocMemberName */); + const node = createBaseNode(315 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -20831,7 +20865,7 @@ return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(327 /* JSDocLink */); + const node = createBaseNode(328 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -20840,7 +20874,7 @@ return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(328 /* JSDocLinkCode */); + const node = createBaseNode(329 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -20849,7 +20883,7 @@ return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(329 /* JSDocLinkPlain */); + const node = createBaseNode(330 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -20876,14 +20910,14 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(330 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(331 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(343 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(343 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(344 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(344 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -20893,7 +20927,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(324 /* JSDocText */); + const node = createBaseNode(325 /* JSDocText */); node.text = text; return node; } @@ -20901,7 +20935,7 @@ return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(323 /* JSDoc */); + const node = createBaseNode(324 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -20910,7 +20944,7 @@ return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(281 /* JsxElement */); + const node = createBaseNode(282 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -20921,7 +20955,7 @@ return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(282 /* JsxSelfClosingElement */); + const node = createBaseNode(283 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -20935,7 +20969,7 @@ return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(283 /* JsxOpeningElement */); + const node = createBaseNode(284 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -20949,7 +20983,7 @@ return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(284 /* JsxClosingElement */); + const node = createBaseNode(285 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -20958,7 +20992,7 @@ return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(285 /* JsxFragment */); + const node = createBaseNode(286 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -20979,17 +21013,17 @@ return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(286 /* JsxOpeningFragment */); + const node = createBaseNode(287 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(287 /* JsxClosingFragment */); + const node = createBaseNode(288 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(288 /* JsxAttribute */); + const node = createBaseDeclaration(289 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -20999,7 +21033,7 @@ return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(289 /* JsxAttributes */); + const node = createBaseDeclaration(290 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -21008,7 +21042,7 @@ return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(290 /* JsxSpreadAttribute */); + const node = createBaseNode(291 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -21017,7 +21051,7 @@ return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(291 /* JsxExpression */); + const node = createBaseNode(292 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -21027,7 +21061,7 @@ return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(292 /* CaseClause */); + const node = createBaseNode(293 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -21038,7 +21072,7 @@ return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(293 /* DefaultClause */); + const node = createBaseNode(294 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -21047,15 +21081,15 @@ return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(294 /* HeritageClause */); + const node = createBaseNode(295 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); switch (token) { - case 94 /* ExtendsKeyword */: + case 95 /* ExtendsKeyword */: node.transformFlags |= 1024 /* ContainsES2015 */; break; - case 117 /* ImplementsKeyword */: + case 118 /* ImplementsKeyword */: node.transformFlags |= 1 /* ContainsTypeScript */; break; default: @@ -21067,7 +21101,7 @@ return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(295 /* CatchClause */); + const node = createBaseNode(296 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -21079,7 +21113,7 @@ return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(299 /* PropertyAssignment */); + const node = createBaseDeclaration(300 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -21101,7 +21135,7 @@ return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(300 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(301 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -21125,7 +21159,7 @@ return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(301 /* SpreadAssignment */); + const node = createBaseDeclaration(302 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -21135,7 +21169,7 @@ return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(302 /* EnumMember */); + const node = createBaseDeclaration(303 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -21146,7 +21180,7 @@ return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(309 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -21227,7 +21261,7 @@ return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(309 /* SourceFile */); node.flags |= source.flags & ~8 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { @@ -21261,7 +21295,7 @@ return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(309 /* Bundle */); + const node = createBaseNode(310 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; @@ -21274,7 +21308,7 @@ return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(310 /* UnparsedSource */); + const node = createBaseNode(311 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -21291,48 +21325,48 @@ return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(303 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(304 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(304 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(305 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 306 /* UnparsedInternalText */ : 305 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 307 /* UnparsedInternalText */ : 306 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(307 /* UnparsedSyntheticReference */); + const node = createBaseNode(308 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles() { - const node = createBaseNode(311 /* InputFiles */); + const node = createBaseNode(312 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(234 /* SyntheticExpression */); + const node = createBaseNode(235 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList(children) { - const node = createBaseNode(354 /* SyntaxList */); + const node = createBaseNode(355 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(355 /* NotEmittedStatement */); + const node = createBaseNode(356 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(356 /* PartiallyEmittedExpression */); + const node = createBaseNode(357 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -21354,7 +21388,7 @@ return node; } function createCommaListExpression(elements) { - const node = createBaseNode(357 /* CommaListExpression */); + const node = createBaseNode(358 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -21363,19 +21397,19 @@ return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createEndOfDeclarationMarker(original) { - const node = createBaseNode(359 /* EndOfDeclarationMarker */); + const node = createBaseNode(360 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createMergeDeclarationMarker(original) { - const node = createBaseNode(358 /* MergeDeclarationMarker */); + const node = createBaseNode(359 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(360 /* SyntheticReferenceExpression */); + const node = createBaseNode(361 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -21608,17 +21642,17 @@ } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 231 /* AsExpression */: + case 232 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -21653,18 +21687,18 @@ switch (target.kind) { case 79 /* Identifier */: return cacheIdentifiers; - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: return false; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -21976,43 +22010,43 @@ } function getDefaultTagNameForKind(kind) { switch (kind) { - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return "type"; - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: return "returns"; - case 346 /* JSDocThisTag */: + case 347 /* JSDocThisTag */: return "this"; - case 343 /* JSDocEnumTag */: + case 344 /* JSDocEnumTag */: return "enum"; - case 333 /* JSDocAuthorTag */: + case 334 /* JSDocAuthorTag */: return "author"; - case 335 /* JSDocClassTag */: + case 336 /* JSDocClassTag */: return "class"; - case 336 /* JSDocPublicTag */: + case 337 /* JSDocPublicTag */: return "public"; - case 337 /* JSDocPrivateTag */: + case 338 /* JSDocPrivateTag */: return "private"; - case 338 /* JSDocProtectedTag */: + case 339 /* JSDocProtectedTag */: return "protected"; - case 339 /* JSDocReadonlyTag */: + case 340 /* JSDocReadonlyTag */: return "readonly"; - case 340 /* JSDocOverrideTag */: + case 341 /* JSDocOverrideTag */: return "override"; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return "template"; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return "typedef"; - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return "param"; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return "prop"; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: return "callback"; - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return "overload"; - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return "augments"; - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -22096,70 +22130,70 @@ children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */) { + if (kind >= 180 /* FirstTypeNode */ && kind <= 203 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 206 /* ArrayLiteralExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 207 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 166 /* Parameter */: + case 167 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 173 /* Constructor */: + case 174 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; - case 131 /* AnyKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 144 /* NeverKeyword */: - case 152 /* StringKeyword */: - case 149 /* ObjectKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 114 /* VoidKeyword */: - case 165 /* TypeParameter */: - case 168 /* PropertySignature */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 132 /* AnyKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 145 /* NeverKeyword */: + case 153 /* StringKeyword */: + case 150 /* ObjectKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 115 /* VoidKeyword */: + case 166 /* TypeParameter */: + case 169 /* PropertySignature */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 295 /* CatchClause */: + case 296 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 213 /* TypeAssertionExpression */: - case 235 /* SatisfiesExpression */: - case 231 /* AsExpression */: - case 356 /* PartiallyEmittedExpression */: - case 214 /* ParenthesizedExpression */: - case 106 /* SuperKeyword */: + case 214 /* TypeAssertionExpression */: + case 236 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 357 /* PartiallyEmittedExpression */: + case 215 /* ParenthesizedExpression */: + case 107 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -22466,7 +22500,7 @@ var _a2; if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = (_a2 = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node)))) != null ? _a2 : Debug.fail("Could not determine parsed source file."); @@ -22844,7 +22878,7 @@ void 0, factory2.createBinaryExpression( propertyName, - 101 /* InKeyword */, + 102 /* InKeyword */, factory2.createIdentifier("obj") ) ) @@ -23729,529 +23763,529 @@ return node.kind === 80 /* PrivateIdentifier */; } function isExportModifier(node) { - return node.kind === 93 /* ExportKeyword */; + return node.kind === 94 /* ExportKeyword */; } function isDefaultModifier(node) { - return node.kind === 88 /* DefaultKeyword */; + return node.kind === 89 /* DefaultKeyword */; } function isAsyncModifier(node) { - return node.kind === 132 /* AsyncKeyword */; + return node.kind === 133 /* AsyncKeyword */; } function isAssertsKeyword(node) { - return node.kind === 129 /* AssertsKeyword */; + return node.kind === 130 /* AssertsKeyword */; } function isAwaitKeyword(node) { - return node.kind === 133 /* AwaitKeyword */; + return node.kind === 134 /* AwaitKeyword */; } function isReadonlyKeyword(node) { - return node.kind === 146 /* ReadonlyKeyword */; + return node.kind === 147 /* ReadonlyKeyword */; } function isStaticModifier(node) { - return node.kind === 124 /* StaticKeyword */; + return node.kind === 125 /* StaticKeyword */; } function isAccessorModifier(node) { - return node.kind === 127 /* AccessorKeyword */; + return node.kind === 128 /* AccessorKeyword */; } function isSuperKeyword(node) { - return node.kind === 106 /* SuperKeyword */; + return node.kind === 107 /* SuperKeyword */; } function isImportKeyword(node) { - return node.kind === 100 /* ImportKeyword */; + return node.kind === 101 /* ImportKeyword */; } function isQualifiedName(node) { - return node.kind === 163 /* QualifiedName */; + return node.kind === 164 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 164 /* ComputedPropertyName */; + return node.kind === 165 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 165 /* TypeParameter */; + return node.kind === 166 /* TypeParameter */; } function isParameter(node) { - return node.kind === 166 /* Parameter */; + return node.kind === 167 /* Parameter */; } function isDecorator(node) { - return node.kind === 167 /* Decorator */; + return node.kind === 168 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 168 /* PropertySignature */; + return node.kind === 169 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 169 /* PropertyDeclaration */; + return node.kind === 170 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 170 /* MethodSignature */; + return node.kind === 171 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 171 /* MethodDeclaration */; + return node.kind === 172 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 172 /* ClassStaticBlockDeclaration */; + return node.kind === 173 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 173 /* Constructor */; + return node.kind === 174 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 174 /* GetAccessor */; + return node.kind === 175 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 175 /* SetAccessor */; + return node.kind === 176 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 176 /* CallSignature */; + return node.kind === 177 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 177 /* ConstructSignature */; + return node.kind === 178 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 178 /* IndexSignature */; + return node.kind === 179 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 179 /* TypePredicate */; + return node.kind === 180 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 180 /* TypeReference */; + return node.kind === 181 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 181 /* FunctionType */; + return node.kind === 182 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 182 /* ConstructorType */; + return node.kind === 183 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 183 /* TypeQuery */; + return node.kind === 184 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 184 /* TypeLiteral */; + return node.kind === 185 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 185 /* ArrayType */; + return node.kind === 186 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 186 /* TupleType */; + return node.kind === 187 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 199 /* NamedTupleMember */; + return node.kind === 200 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 187 /* OptionalType */; + return node.kind === 188 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 188 /* RestType */; + return node.kind === 189 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 189 /* UnionType */; + return node.kind === 190 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 190 /* IntersectionType */; + return node.kind === 191 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 191 /* ConditionalType */; + return node.kind === 192 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 192 /* InferType */; + return node.kind === 193 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 193 /* ParenthesizedType */; + return node.kind === 194 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 194 /* ThisType */; + return node.kind === 195 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 195 /* TypeOperator */; + return node.kind === 196 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 196 /* IndexedAccessType */; + return node.kind === 197 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 197 /* MappedType */; + return node.kind === 198 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 198 /* LiteralType */; + return node.kind === 199 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 202 /* ImportType */; + return node.kind === 203 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 201 /* TemplateLiteralTypeSpan */; + return node.kind === 202 /* TemplateLiteralTypeSpan */; } function isObjectBindingPattern(node) { - return node.kind === 203 /* ObjectBindingPattern */; + return node.kind === 204 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 204 /* ArrayBindingPattern */; + return node.kind === 205 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 205 /* BindingElement */; + return node.kind === 206 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 206 /* ArrayLiteralExpression */; + return node.kind === 207 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 207 /* ObjectLiteralExpression */; + return node.kind === 208 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 208 /* PropertyAccessExpression */; + return node.kind === 209 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 209 /* ElementAccessExpression */; + return node.kind === 210 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 210 /* CallExpression */; + return node.kind === 211 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 211 /* NewExpression */; + return node.kind === 212 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 212 /* TaggedTemplateExpression */; + return node.kind === 213 /* TaggedTemplateExpression */; } function isParenthesizedExpression(node) { - return node.kind === 214 /* ParenthesizedExpression */; + return node.kind === 215 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 215 /* FunctionExpression */; + return node.kind === 216 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 216 /* ArrowFunction */; + return node.kind === 217 /* ArrowFunction */; } function isTypeOfExpression(node) { - return node.kind === 218 /* TypeOfExpression */; + return node.kind === 219 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 219 /* VoidExpression */; + return node.kind === 220 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 220 /* AwaitExpression */; + return node.kind === 221 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 221 /* PrefixUnaryExpression */; + return node.kind === 222 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 222 /* PostfixUnaryExpression */; + return node.kind === 223 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 223 /* BinaryExpression */; + return node.kind === 224 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 224 /* ConditionalExpression */; + return node.kind === 225 /* ConditionalExpression */; } function isSpreadElement(node) { - return node.kind === 227 /* SpreadElement */; + return node.kind === 228 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 228 /* ClassExpression */; + return node.kind === 229 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 229 /* OmittedExpression */; + return node.kind === 230 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 230 /* ExpressionWithTypeArguments */; + return node.kind === 231 /* ExpressionWithTypeArguments */; } function isNonNullExpression(node) { - return node.kind === 232 /* NonNullExpression */; + return node.kind === 233 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 233 /* MetaProperty */; + return node.kind === 234 /* MetaProperty */; } function isPartiallyEmittedExpression(node) { - return node.kind === 356 /* PartiallyEmittedExpression */; + return node.kind === 357 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 357 /* CommaListExpression */; + return node.kind === 358 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 236 /* TemplateSpan */; + return node.kind === 237 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 237 /* SemicolonClassElement */; + return node.kind === 238 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 238 /* Block */; + return node.kind === 239 /* Block */; } function isVariableStatement(node) { - return node.kind === 240 /* VariableStatement */; + return node.kind === 241 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 239 /* EmptyStatement */; + return node.kind === 240 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 241 /* ExpressionStatement */; + return node.kind === 242 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 242 /* IfStatement */; + return node.kind === 243 /* IfStatement */; } function isForStatement(node) { - return node.kind === 245 /* ForStatement */; + return node.kind === 246 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 246 /* ForInStatement */; + return node.kind === 247 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 247 /* ForOfStatement */; + return node.kind === 248 /* ForOfStatement */; } function isReturnStatement(node) { - return node.kind === 250 /* ReturnStatement */; + return node.kind === 251 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 251 /* WithStatement */; + return node.kind === 252 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 252 /* SwitchStatement */; + return node.kind === 253 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 253 /* LabeledStatement */; + return node.kind === 254 /* LabeledStatement */; } function isTryStatement(node) { - return node.kind === 255 /* TryStatement */; + return node.kind === 256 /* TryStatement */; } function isVariableDeclaration(node) { - return node.kind === 257 /* VariableDeclaration */; + return node.kind === 258 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 258 /* VariableDeclarationList */; + return node.kind === 259 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 259 /* FunctionDeclaration */; + return node.kind === 260 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 260 /* ClassDeclaration */; + return node.kind === 261 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 261 /* InterfaceDeclaration */; + return node.kind === 262 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 262 /* TypeAliasDeclaration */; + return node.kind === 263 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 263 /* EnumDeclaration */; + return node.kind === 264 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */; + return node.kind === 265 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 265 /* ModuleBlock */; + return node.kind === 266 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 266 /* CaseBlock */; + return node.kind === 267 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 267 /* NamespaceExportDeclaration */; + return node.kind === 268 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */; + return node.kind === 269 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 269 /* ImportDeclaration */; + return node.kind === 270 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 270 /* ImportClause */; + return node.kind === 271 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 298 /* ImportTypeAssertionContainer */; + return node.kind === 299 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 296 /* AssertClause */; + return node.kind === 297 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 297 /* AssertEntry */; + return node.kind === 298 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 271 /* NamespaceImport */; + return node.kind === 272 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 277 /* NamespaceExport */; + return node.kind === 278 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 272 /* NamedImports */; + return node.kind === 273 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 273 /* ImportSpecifier */; + return node.kind === 274 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 274 /* ExportAssignment */; + return node.kind === 275 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 275 /* ExportDeclaration */; + return node.kind === 276 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 276 /* NamedExports */; + return node.kind === 277 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 278 /* ExportSpecifier */; + return node.kind === 279 /* ExportSpecifier */; } function isNotEmittedStatement(node) { - return node.kind === 355 /* NotEmittedStatement */; + return node.kind === 356 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 360 /* SyntheticReferenceExpression */; + return node.kind === 361 /* SyntheticReferenceExpression */; } function isExternalModuleReference(node) { - return node.kind === 280 /* ExternalModuleReference */; + return node.kind === 281 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 281 /* JsxElement */; + return node.kind === 282 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 282 /* JsxSelfClosingElement */; + return node.kind === 283 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 283 /* JsxOpeningElement */; + return node.kind === 284 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 284 /* JsxClosingElement */; + return node.kind === 285 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 285 /* JsxFragment */; + return node.kind === 286 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 286 /* JsxOpeningFragment */; + return node.kind === 287 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 287 /* JsxClosingFragment */; + return node.kind === 288 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 288 /* JsxAttribute */; + return node.kind === 289 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 289 /* JsxAttributes */; + return node.kind === 290 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 290 /* JsxSpreadAttribute */; + return node.kind === 291 /* JsxSpreadAttribute */; } function isCaseClause(node) { - return node.kind === 292 /* CaseClause */; + return node.kind === 293 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 293 /* DefaultClause */; + return node.kind === 294 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 294 /* HeritageClause */; + return node.kind === 295 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 295 /* CatchClause */; + return node.kind === 296 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 299 /* PropertyAssignment */; + return node.kind === 300 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 300 /* ShorthandPropertyAssignment */; + return node.kind === 301 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 301 /* SpreadAssignment */; + return node.kind === 302 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 302 /* EnumMember */; + return node.kind === 303 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 304 /* UnparsedPrepend */; + return node.kind === 305 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 308 /* SourceFile */; + return node.kind === 309 /* SourceFile */; } function isBundle(node) { - return node.kind === 309 /* Bundle */; + return node.kind === 310 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 310 /* UnparsedSource */; + return node.kind === 311 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 312 /* JSDocTypeExpression */; + return node.kind === 313 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 313 /* JSDocNameReference */; + return node.kind === 314 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 314 /* JSDocMemberName */; + return node.kind === 315 /* JSDocMemberName */; } function isJSDocAllType(node) { - return node.kind === 315 /* JSDocAllType */; + return node.kind === 316 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 316 /* JSDocUnknownType */; + return node.kind === 317 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 317 /* JSDocNullableType */; + return node.kind === 318 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 318 /* JSDocNonNullableType */; + return node.kind === 319 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 319 /* JSDocOptionalType */; + return node.kind === 320 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 320 /* JSDocFunctionType */; + return node.kind === 321 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 321 /* JSDocVariadicType */; + return node.kind === 322 /* JSDocVariadicType */; } function isJSDoc(node) { - return node.kind === 323 /* JSDoc */; + return node.kind === 324 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 325 /* JSDocTypeLiteral */; + return node.kind === 326 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 326 /* JSDocSignature */; + return node.kind === 327 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 331 /* JSDocAugmentsTag */; + return node.kind === 332 /* JSDocAugmentsTag */; } function isJSDocClassTag(node) { - return node.kind === 335 /* JSDocClassTag */; + return node.kind === 336 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 341 /* JSDocCallbackTag */; + return node.kind === 342 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 336 /* JSDocPublicTag */; + return node.kind === 337 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 337 /* JSDocPrivateTag */; + return node.kind === 338 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 338 /* JSDocProtectedTag */; + return node.kind === 339 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 339 /* JSDocReadonlyTag */; + return node.kind === 340 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 340 /* JSDocOverrideTag */; + return node.kind === 341 /* JSDocOverrideTag */; } function isJSDocOverloadTag(node) { - return node.kind === 342 /* JSDocOverloadTag */; + return node.kind === 343 /* JSDocOverloadTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 334 /* JSDocDeprecatedTag */; + return node.kind === 335 /* JSDocDeprecatedTag */; } function isJSDocEnumTag(node) { - return node.kind === 343 /* JSDocEnumTag */; + return node.kind === 344 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 344 /* JSDocParameterTag */; + return node.kind === 345 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 345 /* JSDocReturnTag */; + return node.kind === 346 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 346 /* JSDocThisTag */; + return node.kind === 347 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 347 /* JSDocTypeTag */; + return node.kind === 348 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 348 /* JSDocTemplateTag */; + return node.kind === 349 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 349 /* JSDocTypedefTag */; + return node.kind === 350 /* JSDocTypedefTag */; } function isJSDocPropertyTag(node) { - return node.kind === 351 /* JSDocPropertyTag */; + return node.kind === 352 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 332 /* JSDocImplementsTag */; + return node.kind === 333 /* JSDocImplementsTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 353 /* JSDocSatisfiesTag */; + return node.kind === 354 /* JSDocSatisfiesTag */; } // src/compiler/factory/utilities.ts @@ -24548,14 +24582,14 @@ Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -24608,7 +24642,7 @@ return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaExpression(node) { - return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */; + return node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -24623,19 +24657,19 @@ } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 235 /* SatisfiesExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 236 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -24769,10 +24803,10 @@ const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 269 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 270 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 275 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 276 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -24835,11 +24869,11 @@ } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -24858,11 +24892,11 @@ } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 166 /* Parameter */: - case 205 /* BindingElement */: + case 167 /* Parameter */: + case 206 /* BindingElement */: return bindingElement.dotDotDotToken; - case 227 /* SpreadElement */: - case 301 /* SpreadAssignment */: + case 228 /* SpreadElement */: + case 302 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -24874,7 +24908,7 @@ } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 205 /* BindingElement */: + case 206 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -24883,7 +24917,7 @@ return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -24892,7 +24926,7 @@ return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -24909,11 +24943,11 @@ } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return name.elements; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return name.properties; } } @@ -24930,15 +24964,15 @@ } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 174 /* Constructor */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 259 /* FunctionDeclaration */ || kind === 173 /* Constructor */ || kind === 178 /* IndexSignature */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 240 /* VariableStatement */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */; + return kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 260 /* FunctionDeclaration */ || kind === 174 /* Constructor */ || kind === 179 /* IndexSignature */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 280 /* MissingDeclaration */ || kind === 241 /* VariableStatement */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 275 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 172 /* ClassStaticBlockDeclaration */ || kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 279 /* MissingDeclaration */ || kind === 267 /* NamespaceExportDeclaration */; + return kind === 173 /* ClassStaticBlockDeclaration */ || kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 280 /* MissingDeclaration */ || kind === 268 /* NamespaceExportDeclaration */; } function isQuestionOrExclamationToken(node) { return isQuestionToken(node) || isExclamationToken(node); @@ -24977,7 +25011,7 @@ return isShiftOperator(kind) || isAdditiveOperatorOrHigher(kind); } function isRelationalOperator(kind) { - return kind === 29 /* LessThanToken */ || kind === 32 /* LessThanEqualsToken */ || kind === 31 /* GreaterThanToken */ || kind === 33 /* GreaterThanEqualsToken */ || kind === 102 /* InstanceOfKeyword */ || kind === 101 /* InKeyword */; + return kind === 29 /* LessThanToken */ || kind === 32 /* LessThanEqualsToken */ || kind === 31 /* GreaterThanToken */ || kind === 33 /* GreaterThanEqualsToken */ || kind === 103 /* InstanceOfKeyword */ || kind === 102 /* InKeyword */; } function isRelationalOperatorOrHigher(kind) { return isRelationalOperator(kind) || isShiftOperatorOrHigher(kind); @@ -25137,7 +25171,7 @@ } } function isExportOrDefaultKeywordKind(kind) { - return kind === 93 /* ExportKeyword */ || kind === 88 /* DefaultKeyword */; + return kind === 94 /* ExportKeyword */ || kind === 89 /* DefaultKeyword */; } function isExportOrDefaultModifier(node) { const kind = node.kind; @@ -25329,11 +25363,11 @@ } function canHaveModifiers(node) { const kind = node.kind; - return kind === 165 /* TypeParameter */ || kind === 166 /* Parameter */ || kind === 168 /* PropertySignature */ || kind === 169 /* PropertyDeclaration */ || kind === 170 /* MethodSignature */ || kind === 171 /* MethodDeclaration */ || kind === 173 /* Constructor */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 178 /* IndexSignature */ || kind === 182 /* ConstructorType */ || kind === 215 /* FunctionExpression */ || kind === 216 /* ArrowFunction */ || kind === 228 /* ClassExpression */ || kind === 240 /* VariableStatement */ || kind === 259 /* FunctionDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 275 /* ExportDeclaration */; + return kind === 166 /* TypeParameter */ || kind === 167 /* Parameter */ || kind === 169 /* PropertySignature */ || kind === 170 /* PropertyDeclaration */ || kind === 171 /* MethodSignature */ || kind === 172 /* MethodDeclaration */ || kind === 174 /* Constructor */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 179 /* IndexSignature */ || kind === 183 /* ConstructorType */ || kind === 216 /* FunctionExpression */ || kind === 217 /* ArrowFunction */ || kind === 229 /* ClassExpression */ || kind === 241 /* VariableStatement */ || kind === 260 /* FunctionDeclaration */ || kind === 261 /* ClassDeclaration */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 275 /* ExportAssignment */ || kind === 276 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 166 /* Parameter */ || kind === 169 /* PropertyDeclaration */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 228 /* ClassExpression */ || kind === 260 /* ClassDeclaration */; + return kind === 167 /* Parameter */ || kind === 170 /* PropertyDeclaration */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 229 /* ClassExpression */ || kind === 261 /* ClassDeclaration */; } // src/compiler/parser.ts @@ -25373,7 +25407,7 @@ return forEach(sourceFile.statements, isAnExternalModuleIndicatorNode) || getImportMetaIfNecessary(sourceFile); } function isAnExternalModuleIndicatorNode(node) { - return canHaveModifiers(node) && hasModifierOfKind(node, 93 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; + return canHaveModifiers(node) && hasModifierOfKind(node, 94 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { return sourceFile.flags & 4194304 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; @@ -25385,428 +25419,428 @@ return some(node.modifiers, (m) => m.kind === kind); } function isImportMeta2(node) { - return isMetaProperty(node) && node.keywordToken === 100 /* ImportKeyword */ && node.name.escapedText === "meta"; + return isMetaProperty(node) && node.keywordToken === 101 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [163 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [164 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [165 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [166 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [300 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [301 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [301 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [302 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [166 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [167 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [169 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [170 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [168 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [169 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [299 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [300 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [257 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [258 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [205 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [206 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [178 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [179 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [182 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [183 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [181 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [182 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [176 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [177 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [171 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [177 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [178 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [172 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [170 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [171 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [173 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [174 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [174 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [175 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [175 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [176 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [259 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [260 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [215 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [216 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [216 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [217 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [172 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [173 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [180 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [181 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [179 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [180 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [183 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [184 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [184 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [185 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [185 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [186 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [186 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [187 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [189 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [190 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [191 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [190 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [191 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [192 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [192 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [193 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [202 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [203 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [298 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [299 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [193 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [195 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [196 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [194 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [196 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [197 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [197 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [198 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [198 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [199 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [199 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [200 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [203 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [204 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [206 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [204 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [205 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [207 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [207 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [208 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [208 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [209 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [209 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [210 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [210 /* CallExpression */]: forEachChildInCallOrNewExpression, - [211 /* NewExpression */]: forEachChildInCallOrNewExpression, - [212 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [211 /* CallExpression */]: forEachChildInCallOrNewExpression, + [212 /* NewExpression */]: forEachChildInCallOrNewExpression, + [213 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [213 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [214 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [214 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [215 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [217 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [218 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [218 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [219 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [219 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [220 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [222 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [226 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [227 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [220 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [221 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [223 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [223 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [224 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [231 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [232 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [232 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [233 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [235 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [236 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [233 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [234 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [224 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [225 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [227 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [228 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [238 /* Block */]: forEachChildInBlock, - [265 /* ModuleBlock */]: forEachChildInBlock, - [308 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [239 /* Block */]: forEachChildInBlock, + [266 /* ModuleBlock */]: forEachChildInBlock, + [309 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [240 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [241 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [258 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [259 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [241 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [242 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [242 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [243 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [243 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [244 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [244 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [245 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [245 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [246 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [246 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [247 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [247 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [248 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [248 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [249 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [250 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [249 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [250 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [251 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [251 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [252 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [252 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [253 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [266 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [267 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [292 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [293 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [293 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [294 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [253 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [254 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [254 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [255 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [255 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [256 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [295 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [296 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [167 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [168 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [260 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [228 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [261 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [261 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [229 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [262 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [262 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [263 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [263 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [264 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [302 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [303 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [264 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [265 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [268 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [269 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [269 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [270 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [270 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [271 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [296 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [297 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [297 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [298 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [267 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [268 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [271 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [272 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [277 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [278 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [272 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [276 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [275 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [273 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [277 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [276 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [273 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [278 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [274 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [274 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [279 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [275 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [225 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [226 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [236 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [237 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [200 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [201 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [201 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [202 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [164 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [165 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [294 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [295 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [230 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [231 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [280 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [281 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [280 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [358 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [282 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [285 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [286 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [282 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [283 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [289 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [283 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [284 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [290 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [288 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [289 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [290 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [291 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [291 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [292 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [284 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [285 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [187 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [188 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [312 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [317 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [319 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [320 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [188 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [189 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [313 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [319 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [318 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [320 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [322 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [323 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [324 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [350 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [351 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [313 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [314 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [314 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [315 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [344 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [351 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [333 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [345 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [352 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [334 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [332 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [333 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [331 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [332 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [348 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [349 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [349 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 312 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [350 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 313 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [341 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [342 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [345 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [346 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [348 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [347 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [344 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [354 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [353 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [343 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [327 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [327 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [328 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [329 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [325 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [328 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [329 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [330 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [326 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [330 /* JSDocTag */]: forEachChildInJSDocTag, - [335 /* JSDocClassTag */]: forEachChildInJSDocTag, - [336 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [337 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [338 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [340 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [331 /* JSDocTag */]: forEachChildInJSDocTag, + [336 /* JSDocClassTag */]: forEachChildInJSDocTag, + [337 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [338 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [339 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [340 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [335 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [341 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [357 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -25861,7 +25895,7 @@ return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 162 /* LastToken */) { + if (node === void 0 || node.kind <= 163 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -25896,7 +25930,7 @@ continue; return res; } - if (current.kind >= 163 /* FirstNode */) { + if (current.kind >= 164 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -26142,9 +26176,9 @@ case 22 /* OpenBracketToken */: expression2 = parseArrayLiteralExpression(); break; - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: expression2 = parseTokenNode(); break; case 40 /* MinusToken */: @@ -26327,13 +26361,13 @@ speculationHelper(() => { const savedContextFlags = contextFlags; contextFlags |= 32768 /* AwaitContext */; - scanner.setTextPos(nextStatement.pos); + scanner.resetTokenState(nextStatement.pos); nextToken(); while (token() !== 1 /* EndOfFileToken */) { - const startPos = scanner.getStartPos(); + const startPos = scanner.getTokenFullStart(); const statement = parseListElement(0 /* SourceElements */, parseStatement); statements.push(statement); - if (startPos === scanner.getStartPos()) { + if (startPos === scanner.getTokenFullStart()) { nextToken(); } if (pos >= 0) { @@ -26521,7 +26555,7 @@ return inContext(32768 /* AwaitContext */); } function parseErrorAtCurrentToken(message, arg0) { - return parseErrorAt(scanner.getTokenPos(), scanner.getTextPos(), message, arg0); + return parseErrorAt(scanner.getTokenStart(), scanner.getTokenEnd(), message, arg0); } function parseErrorAtPosition(start, length2, message, arg0) { const lastError = lastOrUndefined(parseDiagnostics); @@ -26540,10 +26574,10 @@ parseErrorAt(range.pos, range.end, message, arg0); } function scanError(message, length2) { - parseErrorAtPosition(scanner.getTextPos(), length2, message); + parseErrorAtPosition(scanner.getTokenEnd(), length2, message); } function getNodePos() { - return scanner.getStartPos(); + return scanner.getTokenFullStart(); } function hasPrecedingJSDocComment() { return scanner.hasPrecedingJSDocComment(); @@ -26560,13 +26594,16 @@ } function nextToken() { if (isKeyword(currentToken) && (scanner.hasUnicodeEscape() || scanner.hasExtendedUnicodeEscape())) { - parseErrorAt(scanner.getTokenPos(), scanner.getTextPos(), Diagnostics.Keywords_cannot_contain_escape_characters); + parseErrorAt(scanner.getTokenStart(), scanner.getTokenEnd(), Diagnostics.Keywords_cannot_contain_escape_characters); } return nextTokenWithoutCheck(); } function nextTokenJSDoc() { return currentToken = scanner.scanJsDocToken(); } + function nextJSDocCommentTextToken(inBackticks) { + return currentToken = scanner.scanJSDocCommentTextToken(inBackticks); + } function reScanGreaterToken() { return currentToken = scanner.reScanGreaterToken(); } @@ -26620,19 +26657,19 @@ if (token() === 79 /* Identifier */) { return true; } - return token() > 116 /* LastReservedWord */; + return token() > 117 /* LastReservedWord */; } function isIdentifier2() { if (token() === 79 /* Identifier */) { return true; } - if (token() === 125 /* YieldKeyword */ && inYieldContext()) { + if (token() === 126 /* YieldKeyword */ && inYieldContext()) { return false; } - if (token() === 133 /* AwaitKeyword */ && inAwaitContext()) { + if (token() === 134 /* AwaitKeyword */ && inAwaitContext()) { return false; } - return token() > 116 /* LastReservedWord */; + return token() > 117 /* LastReservedWord */; } function parseExpected(kind, diagnosticMessage, shouldAdvance = true) { if (token() === kind) { @@ -26673,7 +26710,7 @@ parseErrorForInvalidName(Diagnostics.Interface_name_cannot_be_0, Diagnostics.Interface_must_be_given_a_name, 18 /* OpenBraceToken */); return; case "is": - parseErrorAt(pos, scanner.getTextPos(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + parseErrorAt(pos, scanner.getTokenStart(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); return; case "module": case "namespace": @@ -26828,11 +26865,11 @@ } function createNodeArray(elements, pos, end, hasTrailingComma) { const array = factoryCreateNodeArray(elements, hasTrailingComma); - setTextRangePosEnd(array, pos, end != null ? end : scanner.getStartPos()); + setTextRangePosEnd(array, pos, end != null ? end : scanner.getTokenFullStart()); return array; } function finishNode(node, pos, end) { - setTextRangePosEnd(node, pos, end != null ? end : scanner.getStartPos()); + setTextRangePosEnd(node, pos, end != null ? end : scanner.getTokenFullStart()); if (contextFlags) { node.flags |= contextFlags; } @@ -26844,7 +26881,7 @@ } function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, arg0) { if (reportAtCurrentPosition) { - parseErrorAtPosition(scanner.getStartPos(), 0, diagnosticMessage, arg0); + parseErrorAtPosition(scanner.getTokenFullStart(), 0, diagnosticMessage, arg0); } else if (diagnosticMessage) { parseErrorAtCurrentToken(diagnosticMessage, arg0); } @@ -26867,7 +26904,7 @@ "", /*isSingleQuote*/ void 0 - ) : kind === 279 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 280 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -26972,22 +27009,22 @@ } function nextTokenCanFollowModifier() { switch (token()) { - case 85 /* ConstKeyword */: - return nextToken() === 92 /* EnumKeyword */; - case 93 /* ExportKeyword */: + case 86 /* ConstKeyword */: + return nextToken() === 93 /* EnumKeyword */; + case 94 /* ExportKeyword */: nextToken(); - if (token() === 88 /* DefaultKeyword */) { + if (token() === 89 /* DefaultKeyword */) { return lookAhead(nextTokenCanFollowDefaultKeyword); } - if (token() === 154 /* TypeKeyword */) { + if (token() === 155 /* TypeKeyword */) { return lookAhead(nextTokenCanFollowExportModifier); } return canFollowExportModifier(); - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); - case 124 /* StaticKeyword */: - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: + case 125 /* StaticKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: nextToken(); return canFollowModifier(); default: @@ -26995,7 +27032,7 @@ } } function canFollowExportModifier() { - return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 128 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier(); + return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 129 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier(); } function nextTokenCanFollowExportModifier() { nextToken(); @@ -27009,7 +27046,7 @@ } function nextTokenCanFollowDefaultKeyword() { nextToken(); - return token() === 84 /* ClassKeyword */ || token() === 98 /* FunctionKeyword */ || token() === 118 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 132 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); + return token() === 85 /* ClassKeyword */ || token() === 99 /* FunctionKeyword */ || token() === 119 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 127 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 133 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); } function isListElement(parsingContext2, inErrorRecovery) { const node = currentNode(parsingContext2); @@ -27022,7 +27059,7 @@ case 3 /* SwitchClauseStatements */: return !(token() === 26 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); case 2 /* SwitchClauses */: - return token() === 82 /* CaseKeyword */ || token() === 88 /* DefaultKeyword */; + return token() === 83 /* CaseKeyword */ || token() === 89 /* DefaultKeyword */; case 4 /* TypeMembers */: return lookAhead(isTypeMemberStart); case 5 /* ClassMembers */: @@ -27059,7 +27096,7 @@ case 10 /* ArrayBindingElements */: return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern(); case 19 /* TypeParameters */: - return token() === 101 /* InKeyword */ || token() === 85 /* ConstKeyword */ || isIdentifier2(); + return token() === 102 /* InKeyword */ || token() === 86 /* ConstKeyword */ || isIdentifier2(); case 15 /* ArrayLiteralMembers */: switch (token()) { case 27 /* CommaToken */: @@ -27096,7 +27133,7 @@ Debug.assert(token() === 18 /* OpenBraceToken */); if (nextToken() === 19 /* CloseBraceToken */) { const next = nextToken(); - return next === 27 /* CommaToken */ || next === 18 /* OpenBraceToken */ || next === 94 /* ExtendsKeyword */ || next === 117 /* ImplementsKeyword */; + return next === 27 /* CommaToken */ || next === 18 /* OpenBraceToken */ || next === 95 /* ExtendsKeyword */ || next === 118 /* ImplementsKeyword */; } return true; } @@ -27113,7 +27150,7 @@ return tokenIsIdentifierOrKeywordOrGreaterThan(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 117 /* ImplementsKeyword */ || token() === 94 /* ExtendsKeyword */) { + if (token() === 118 /* ImplementsKeyword */ || token() === 95 /* ExtendsKeyword */) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -27142,13 +27179,13 @@ case 24 /* AssertEntries */: return token() === 19 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: - return token() === 19 /* CloseBraceToken */ || token() === 82 /* CaseKeyword */ || token() === 88 /* DefaultKeyword */; + return token() === 19 /* CloseBraceToken */ || token() === 83 /* CaseKeyword */ || token() === 89 /* DefaultKeyword */; case 7 /* HeritageClauseElement */: - return token() === 18 /* OpenBraceToken */ || token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 18 /* OpenBraceToken */ || token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; case 8 /* VariableDeclarations */: return isVariableDeclaratorListTerminator(); case 19 /* TypeParameters */: - return token() === 31 /* GreaterThanToken */ || token() === 20 /* OpenParenToken */ || token() === 18 /* OpenBraceToken */ || token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 31 /* GreaterThanToken */ || token() === 20 /* OpenParenToken */ || token() === 18 /* OpenBraceToken */ || token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; case 11 /* ArgumentExpressions */: return token() === 21 /* CloseParenToken */ || token() === 26 /* SemicolonToken */; case 15 /* ArrayLiteralMembers */: @@ -27230,7 +27267,7 @@ if (!syntaxCursor || !isReusableParsingContext(parsingContext2) || parseErrorBeforeNextFinishedNode) { return void 0; } - const node = syntaxCursor.currentNode(pos != null ? pos : scanner.getStartPos()); + const node = syntaxCursor.currentNode(pos != null ? pos : scanner.getTokenFullStart()); if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { return void 0; } @@ -27247,7 +27284,7 @@ return node; } function consumeNode(node) { - scanner.setTextPos(node.end); + scanner.resetTokenState(node.end); nextToken(); return node; } @@ -27292,14 +27329,14 @@ function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 173 /* Constructor */: - case 178 /* IndexSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: - case 237 /* SemicolonClassElement */: + case 174 /* Constructor */: + case 179 /* IndexSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 238 /* SemicolonClassElement */: return true; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -27310,8 +27347,8 @@ function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return true; } } @@ -27320,65 +27357,65 @@ function isReusableStatement(node) { if (node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 240 /* VariableStatement */: - case 238 /* Block */: - case 242 /* IfStatement */: - case 241 /* ExpressionStatement */: - case 254 /* ThrowStatement */: - case 250 /* ReturnStatement */: - case 252 /* SwitchStatement */: - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 239 /* EmptyStatement */: - case 255 /* TryStatement */: - case 253 /* LabeledStatement */: - case 243 /* DoStatement */: - case 256 /* DebuggerStatement */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + case 241 /* VariableStatement */: + case 239 /* Block */: + case 243 /* IfStatement */: + case 242 /* ExpressionStatement */: + case 255 /* ThrowStatement */: + case 251 /* ReturnStatement */: + case 253 /* SwitchStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 240 /* EmptyStatement */: + case 256 /* TryStatement */: + case 254 /* LabeledStatement */: + case 244 /* DoStatement */: + case 257 /* DebuggerStatement */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 302 /* EnumMember */; + return node.kind === 303 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 168 /* PropertySignature */: - case 176 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 169 /* PropertySignature */: + case 177 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 257 /* VariableDeclaration */) { + if (node.kind !== 258 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 166 /* Parameter */) { + if (node.kind !== 167 /* Parameter */) { return false; } const parameter = node; @@ -27395,7 +27432,7 @@ function parsingContextErrors(context) { switch (context) { case 0 /* SourceElements */: - return token() === 88 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(93 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); + return token() === 89 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(94 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); case 1 /* BlockStatements */: return parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); case 2 /* SwitchClauses */: @@ -27461,14 +27498,14 @@ /*inErrorRecovery*/ false )) { - const startPos = scanner.getStartPos(); + const startPos = scanner.getTokenFullStart(); const result = parseListElement(kind, parseElement); if (!result) { parsingContext = saveParsingContext; return void 0; } list.push(result); - commaStart = scanner.getTokenPos(); + commaStart = scanner.getTokenStart(); if (parseOptional(27 /* CommaToken */)) { continue; } @@ -27480,7 +27517,7 @@ if (considerSemicolonAsDelimiter && token() === 26 /* SemicolonToken */ && !scanner.hasPrecedingLineBreak()) { nextToken(); } - if (startPos === scanner.getStartPos()) { + if (startPos === scanner.getTokenFullStart()) { nextToken(); } continue; @@ -27711,14 +27748,14 @@ } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return nodeIsMissing(node.typeName); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: { + case 182 /* FunctionType */: + case 183 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -27787,7 +27824,7 @@ function parseJSDocParameter() { const pos = getNodePos(); let name; - if (token() === 108 /* ThisKeyword */ || token() === 103 /* NewKeyword */) { + if (token() === 109 /* ThisKeyword */ || token() === 104 /* NewKeyword */) { name = parseIdentifierName(); parseExpected(58 /* ColonToken */); } @@ -27811,7 +27848,7 @@ function parseJSDocType() { scanner.setInJSDocType(true); const pos = getNodePos(); - if (parseOptional(142 /* ModuleKeyword */)) { + if (parseOptional(143 /* ModuleKeyword */)) { const moduleTag = factory2.createJSDocNamepathType( /*type*/ void 0 @@ -27845,7 +27882,7 @@ } function parseTypeQuery() { const pos = getNodePos(); - parseExpected(112 /* TypeOfKeyword */); + parseExpected(113 /* TypeOfKeyword */); const entityName = parseEntityName( /*allowReservedWords*/ true @@ -27864,7 +27901,7 @@ const name = parseIdentifier(); let constraint; let expression; - if (parseOptional(94 /* ExtendsKeyword */)) { + if (parseOptional(95 /* ExtendsKeyword */)) { if (isStartOfType() || !isStartOfExpression()) { constraint = parseType(); } else { @@ -27917,7 +27954,7 @@ /*allowDecorators*/ true )); - if (token() === 108 /* ThisKeyword */) { + if (token() === 109 /* ThisKeyword */) { const node2 = factory2.createParameterDeclaration( modifiers, /*dotDotDotToken*/ @@ -28010,8 +28047,8 @@ function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 177 /* ConstructSignature */) { - parseExpected(103 /* NewKeyword */); + if (kind === 178 /* ConstructSignature */) { + parseExpected(104 /* NewKeyword */); } const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); @@ -28021,7 +28058,7 @@ true ); parseTypeMemberSemicolon(); - const node = kind === 176 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 177 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -28084,7 +28121,7 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function isTypeMemberStart() { - if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 137 /* GetKeyword */ || token() === 151 /* SetKeyword */) { + if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 138 /* GetKeyword */ || token() === 152 /* SetKeyword */) { return true; } let idToken = false; @@ -28106,10 +28143,10 @@ } function parseTypeMember() { if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) { - return parseSignatureMember(176 /* CallSignature */); + return parseSignatureMember(177 /* CallSignature */); } - if (token() === 103 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(177 /* ConstructSignature */); + if (token() === 104 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { + return parseSignatureMember(178 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -28117,11 +28154,11 @@ /*allowDecorators*/ false ); - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 4 /* Type */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 4 /* Type */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 4 /* Type */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -28161,17 +28198,17 @@ function isStartOfMappedType() { nextToken(); if (token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { - return nextToken() === 146 /* ReadonlyKeyword */; + return nextToken() === 147 /* ReadonlyKeyword */; } - if (token() === 146 /* ReadonlyKeyword */) { + if (token() === 147 /* ReadonlyKeyword */) { nextToken(); } - return token() === 22 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 101 /* InKeyword */; + return token() === 22 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 102 /* InKeyword */; } function parseMappedTypeParameter() { const pos = getNodePos(); const name = parseIdentifierName(); - parseExpected(101 /* InKeyword */); + parseExpected(102 /* InKeyword */); const type = parseType(); return finishNode(factory2.createTypeParameterDeclaration( /*modifiers*/ @@ -28186,15 +28223,15 @@ const pos = getNodePos(); parseExpected(18 /* OpenBraceToken */); let readonlyToken; - if (token() === 146 /* ReadonlyKeyword */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { + if (token() === 147 /* ReadonlyKeyword */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { readonlyToken = parseTokenNode(); - if (readonlyToken.kind !== 146 /* ReadonlyKeyword */) { - parseExpected(146 /* ReadonlyKeyword */); + if (readonlyToken.kind !== 147 /* ReadonlyKeyword */) { + parseExpected(147 /* ReadonlyKeyword */); } } parseExpected(22 /* OpenBracketToken */); const typeParameter = parseMappedTypeParameter(); - const nameType = parseOptional(128 /* AsKeyword */) ? parseType() : void 0; + const nameType = parseOptional(129 /* AsKeyword */) ? parseType() : void 0; parseExpected(23 /* CloseBracketToken */); let questionToken; if (token() === 57 /* QuestionToken */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { @@ -28264,10 +28301,10 @@ } function parseModifiersForConstructorType() { let modifiers; - if (token() === 126 /* AbstractKeyword */) { + if (token() === 127 /* AbstractKeyword */) { const pos = getNodePos(); nextToken(); - const modifier = finishNode(factoryCreateToken(126 /* AbstractKeyword */), pos); + const modifier = finishNode(factoryCreateToken(127 /* AbstractKeyword */), pos); modifiers = createNodeArray([modifier], pos); } return modifiers; @@ -28276,7 +28313,7 @@ const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiersForConstructorType(); - const isConstructorType = parseOptional(103 /* NewKeyword */); + const isConstructorType = parseOptional(104 /* NewKeyword */); Debug.assert(!modifiers || isConstructorType, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers."); const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); @@ -28297,7 +28334,7 @@ if (negative) { nextToken(); } - let expression = token() === 110 /* TrueKeyword */ || token() === 95 /* FalseKeyword */ || token() === 104 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); + let expression = token() === 111 /* TrueKeyword */ || token() === 96 /* FalseKeyword */ || token() === 105 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); if (negative) { expression = finishNode(factory2.createPrefixUnaryExpression(40 /* MinusToken */, expression), pos); } @@ -28305,14 +28342,14 @@ } function isStartOfTypeOfImportType() { nextToken(); - return token() === 100 /* ImportKeyword */; + return token() === 101 /* ImportKeyword */; } function parseImportTypeAssertions() { const pos = getNodePos(); - const openBracePosition = scanner.getTokenPos(); + const openBracePosition = scanner.getTokenStart(); parseExpected(18 /* OpenBraceToken */); const multiLine = scanner.hasPrecedingLineBreak(); - parseExpected(130 /* AssertKeyword */); + parseExpected(131 /* AssertKeyword */); parseExpected(58 /* ColonToken */); const clause = parseAssertClause( /*skipAssertKeyword*/ @@ -28332,8 +28369,8 @@ function parseImportType() { sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); - const isTypeOf = parseOptional(112 /* TypeOfKeyword */); - parseExpected(100 /* ImportKeyword */); + const isTypeOf = parseOptional(113 /* TypeOfKeyword */); + parseExpected(101 /* ImportKeyword */); parseExpected(20 /* OpenParenToken */); const type = parseType(); let assertions; @@ -28351,16 +28388,16 @@ } function parseNonArrayType() { switch (token()) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 153 /* SymbolKeyword */: - case 134 /* BooleanKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: - case 149 /* ObjectKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 154 /* SymbolKeyword */: + case 135 /* BooleanKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: + case 150 /* ObjectKeyword */: return tryParse(parseKeywordAndNoDot) || parseTypeReference(); case 66 /* AsteriskEqualsToken */: scanner.reScanAsteriskEqualsToken(); @@ -28370,7 +28407,7 @@ scanner.reScanQuestionToken(); case 57 /* QuestionToken */: return parseJSDocUnknownOrNullableType(); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseJSDocFunctionType(); case 53 /* ExclamationToken */: return parseJSDocNonNullableType(); @@ -28378,26 +28415,26 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: return parseLiteralTypeNode(); case 40 /* MinusToken */: return lookAhead(nextTokenIsNumericOrBigIntLiteral) ? parseLiteralTypeNode( /*negative*/ true ) : parseTypeReference(); - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return parseTokenNode(); - case 108 /* ThisKeyword */: { + case 109 /* ThisKeyword */: { const thisKeyword = parseThisTypeNode(); - if (token() === 140 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 141 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - case 112 /* TypeOfKeyword */: + case 113 /* TypeOfKeyword */: return lookAhead(isStartOfTypeOfImportType) ? parseImportType() : parseTypeQuery(); case 18 /* OpenBraceToken */: return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); @@ -28405,9 +28442,9 @@ return parseTupleType(); case 20 /* OpenParenToken */: return parseParenthesizedType(); - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return parseImportType(); - case 129 /* AssertsKeyword */: + case 130 /* AssertsKeyword */: return lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine) ? parseAssertsTypePredicate() : parseTypeReference(); case 15 /* TemplateHead */: return parseTemplateType(); @@ -28417,44 +28454,44 @@ } function isStartOfType(inStartOfParameter) { switch (token()) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 146 /* ReadonlyKeyword */: - case 153 /* SymbolKeyword */: - case 156 /* UniqueKeyword */: - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 104 /* NullKeyword */: - case 108 /* ThisKeyword */: - case 112 /* TypeOfKeyword */: - case 144 /* NeverKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 147 /* ReadonlyKeyword */: + case 154 /* SymbolKeyword */: + case 157 /* UniqueKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 105 /* NullKeyword */: + case 109 /* ThisKeyword */: + case 113 /* TypeOfKeyword */: + case 145 /* NeverKeyword */: case 18 /* OpenBraceToken */: case 22 /* OpenBracketToken */: case 29 /* LessThanToken */: case 51 /* BarToken */: case 50 /* AmpersandToken */: - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 149 /* ObjectKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 150 /* ObjectKeyword */: case 41 /* AsteriskToken */: case 57 /* QuestionToken */: case 53 /* ExclamationToken */: case 25 /* DotDotDotToken */: - case 138 /* InferKeyword */: - case 100 /* ImportKeyword */: - case 129 /* AssertsKeyword */: + case 139 /* InferKeyword */: + case 101 /* ImportKeyword */: + case 130 /* AssertsKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: return true; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return !inStartOfParameter; case 40 /* MinusToken */: return !inStartOfParameter && lookAhead(nextTokenIsNumericOrBigIntLiteral); @@ -28518,7 +28555,7 @@ return finishNode(factory2.createTypeOperatorNode(operator, parseTypeOperatorOrHigher()), pos); } function tryParseConstraintOfInferType() { - if (parseOptional(94 /* ExtendsKeyword */)) { + if (parseOptional(95 /* ExtendsKeyword */)) { const constraint = disallowConditionalTypesAnd(parseType); if (inDisallowConditionalTypesContext() || token() !== 57 /* QuestionToken */) { return constraint; @@ -28539,17 +28576,17 @@ } function parseInferType() { const pos = getNodePos(); - parseExpected(138 /* InferKeyword */); + parseExpected(139 /* InferKeyword */); return finishNode(factory2.createInferTypeNode(parseTypeParameterOfInferType()), pos); } function parseTypeOperatorOrHigher() { const operator = token(); switch (operator) { - case 141 /* KeyOfKeyword */: - case 156 /* UniqueKeyword */: - case 146 /* ReadonlyKeyword */: + case 142 /* KeyOfKeyword */: + case 157 /* UniqueKeyword */: + case 147 /* ReadonlyKeyword */: return parseTypeOperator(operator); - case 138 /* InferKeyword */: + case 139 /* InferKeyword */: return parseInferType(); } return allowConditionalTypesAnd(parsePostfixTypeOrHigher); @@ -28590,7 +28627,7 @@ } function nextTokenIsNewKeyword() { nextToken(); - return token() === 103 /* NewKeyword */; + return token() === 104 /* NewKeyword */; } function isStartOfFunctionTypeOrConstructorType() { if (token() === 29 /* LessThanToken */) { @@ -28599,7 +28636,7 @@ if (token() === 20 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType)) { return true; } - return token() === 103 /* NewKeyword */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); + return token() === 104 /* NewKeyword */ || token() === 127 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); } function skipParameterStart() { if (isModifierKind(token())) { @@ -28608,7 +28645,7 @@ false ); } - if (isIdentifier2() || token() === 108 /* ThisKeyword */) { + if (isIdentifier2() || token() === 109 /* ThisKeyword */) { nextToken(); return true; } @@ -28654,16 +28691,16 @@ } function parseTypePredicatePrefix() { const id = parseIdentifier(); - if (token() === 140 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 141 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { nextToken(); return id; } } function parseAssertsTypePredicate() { const pos = getNodePos(); - const assertsModifier = parseExpectedToken(129 /* AssertsKeyword */); - const parameterName = token() === 108 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); - const type = parseOptional(140 /* IsKeyword */) ? parseType() : void 0; + const assertsModifier = parseExpectedToken(130 /* AssertsKeyword */); + const parameterName = token() === 109 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); + const type = parseOptional(141 /* IsKeyword */) ? parseType() : void 0; return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); } function parseType() { @@ -28675,7 +28712,7 @@ } const pos = getNodePos(); const type = parseUnionTypeOrHigher(); - if (!inDisallowConditionalTypesContext() && !scanner.hasPrecedingLineBreak() && parseOptional(94 /* ExtendsKeyword */)) { + if (!inDisallowConditionalTypesContext() && !scanner.hasPrecedingLineBreak() && parseOptional(95 /* ExtendsKeyword */)) { const extendsType = disallowConditionalTypesAnd(parseType); parseExpected(57 /* QuestionToken */); const trueType = allowConditionalTypesAnd(parseType); @@ -28690,11 +28727,11 @@ } function isStartOfLeftHandSideExpression() { switch (token()) { - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: @@ -28703,14 +28740,14 @@ case 20 /* OpenParenToken */: case 22 /* OpenBracketToken */: case 18 /* OpenBraceToken */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 103 /* NewKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 104 /* NewKeyword */: case 43 /* SlashToken */: case 68 /* SlashEqualsToken */: case 79 /* Identifier */: return true; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return lookAhead(nextTokenIsOpenParenOrLessThanOrDot); default: return isIdentifier2(); @@ -28725,14 +28762,14 @@ case 40 /* MinusToken */: case 54 /* TildeToken */: case 53 /* ExclamationToken */: - case 89 /* DeleteKeyword */: - case 112 /* TypeOfKeyword */: - case 114 /* VoidKeyword */: + case 90 /* DeleteKeyword */: + case 113 /* TypeOfKeyword */: + case 115 /* VoidKeyword */: case 45 /* PlusPlusToken */: case 46 /* MinusMinusToken */: case 29 /* LessThanToken */: - case 133 /* AwaitKeyword */: - case 125 /* YieldKeyword */: + case 134 /* AwaitKeyword */: + case 126 /* YieldKeyword */: case 80 /* PrivateIdentifier */: case 59 /* AtToken */: return true; @@ -28744,7 +28781,7 @@ } } function isStartOfExpressionStatement() { - return token() !== 18 /* OpenBraceToken */ && token() !== 98 /* FunctionKeyword */ && token() !== 84 /* ClassKeyword */ && token() !== 59 /* AtToken */ && isStartOfExpression(); + return token() !== 18 /* OpenBraceToken */ && token() !== 99 /* FunctionKeyword */ && token() !== 85 /* ClassKeyword */ && token() !== 59 /* AtToken */ && isStartOfExpression(); } function parseExpression() { const saveDecoratorContext = inDecoratorContext(); @@ -28805,7 +28842,7 @@ return parseConditionalExpressionRest(expr, pos, allowReturnTypeInArrowFunction); } function isYieldExpression() { - if (token() === 125 /* YieldKeyword */) { + if (token() === 126 /* YieldKeyword */) { if (inYieldContext()) { return true; } @@ -28888,7 +28925,7 @@ ) : tryParse(() => parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction)); } function isParenthesizedArrowFunctionExpression() { - if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 132 /* AsyncKeyword */) { + if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 133 /* AsyncKeyword */) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } if (token() === 38 /* EqualsGreaterThanToken */) { @@ -28897,7 +28934,7 @@ return 0 /* False */; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { nextToken(); if (scanner.hasPrecedingLineBreak()) { return 0 /* False */; @@ -28926,13 +28963,13 @@ if (second === 25 /* DotDotDotToken */) { return 1 /* True */; } - if (isModifierKind(second) && second !== 132 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { - if (nextToken() === 128 /* AsKeyword */) { + if (isModifierKind(second) && second !== 133 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { + if (nextToken() === 129 /* AsKeyword */) { return 0 /* False */; } return 1 /* True */; } - if (!isIdentifier2() && second !== 108 /* ThisKeyword */) { + if (!isIdentifier2() && second !== 109 /* ThisKeyword */) { return 0 /* False */; } switch (nextToken()) { @@ -28952,14 +28989,14 @@ return 0 /* False */; } else { Debug.assert(first2 === 29 /* LessThanToken */); - if (!isIdentifier2() && token() !== 85 /* ConstKeyword */) { + if (!isIdentifier2() && token() !== 86 /* ConstKeyword */) { return 0 /* False */; } if (languageVariant === 1 /* JSX */) { const isArrowFunctionInJsx = lookAhead(() => { - parseOptional(85 /* ConstKeyword */); + parseOptional(86 /* ConstKeyword */); const third = nextToken(); - if (third === 94 /* ExtendsKeyword */) { + if (third === 95 /* ExtendsKeyword */) { const fourth = nextToken(); switch (fourth) { case 63 /* EqualsToken */: @@ -28983,7 +29020,7 @@ } } function parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { - const tokenPos = scanner.getTokenPos(); + const tokenPos = scanner.getTokenStart(); if (notParenthesizedArrow == null ? void 0 : notParenthesizedArrow.has(tokenPos)) { return void 0; } @@ -28998,7 +29035,7 @@ return result; } function tryParseAsyncSimpleArrowFunctionExpression(allowReturnTypeInArrowFunction) { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { const pos = getNodePos(); const asyncModifier = parseModifiersForArrowFunction(); @@ -29009,7 +29046,7 @@ return void 0; } function isUnParenthesizedAsyncArrowFunctionWorker() { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { nextToken(); if (scanner.hasPrecedingLineBreak() || token() === 38 /* EqualsGreaterThanToken */) { return 0 /* False */; @@ -29057,7 +29094,7 @@ return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 193 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 194 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -29079,7 +29116,7 @@ if (token() === 18 /* OpenBraceToken */) { return parseFunctionBlock(isAsync ? 2 /* Await */ : 0 /* None */); } - if (token() !== 26 /* SemicolonToken */ && token() !== 98 /* FunctionKeyword */ && token() !== 84 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { + if (token() !== 26 /* SemicolonToken */ && token() !== 99 /* FunctionKeyword */ && token() !== 85 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { return parseFunctionBlock(16 /* IgnoreMissingOpenBrace */ | (isAsync ? 2 /* Await */ : 0 /* None */)); } const savedTopLevel = topLevel; @@ -29120,7 +29157,7 @@ return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 101 /* InKeyword */ || t === 162 /* OfKeyword */; + return t === 102 /* InKeyword */ || t === 163 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -29130,16 +29167,16 @@ if (!consumeCurrentOperator) { break; } - if (token() === 101 /* InKeyword */ && inDisallowInContext()) { + if (token() === 102 /* InKeyword */ && inDisallowInContext()) { break; } - if (token() === 128 /* AsKeyword */ || token() === 150 /* SatisfiesKeyword */) { + if (token() === 129 /* AsKeyword */ || token() === 151 /* SatisfiesKeyword */) { if (scanner.hasPrecedingLineBreak()) { break; } else { const keywordKind = token(); nextToken(); - leftOperand = keywordKind === 150 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); + leftOperand = keywordKind === 151 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); } } else { leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence), pos); @@ -29148,7 +29185,7 @@ return leftOperand; } function isBinaryOperator2() { - if (inDisallowInContext() && token() === 101 /* InKeyword */) { + if (inDisallowInContext() && token() === 102 /* InKeyword */) { return false; } return getBinaryOperatorPrecedence(token()) > 0; @@ -29179,7 +29216,7 @@ return finishNode(factory2.createVoidExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos); } function isAwaitExpression2() { - if (token() === 133 /* AwaitKeyword */) { + if (token() === 134 /* AwaitKeyword */) { if (inAwaitContext()) { return true; } @@ -29202,7 +29239,7 @@ if (token() === 42 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 213 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 214 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { parseErrorAt(pos, end, Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, tokenToString(unaryOperator)); @@ -29217,11 +29254,11 @@ case 54 /* TildeToken */: case 53 /* ExclamationToken */: return parsePrefixUnaryExpression(); - case 89 /* DeleteKeyword */: + case 90 /* DeleteKeyword */: return parseDeleteExpression(); - case 112 /* TypeOfKeyword */: + case 113 /* TypeOfKeyword */: return parseTypeOfExpression(); - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return parseVoidExpression(); case 29 /* LessThanToken */: if (languageVariant === 1 /* JSX */) { @@ -29231,7 +29268,7 @@ ); } return parseTypeAssertion(); - case 133 /* AwaitKeyword */: + case 134 /* AwaitKeyword */: if (isAwaitExpression2()) { return parseAwaitExpression(); } @@ -29245,10 +29282,10 @@ case 40 /* MinusToken */: case 54 /* TildeToken */: case 53 /* ExclamationToken */: - case 89 /* DeleteKeyword */: - case 112 /* TypeOfKeyword */: - case 114 /* VoidKeyword */: - case 133 /* AwaitKeyword */: + case 90 /* DeleteKeyword */: + case 113 /* TypeOfKeyword */: + case 115 /* VoidKeyword */: + case 134 /* AwaitKeyword */: return false; case 29 /* LessThanToken */: if (languageVariant !== 1 /* JSX */) { @@ -29280,20 +29317,20 @@ function parseLeftHandSideExpressionOrHigher() { const pos = getNodePos(); let expression; - if (token() === 100 /* ImportKeyword */) { + if (token() === 101 /* ImportKeyword */) { if (lookAhead(nextTokenIsOpenParenOrLessThan)) { sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; expression = parseTokenNode(); } else if (lookAhead(nextTokenIsDot)) { nextToken(); nextToken(); - expression = finishNode(factory2.createMetaProperty(100 /* ImportKeyword */, parseIdentifierName()), pos); + expression = finishNode(factory2.createMetaProperty(101 /* ImportKeyword */, parseIdentifierName()), pos); sourceFlags |= 4194304 /* PossiblyContainsImportMeta */; } else { expression = parseMemberExpressionOrHigher(); } } else { - expression = token() === 106 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); + expression = token() === 107 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); } return parseCallExpressionRest(pos, expression); } @@ -29335,11 +29372,11 @@ const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 283 /* JsxOpeningElement */) { + if (opening.kind === 284 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 281 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 282 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -29363,10 +29400,10 @@ } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 286 /* JsxOpeningFragment */) { + } else if (opening.kind === 287 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 282 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 283 /* JsxSelfClosingElement */); result = opening; } if (inExpressionContext && token() === 29 /* LessThanToken */) { @@ -29439,7 +29476,7 @@ if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 281 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 282 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -29486,7 +29523,7 @@ function parseJsxElementName() { const pos = getNodePos(); scanJsxIdentifier(); - let expression = token() === 108 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); + let expression = token() === 109 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); while (parseOptional(24 /* DotToken */)) { expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot( /*allowIdentifierNames*/ @@ -29689,7 +29726,7 @@ continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 230 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 231 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -29749,7 +29786,7 @@ } } if (typeArguments || token() === 20 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 231 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -29813,11 +29850,11 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return parseLiteralNode(); - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: return parseTokenNode(); case 20 /* OpenParenToken */: return parseParenthesizedExpression(); @@ -29825,18 +29862,18 @@ return parseArrayLiteralExpression(); case 18 /* OpenBraceToken */: return parseObjectLiteralExpression(); - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { break; } return parseFunctionExpression(); case 59 /* AtToken */: return parseDecoratedExpression(); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassExpression(); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionExpression(); - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: return parseNewExpressionOrNewDotTarget(); case 43 /* SlashToken */: case 68 /* SlashEqualsToken */: @@ -29882,7 +29919,7 @@ } function parseArrayLiteralExpression() { const pos = getNodePos(); - const openBracketPosition = scanner.getTokenPos(); + const openBracketPosition = scanner.getTokenStart(); const openBracketParsed = parseExpected(22 /* OpenBracketToken */); const multiLine = scanner.hasPrecedingLineBreak(); const elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); @@ -29903,11 +29940,11 @@ /*allowDecorators*/ true ); - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 0 /* None */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -29942,7 +29979,7 @@ } function parseObjectLiteralExpression() { const pos = getNodePos(); - const openBracePosition = scanner.getTokenPos(); + const openBracePosition = scanner.getTokenStart(); const openBraceParsed = parseExpected(18 /* OpenBraceToken */); const multiLine = scanner.hasPrecedingLineBreak(); const properties = parseDelimitedList( @@ -29966,7 +30003,7 @@ /*allowDecorators*/ false ); - parseExpected(98 /* FunctionKeyword */); + parseExpected(99 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */; @@ -29988,10 +30025,10 @@ } function parseNewExpressionOrNewDotTarget() { const pos = getNodePos(); - parseExpected(103 /* NewKeyword */); + parseExpected(104 /* NewKeyword */); if (parseOptional(24 /* DotToken */)) { const name = parseIdentifierName(); - return finishNode(factory2.createMetaProperty(103 /* NewKeyword */, name), pos); + return finishNode(factory2.createMetaProperty(104 /* NewKeyword */, name), pos); } const expressionPos = getNodePos(); let expression = parseMemberExpressionRest( @@ -30001,7 +30038,7 @@ false ); let typeArguments; - if (expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (expression.kind === 231 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -30014,7 +30051,7 @@ function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - const openBracePosition = scanner.getTokenPos(); + const openBracePosition = scanner.getTokenStart(); const openBraceParsed = parseExpected(18 /* OpenBraceToken */, diagnosticMessage); if (openBraceParsed || ignoreMissingOpenBrace) { const multiLine = scanner.hasPrecedingLineBreak(); @@ -30070,22 +30107,22 @@ function parseIfStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(99 /* IfKeyword */); - const openParenPosition = scanner.getTokenPos(); + parseExpected(100 /* IfKeyword */); + const openParenPosition = scanner.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); const thenStatement = parseStatement(); - const elseStatement = parseOptional(91 /* ElseKeyword */) ? parseStatement() : void 0; + const elseStatement = parseOptional(92 /* ElseKeyword */) ? parseStatement() : void 0; return withJSDoc(finishNode(factoryCreateIfStatement(expression, thenStatement, elseStatement), pos), hasJSDoc); } function parseDoStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(90 /* DoKeyword */); + parseExpected(91 /* DoKeyword */); const statement = parseStatement(); - parseExpected(115 /* WhileKeyword */); - const openParenPosition = scanner.getTokenPos(); + parseExpected(116 /* WhileKeyword */); + const openParenPosition = scanner.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -30095,8 +30132,8 @@ function parseWhileStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(115 /* WhileKeyword */); - const openParenPosition = scanner.getTokenPos(); + parseExpected(116 /* WhileKeyword */); + const openParenPosition = scanner.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -30106,12 +30143,12 @@ function parseForOrForInOrForOfStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(97 /* ForKeyword */); - const awaitToken = parseOptionalToken(133 /* AwaitKeyword */); + parseExpected(98 /* ForKeyword */); + const awaitToken = parseOptionalToken(134 /* AwaitKeyword */); parseExpected(20 /* OpenParenToken */); let initializer; if (token() !== 26 /* SemicolonToken */) { - if (token() === 113 /* VarKeyword */ || token() === 119 /* LetKeyword */ || token() === 85 /* ConstKeyword */) { + if (token() === 114 /* VarKeyword */ || token() === 120 /* LetKeyword */ || token() === 86 /* ConstKeyword */) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -30121,14 +30158,14 @@ } } let node; - if (awaitToken ? parseExpected(162 /* OfKeyword */) : parseOptional(162 /* OfKeyword */)) { + if (awaitToken ? parseExpected(163 /* OfKeyword */) : parseOptional(163 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ true )); parseExpected(21 /* CloseParenToken */); node = factoryCreateForOfStatement(awaitToken, initializer, expression, parseStatement()); - } else if (parseOptional(101 /* InKeyword */)) { + } else if (parseOptional(102 /* InKeyword */)) { const expression = allowInAnd(parseExpression); parseExpected(21 /* CloseParenToken */); node = factory2.createForInStatement(initializer, expression, parseStatement()); @@ -30145,16 +30182,16 @@ function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 249 /* BreakStatement */ ? 81 /* BreakKeyword */ : 86 /* ContinueKeyword */); + parseExpected(kind === 250 /* BreakStatement */ ? 82 /* BreakKeyword */ : 87 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 249 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 250 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(105 /* ReturnKeyword */); + parseExpected(106 /* ReturnKeyword */); const expression = canParseSemicolon() ? void 0 : allowInAnd(parseExpression); parseSemicolon(); return withJSDoc(finishNode(factory2.createReturnStatement(expression), pos), hasJSDoc); @@ -30162,8 +30199,8 @@ function parseWithStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(116 /* WithKeyword */); - const openParenPosition = scanner.getTokenPos(); + parseExpected(117 /* WithKeyword */); + const openParenPosition = scanner.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -30173,7 +30210,7 @@ function parseCaseClause() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(82 /* CaseKeyword */); + parseExpected(83 /* CaseKeyword */); const expression = allowInAnd(parseExpression); parseExpected(58 /* ColonToken */); const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); @@ -30181,13 +30218,13 @@ } function parseDefaultClause() { const pos = getNodePos(); - parseExpected(88 /* DefaultKeyword */); + parseExpected(89 /* DefaultKeyword */); parseExpected(58 /* ColonToken */); const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); return finishNode(factory2.createDefaultClause(statements), pos); } function parseCaseOrDefaultClause() { - return token() === 82 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + return token() === 83 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseCaseBlock() { const pos = getNodePos(); @@ -30199,7 +30236,7 @@ function parseSwitchStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(107 /* SwitchKeyword */); + parseExpected(108 /* SwitchKeyword */); parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpected(21 /* CloseParenToken */); @@ -30209,7 +30246,7 @@ function parseThrowStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(109 /* ThrowKeyword */); + parseExpected(110 /* ThrowKeyword */); let expression = scanner.hasPrecedingLineBreak() ? void 0 : allowInAnd(parseExpression); if (expression === void 0) { identifierCount++; @@ -30223,15 +30260,15 @@ function parseTryStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(111 /* TryKeyword */); + parseExpected(112 /* TryKeyword */); const tryBlock = parseBlock( /*ignoreMissingOpenBrace*/ false ); - const catchClause = token() === 83 /* CatchKeyword */ ? parseCatchClause() : void 0; + const catchClause = token() === 84 /* CatchKeyword */ ? parseCatchClause() : void 0; let finallyBlock; - if (!catchClause || token() === 96 /* FinallyKeyword */) { - parseExpected(96 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); + if (!catchClause || token() === 97 /* FinallyKeyword */) { + parseExpected(97 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); finallyBlock = parseBlock( /*ignoreMissingOpenBrace*/ false @@ -30241,7 +30278,7 @@ } function parseCatchClause() { const pos = getNodePos(); - parseExpected(83 /* CatchKeyword */); + parseExpected(84 /* CatchKeyword */); let variableDeclaration; if (parseOptional(20 /* OpenParenToken */)) { variableDeclaration = parseVariableDeclaration(); @@ -30258,7 +30295,7 @@ function parseDebuggerStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(87 /* DebuggerKeyword */); + parseExpected(88 /* DebuggerKeyword */); parseSemicolon(); return withJSDoc(finishNode(factory2.createDebuggerStatement(), pos), hasJSDoc); } @@ -30287,11 +30324,11 @@ } function nextTokenIsClassKeywordOnSameLine() { nextToken(); - return token() === 84 /* ClassKeyword */ && !scanner.hasPrecedingLineBreak(); + return token() === 85 /* ClassKeyword */ && !scanner.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token() === 98 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); + return token() === 99 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine() { nextToken(); @@ -30300,48 +30337,48 @@ function isDeclaration2() { while (true) { switch (token()) { - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: return true; - case 118 /* InterfaceKeyword */: - case 154 /* TypeKeyword */: + case 119 /* InterfaceKeyword */: + case 155 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 146 /* ReadonlyKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 147 /* ReadonlyKeyword */: nextToken(); if (scanner.hasPrecedingLineBreak()) { return false; } continue; - case 159 /* GlobalKeyword */: + case 160 /* GlobalKeyword */: nextToken(); - return token() === 18 /* OpenBraceToken */ || token() === 79 /* Identifier */ || token() === 93 /* ExportKeyword */; - case 100 /* ImportKeyword */: + return token() === 18 /* OpenBraceToken */ || token() === 79 /* Identifier */ || token() === 94 /* ExportKeyword */; + case 101 /* ImportKeyword */: nextToken(); return token() === 10 /* StringLiteral */ || token() === 41 /* AsteriskToken */ || token() === 18 /* OpenBraceToken */ || tokenIsIdentifierOrKeyword(token()); - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: let currentToken2 = nextToken(); - if (currentToken2 === 154 /* TypeKeyword */) { + if (currentToken2 === 155 /* TypeKeyword */) { currentToken2 = lookAhead(nextToken); } - if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 88 /* DefaultKeyword */ || currentToken2 === 128 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) { + if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 89 /* DefaultKeyword */ || currentToken2 === 129 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) { return true; } continue; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: nextToken(); continue; default: @@ -30357,45 +30394,45 @@ case 59 /* AtToken */: case 26 /* SemicolonToken */: case 18 /* OpenBraceToken */: - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: - case 99 /* IfKeyword */: - case 90 /* DoKeyword */: - case 115 /* WhileKeyword */: - case 97 /* ForKeyword */: - case 86 /* ContinueKeyword */: - case 81 /* BreakKeyword */: - case 105 /* ReturnKeyword */: - case 116 /* WithKeyword */: - case 107 /* SwitchKeyword */: - case 109 /* ThrowKeyword */: - case 111 /* TryKeyword */: - case 87 /* DebuggerKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: + case 100 /* IfKeyword */: + case 91 /* DoKeyword */: + case 116 /* WhileKeyword */: + case 98 /* ForKeyword */: + case 87 /* ContinueKeyword */: + case 82 /* BreakKeyword */: + case 106 /* ReturnKeyword */: + case 117 /* WithKeyword */: + case 108 /* SwitchKeyword */: + case 110 /* ThrowKeyword */: + case 112 /* TryKeyword */: + case 88 /* DebuggerKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return true; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThanOrDot); - case 85 /* ConstKeyword */: - case 93 /* ExportKeyword */: + case 86 /* ConstKeyword */: + case 94 /* ExportKeyword */: return isStartOfDeclaration(); - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 118 /* InterfaceKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 154 /* TypeKeyword */: - case 159 /* GlobalKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 119 /* InterfaceKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 155 /* TypeKeyword */: + case 160 /* GlobalKeyword */: return true; - case 127 /* AccessorKeyword */: - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 124 /* StaticKeyword */: - case 146 /* ReadonlyKeyword */: + case 128 /* AccessorKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 125 /* StaticKeyword */: + case 147 /* ReadonlyKeyword */: return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); default: return isStartOfExpression(); @@ -30417,14 +30454,14 @@ /*ignoreMissingOpenBrace*/ false ); - case 113 /* VarKeyword */: + case 114 /* VarKeyword */: return parseVariableStatement( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 119 /* LetKeyword */: + case 120 /* LetKeyword */: if (isLetDeclaration()) { return parseVariableStatement( getNodePos(), @@ -30434,66 +30471,66 @@ ); } break; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionDeclaration( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassDeclaration( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 99 /* IfKeyword */: + case 100 /* IfKeyword */: return parseIfStatement(); - case 90 /* DoKeyword */: + case 91 /* DoKeyword */: return parseDoStatement(); - case 115 /* WhileKeyword */: + case 116 /* WhileKeyword */: return parseWhileStatement(); - case 97 /* ForKeyword */: + case 98 /* ForKeyword */: return parseForOrForInOrForOfStatement(); - case 86 /* ContinueKeyword */: - return parseBreakOrContinueStatement(248 /* ContinueStatement */); - case 81 /* BreakKeyword */: - return parseBreakOrContinueStatement(249 /* BreakStatement */); - case 105 /* ReturnKeyword */: + case 87 /* ContinueKeyword */: + return parseBreakOrContinueStatement(249 /* ContinueStatement */); + case 82 /* BreakKeyword */: + return parseBreakOrContinueStatement(250 /* BreakStatement */); + case 106 /* ReturnKeyword */: return parseReturnStatement(); - case 116 /* WithKeyword */: + case 117 /* WithKeyword */: return parseWithStatement(); - case 107 /* SwitchKeyword */: + case 108 /* SwitchKeyword */: return parseSwitchStatement(); - case 109 /* ThrowKeyword */: + case 110 /* ThrowKeyword */: return parseThrowStatement(); - case 111 /* TryKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 112 /* TryKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return parseTryStatement(); - case 87 /* DebuggerKeyword */: + case 88 /* DebuggerKeyword */: return parseDebuggerStatement(); case 59 /* AtToken */: return parseDeclaration(); - case 132 /* AsyncKeyword */: - case 118 /* InterfaceKeyword */: - case 154 /* TypeKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 136 /* DeclareKeyword */: - case 85 /* ConstKeyword */: - case 92 /* EnumKeyword */: - case 93 /* ExportKeyword */: - case 100 /* ImportKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 124 /* StaticKeyword */: - case 146 /* ReadonlyKeyword */: - case 159 /* GlobalKeyword */: + case 133 /* AsyncKeyword */: + case 119 /* InterfaceKeyword */: + case 155 /* TypeKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 137 /* DeclareKeyword */: + case 86 /* ConstKeyword */: + case 93 /* EnumKeyword */: + case 94 /* ExportKeyword */: + case 101 /* ImportKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 125 /* StaticKeyword */: + case 147 /* ReadonlyKeyword */: + case 160 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -30502,7 +30539,7 @@ return parseExpressionOrLabeledStatement(); } function isDeclareModifier(modifier) { - return modifier.kind === 136 /* DeclareKeyword */; + return modifier.kind === 137 /* DeclareKeyword */; } function parseDeclaration() { const pos = getNodePos(); @@ -30535,33 +30572,33 @@ } function parseDeclarationWorker(pos, hasJSDoc, modifiersIn) { switch (token()) { - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: return parseVariableStatement(pos, hasJSDoc, modifiersIn); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassDeclaration(pos, hasJSDoc, modifiersIn); - case 118 /* InterfaceKeyword */: + case 119 /* InterfaceKeyword */: return parseInterfaceDeclaration(pos, hasJSDoc, modifiersIn); - case 154 /* TypeKeyword */: + case 155 /* TypeKeyword */: return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); - case 92 /* EnumKeyword */: + case 93 /* EnumKeyword */: return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 159 /* GlobalKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: + case 160 /* GlobalKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiersIn); - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: nextToken(); switch (token()) { - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: case 63 /* EqualsToken */: return parseExportAssignment(pos, hasJSDoc, modifiersIn); - case 128 /* AsKeyword */: + case 129 /* AsKeyword */: return parseNamespaceExportDeclaration(pos, hasJSDoc, modifiersIn); default: return parseExportDeclaration(pos, hasJSDoc, modifiersIn); @@ -30569,7 +30606,7 @@ default: if (modifiersIn) { const missing = createMissingNode( - 279 /* MissingDeclaration */, + 280 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -30679,12 +30716,12 @@ const pos = getNodePos(); let flags = 0; switch (token()) { - case 113 /* VarKeyword */: + case 114 /* VarKeyword */: break; - case 119 /* LetKeyword */: + case 120 /* LetKeyword */: flags |= 1 /* Let */; break; - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: flags |= 2 /* Const */; break; default: @@ -30692,7 +30729,7 @@ } nextToken(); let declarations; - if (token() === 162 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 163 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -30720,7 +30757,7 @@ function parseFunctionDeclaration(pos, hasJSDoc, modifiers) { const savedAwaitContext = inAwaitContext(); const modifierFlags = modifiersToFlags(modifiers); - parseExpected(98 /* FunctionKeyword */); + parseExpected(99 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; @@ -30743,8 +30780,8 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseConstructorName() { - if (token() === 135 /* ConstructorKeyword */) { - return parseExpected(135 /* ConstructorKeyword */); + if (token() === 136 /* ConstructorKeyword */) { + return parseExpected(136 /* ConstructorKeyword */); } if (token() === 10 /* StringLiteral */ && lookAhead(nextToken) === 20 /* OpenParenToken */) { return tryParse(() => { @@ -30838,7 +30875,7 @@ false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 174 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 175 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -30867,7 +30904,7 @@ return true; } if (idToken !== void 0) { - if (!isKeyword(idToken) || idToken === 151 /* SetKeyword */ || idToken === 137 /* GetKeyword */) { + if (!isKeyword(idToken) || idToken === 152 /* SetKeyword */ || idToken === 138 /* GetKeyword */) { return true; } switch (token()) { @@ -30885,7 +30922,7 @@ return false; } function parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers) { - parseExpectedToken(124 /* StaticKeyword */); + parseExpectedToken(125 /* StaticKeyword */); const body = parseClassStaticBlockBody(); const node = withJSDoc(finishNode(factory2.createClassStaticBlockDeclaration(body), pos), hasJSDoc); node.modifiers = modifiers; @@ -30905,7 +30942,7 @@ return body; } function parseDecoratorExpression() { - if (inAwaitContext() && token() === 133 /* AwaitKeyword */) { + if (inAwaitContext() && token() === 134 /* AwaitKeyword */) { const pos = getNodePos(); const awaitExpression = parseIdentifier(Diagnostics.Expression_expected); nextToken(); @@ -30930,13 +30967,13 @@ function tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock) { const pos = getNodePos(); const kind = token(); - if (token() === 85 /* ConstKeyword */ && permitConstAsModifier) { + if (token() === 86 /* ConstKeyword */ && permitConstAsModifier) { if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { return void 0; } - } else if (stopOnStartOfClassStaticBlock && token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + } else if (stopOnStartOfClassStaticBlock && token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return void 0; - } else if (hasSeenStaticModifier && token() === 124 /* StaticKeyword */) { + } else if (hasSeenStaticModifier && token() === 125 /* StaticKeyword */) { return void 0; } else { if (!parseAnyContextualModifier()) { @@ -30955,7 +30992,7 @@ } } while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 124 /* StaticKeyword */) + if (modifier.kind === 125 /* StaticKeyword */) hasSeenStaticModifier = true; list = append(list, modifier); hasLeadingModifier = true; @@ -30968,7 +31005,7 @@ } if (hasTrailingDecorator) { while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 124 /* StaticKeyword */) + if (modifier.kind === 125 /* StaticKeyword */) hasSeenStaticModifier = true; list = append(list, modifier); } @@ -30977,10 +31014,10 @@ } function parseModifiersForArrowFunction() { let modifiers; - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { const pos = getNodePos(); nextToken(); - const modifier = finishNode(factoryCreateToken(132 /* AsyncKeyword */), pos); + const modifier = finishNode(factoryCreateToken(133 /* AsyncKeyword */), pos); modifiers = createNodeArray([modifier], pos); } return modifiers; @@ -31000,16 +31037,16 @@ /*stopOnStartOfClassStaticBlock*/ true ); - if (token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 0 /* None */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 0 /* None */); } - if (token() === 135 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); if (constructorDeclaration) { return constructorDeclaration; @@ -31054,11 +31091,11 @@ /*allowDecorators*/ true ); - if (token() === 84 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 228 /* ClassExpression */); + if (token() === 85 /* ClassKeyword */) { + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 229 /* ClassExpression */); } const missing = createMissingNode( - 279 /* MissingDeclaration */, + 280 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -31073,15 +31110,15 @@ hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 228 /* ClassExpression */ + 229 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 260 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 261 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); - parseExpected(84 /* ClassKeyword */); + parseExpected(85 /* ClassKeyword */); const name = parseNameOfClassDeclarationOrExpression(); const typeParameters = parseTypeParameters(); if (some(modifiers, isExportModifier)) @@ -31098,14 +31135,14 @@ members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 260 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 261 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { return isBindingIdentifier() && !isImplementsClause() ? createIdentifier(isBindingIdentifier()) : void 0; } function isImplementsClause() { - return token() === 117 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 118 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses() { if (isHeritageClause2()) { @@ -31116,7 +31153,7 @@ function parseHeritageClause() { const pos = getNodePos(); const tok = token(); - Debug.assert(tok === 94 /* ExtendsKeyword */ || tok === 117 /* ImplementsKeyword */); + Debug.assert(tok === 95 /* ExtendsKeyword */ || tok === 118 /* ImplementsKeyword */); nextToken(); const types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); return finishNode(factory2.createHeritageClause(tok, types), pos); @@ -31124,7 +31161,7 @@ function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (expression.kind === 231 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -31134,13 +31171,13 @@ return token() === 29 /* LessThanToken */ ? parseBracketedList(20 /* TypeArguments */, parseType, 29 /* LessThanToken */, 31 /* GreaterThanToken */) : void 0; } function isHeritageClause2() { - return token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; } function parseClassMembers() { return parseList(5 /* ClassMembers */, parseClassElement); } function parseInterfaceDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(118 /* InterfaceKeyword */); + parseExpected(119 /* InterfaceKeyword */); const name = parseIdentifier(); const typeParameters = parseTypeParameters(); const heritageClauses = parseHeritageClauses(); @@ -31149,11 +31186,11 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(154 /* TypeKeyword */); + parseExpected(155 /* TypeKeyword */); const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(63 /* EqualsToken */); - const type = token() === 139 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); + const type = token() === 140 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); parseSemicolon(); const node = factory2.createTypeAliasDeclaration(modifiers, name, typeParameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -31166,7 +31203,7 @@ return withJSDoc(finishNode(factory2.createEnumMember(name, initializer), pos), hasJSDoc); } function parseEnumDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(92 /* EnumKeyword */); + parseExpected(93 /* EnumKeyword */); const name = parseIdentifier(); let members; if (parseExpected(18 /* OpenBraceToken */)) { @@ -31206,7 +31243,7 @@ function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; let name; - if (token() === 159 /* GlobalKeyword */) { + if (token() === 160 /* GlobalKeyword */) { name = parseIdentifier(); flags |= 1024 /* GlobalAugmentation */; } else { @@ -31224,12 +31261,12 @@ } function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; - if (token() === 159 /* GlobalKeyword */) { + if (token() === 160 /* GlobalKeyword */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); - } else if (parseOptional(143 /* NamespaceKeyword */)) { + } else if (parseOptional(144 /* NamespaceKeyword */)) { flags |= 16 /* Namespace */; } else { - parseExpected(142 /* ModuleKeyword */); + parseExpected(143 /* ModuleKeyword */); if (token() === 10 /* StringLiteral */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); } @@ -31237,7 +31274,7 @@ return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiersIn, flags); } function isExternalModuleReference2() { - return token() === 147 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); + return token() === 148 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { return nextToken() === 20 /* OpenParenToken */; @@ -31249,8 +31286,8 @@ return nextToken() === 43 /* SlashToken */; } function parseNamespaceExportDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(128 /* AsKeyword */); - parseExpected(143 /* NamespaceKeyword */); + parseExpected(129 /* AsKeyword */); + parseExpected(144 /* NamespaceKeyword */); const name = parseIdentifier(); parseSemicolon(); const node = factory2.createNamespaceExportDeclaration(name); @@ -31258,14 +31295,14 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(100 /* ImportKeyword */); - const afterImportPos = scanner.getStartPos(); + parseExpected(101 /* ImportKeyword */); + const afterImportPos = scanner.getTokenFullStart(); let identifier; if (isIdentifier2()) { identifier = parseIdentifier(); } let isTypeOnly = false; - if (token() !== 158 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { + if (token() !== 159 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { isTypeOnly = true; identifier = isIdentifier2() ? parseIdentifier() : void 0; } @@ -31277,11 +31314,11 @@ token() === 41 /* AsteriskToken */ || // import * token() === 18 /* OpenBraceToken */) { importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(158 /* FromKeyword */); + parseExpected(159 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); let assertClause; - if (token() === 130 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 131 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { assertClause = parseAssertClause(); } parseSemicolon(); @@ -31301,9 +31338,9 @@ function parseAssertClause(skipAssertKeyword) { const pos = getNodePos(); if (!skipAssertKeyword) { - parseExpected(130 /* AssertKeyword */); + parseExpected(131 /* AssertKeyword */); } - const openBracePosition = scanner.getTokenPos(); + const openBracePosition = scanner.getTokenStart(); if (parseExpected(18 /* OpenBraceToken */)) { const multiLine = scanner.hasPrecedingLineBreak(); const elements = parseDelimitedList( @@ -31342,7 +31379,7 @@ return token() === 41 /* AsteriskToken */ || token() === 18 /* OpenBraceToken */; } function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 27 /* CommaToken */ || token() === 158 /* FromKeyword */; + return token() === 27 /* CommaToken */ || token() === 159 /* FromKeyword */; } function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { parseExpected(63 /* EqualsToken */); @@ -31355,7 +31392,7 @@ function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(27 /* CommaToken */)) { - namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(272 /* NamedImports */); + namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(273 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -31367,7 +31404,7 @@ } function parseExternalModuleReference() { const pos = getNodePos(); - parseExpected(147 /* RequireKeyword */); + parseExpected(148 /* RequireKeyword */); parseExpected(20 /* OpenParenToken */); const expression = parseModuleSpecifier(); parseExpected(21 /* CloseParenToken */); @@ -31385,35 +31422,35 @@ function parseNamespaceImport() { const pos = getNodePos(); parseExpected(41 /* AsteriskToken */); - parseExpected(128 /* AsKeyword */); + parseExpected(129 /* AsKeyword */); const name = parseIdentifier(); return finishNode(factory2.createNamespaceImport(name), pos); } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 272 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); + const node = kind === 273 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(278 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(279 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(273 /* ImportSpecifier */); + return parseImportOrExportSpecifier(274 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); let checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - let checkIdentifierStart = scanner.getTokenPos(); - let checkIdentifierEnd = scanner.getTextPos(); + let checkIdentifierStart = scanner.getTokenStart(); + let checkIdentifierEnd = scanner.getTokenEnd(); let isTypeOnly = false; let propertyName; let canParseAsKeyword = true; let name = parseIdentifierName(); if (name.escapedText === "type") { - if (token() === 128 /* AsKeyword */) { + if (token() === 129 /* AsKeyword */) { const firstAs = parseIdentifierName(); - if (token() === 128 /* AsKeyword */) { + if (token() === 129 /* AsKeyword */) { const secondAs = parseIdentifierName(); if (tokenIsIdentifierOrKeyword(token())) { isTypeOnly = true; @@ -31438,20 +31475,20 @@ name = parseNameWithKeywordCheck(); } } - if (canParseAsKeyword && token() === 128 /* AsKeyword */) { + if (canParseAsKeyword && token() === 129 /* AsKeyword */) { propertyName = name; - parseExpected(128 /* AsKeyword */); + parseExpected(129 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 273 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 274 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 273 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 274 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - checkIdentifierStart = scanner.getTokenPos(); - checkIdentifierEnd = scanner.getTextPos(); + checkIdentifierStart = scanner.getTokenStart(); + checkIdentifierEnd = scanner.getTokenEnd(); return parseIdentifierName(); } } @@ -31467,22 +31504,22 @@ let exportClause; let moduleSpecifier; let assertClause; - const isTypeOnly = parseOptional(154 /* TypeKeyword */); + const isTypeOnly = parseOptional(155 /* TypeKeyword */); const namespaceExportPos = getNodePos(); if (parseOptional(41 /* AsteriskToken */)) { - if (parseOptional(128 /* AsKeyword */)) { + if (parseOptional(129 /* AsKeyword */)) { exportClause = parseNamespaceExport(namespaceExportPos); } - parseExpected(158 /* FromKeyword */); + parseExpected(159 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(276 /* NamedExports */); - if (token() === 158 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner.hasPrecedingLineBreak()) { - parseExpected(158 /* FromKeyword */); + exportClause = parseNamedImportsOrExports(277 /* NamedExports */); + if (token() === 159 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner.hasPrecedingLineBreak()) { + parseExpected(159 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } } - if (moduleSpecifier && token() === 130 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (moduleSpecifier && token() === 131 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { assertClause = parseAssertClause(); } parseSemicolon(); @@ -31500,7 +31537,7 @@ if (parseOptional(63 /* EqualsToken */)) { isExportEquals = true; } else { - parseExpected(88 /* DefaultKeyword */); + parseExpected(89 /* DefaultKeyword */); } const expression = parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ @@ -31698,16 +31735,12 @@ while (true) { switch (token()) { case 59 /* AtToken */: - if (state === 0 /* BeginningOfLine */ || state === 1 /* SawAsterisk */) { - removeTrailingWhitespace(comments); - if (!commentsPos) - commentsPos = getNodePos(); - addTag(parseTag(indent2)); - state = 0 /* BeginningOfLine */; - margin = void 0; - } else { - pushComment(scanner.getTokenText()); - } + removeTrailingWhitespace(comments); + if (!commentsPos) + commentsPos = getNodePos(); + addTag(parseTag(indent2)); + state = 0 /* BeginningOfLine */; + margin = void 0; break; case 4 /* NewLineTrivia */: comments.push(scanner.getTokenText()); @@ -31716,29 +31749,33 @@ break; case 41 /* AsteriskToken */: const asterisk = scanner.getTokenText(); - if (state === 1 /* SawAsterisk */ || state === 2 /* SavingComments */) { + if (state === 1 /* SawAsterisk */) { state = 2 /* SavingComments */; pushComment(asterisk); } else { + Debug.assert(state === 0 /* BeginningOfLine */); state = 1 /* SawAsterisk */; indent2 += asterisk.length; } break; case 5 /* WhitespaceTrivia */: + Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text"); const whitespace = scanner.getTokenText(); - if (state === 2 /* SavingComments */) { - comments.push(whitespace); - } else if (margin !== void 0 && indent2 + whitespace.length > margin) { + if (margin !== void 0 && indent2 + whitespace.length > margin) { comments.push(whitespace.slice(margin - indent2)); } indent2 += whitespace.length; break; case 1 /* EndOfFileToken */: break loop; + case 81 /* JSDocCommentTextToken */: + state = 2 /* SavingComments */; + pushComment(scanner.getTokenValue()); + break; case 18 /* OpenBraceToken */: state = 2 /* SavingComments */; - const commentEnd = scanner.getStartPos(); - const linkStart = scanner.getTextPos() - 1; + const commentEnd = scanner.getTokenFullStart(); + const linkStart = scanner.getTokenEnd() - 1; const link = parseJSDocLink(linkStart); if (link) { if (!linkEnd) { @@ -31747,7 +31784,7 @@ parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd != null ? linkEnd : start, commentEnd)); parts.push(link); comments = []; - linkEnd = scanner.getTextPos(); + linkEnd = scanner.getTokenEnd(); break; } default: @@ -31755,16 +31792,23 @@ pushComment(scanner.getTokenText()); break; } - nextTokenJSDoc(); + if (state === 2 /* SavingComments */) { + nextJSDocCommentTextToken( + /*inBackticks*/ + false + ); + } else { + nextTokenJSDoc(); + } } - removeTrailingWhitespace(comments); - if (parts.length && comments.length) { - parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd != null ? linkEnd : start, commentsPos)); + const trimmedComments = trimStringEnd(comments.join("")); + if (parts.length && trimmedComments.length) { + parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd != null ? linkEnd : start, commentsPos)); } if (parts.length && tags) Debug.assertIsDefined(commentsPos, "having parsed tags implies that the end of the comment span should be set"); const tagsArray = tags && createNodeArray(tags, tagsPos, tagsEnd); - return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : comments.length ? comments.join("") : void 0, tagsArray), start, end); + return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : trimmedComments.length ? trimmedComments : void 0, tagsArray), start, end); }); function removeLeadingNewlines(comments2) { while (comments2.length && (comments2[0] === "\n" || comments2[0] === "\r")) { @@ -31772,8 +31816,16 @@ } } function removeTrailingWhitespace(comments2) { - while (comments2.length && comments2[comments2.length - 1].trim() === "") { - comments2.pop(); + while (comments2.length) { + const trimmed = trimStringEnd(comments2[comments2.length - 1]); + if (trimmed === "") { + comments2.pop(); + } else if (trimmed.length < comments2[comments2.length - 1].length) { + comments2[comments2.length - 1] = trimmed; + break; + } else { + break; + } } } function isNextNonwhitespaceTokenEndOfFile() { @@ -31821,7 +31873,7 @@ } function parseTag(margin) { Debug.assert(token() === 59 /* AtToken */); - const start2 = scanner.getTokenPos(); + const start2 = scanner.getTokenStart(); nextTokenJSDoc(); const tagName = parseJSDocIdentifierName( /*message*/ @@ -31920,7 +31972,6 @@ const parts2 = []; let linkEnd2; let state = 0 /* BeginningOfLine */; - let previousWhitespace = true; let margin; function pushComment(text) { if (!margin) { @@ -31945,34 +31996,29 @@ indent2 = 0; break; case 59 /* AtToken */: - if (state === 3 /* SavingBackticks */ || state === 2 /* SavingComments */ && (!previousWhitespace || lookAhead(isNextJSDocTokenWhitespace))) { - comments2.push(scanner.getTokenText()); - break; - } - scanner.setTextPos(scanner.getTextPos() - 1); + scanner.resetTokenState(scanner.getTokenEnd() - 1); + break loop; case 1 /* EndOfFileToken */: break loop; case 5 /* WhitespaceTrivia */: - if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { - pushComment(scanner.getTokenText()); - } else { - const whitespace = scanner.getTokenText(); - if (margin !== void 0 && indent2 + whitespace.length > margin) { - comments2.push(whitespace.slice(margin - indent2)); - } - indent2 += whitespace.length; + Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text"); + const whitespace = scanner.getTokenText(); + if (margin !== void 0 && indent2 + whitespace.length > margin) { + comments2.push(whitespace.slice(margin - indent2)); + state = 2 /* SavingComments */; } + indent2 += whitespace.length; break; case 18 /* OpenBraceToken */: state = 2 /* SavingComments */; - const commentEnd = scanner.getStartPos(); - const linkStart = scanner.getTextPos() - 1; + const commentEnd = scanner.getTokenFullStart(); + const linkStart = scanner.getTokenEnd() - 1; const link = parseJSDocLink(linkStart); if (link) { parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 != null ? linkEnd2 : commentsPos2, commentEnd)); parts2.push(link); comments2 = []; - linkEnd2 = scanner.getTextPos(); + linkEnd2 = scanner.getTokenEnd(); } else { pushComment(scanner.getTokenText()); } @@ -31985,6 +32031,12 @@ } pushComment(scanner.getTokenText()); break; + case 81 /* JSDocCommentTextToken */: + if (state !== 3 /* SavingBackticks */) { + state = 2 /* SavingComments */; + } + pushComment(scanner.getTokenValue()); + break; case 41 /* AsteriskToken */: if (state === 0 /* BeginningOfLine */) { state = 1 /* SawAsterisk */; @@ -31998,24 +32050,23 @@ pushComment(scanner.getTokenText()); break; } - previousWhitespace = token() === 5 /* WhitespaceTrivia */; - tok = nextTokenJSDoc(); + if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { + tok = nextJSDocCommentTextToken(state === 3 /* SavingBackticks */); + } else { + tok = nextTokenJSDoc(); + } } removeLeadingNewlines(comments2); - removeTrailingWhitespace(comments2); + const trimmedComments = trimStringEnd(comments2.join("")); if (parts2.length) { - if (comments2.length) { - parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 != null ? linkEnd2 : commentsPos2)); + if (trimmedComments.length) { + parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 != null ? linkEnd2 : commentsPos2)); } - return createNodeArray(parts2, commentsPos2, scanner.getTextPos()); - } else if (comments2.length) { - return comments2.join(""); + return createNodeArray(parts2, commentsPos2, scanner.getTokenEnd()); + } else if (trimmedComments.length) { + return trimmedComments; } } - function isNextJSDocTokenWhitespace() { - const next = nextTokenJSDoc(); - return next === 5 /* WhitespaceTrivia */ || next === 4 /* NewLineTrivia */; - } function parseJSDocLink(start2) { const linkType = tryParse(parseJSDocLinkPrefix); if (!linkType) { @@ -32041,7 +32092,7 @@ nextTokenJSDoc(); } const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain; - return finishNode(create(name, text.join("")), start2, scanner.getTextPos()); + return finishNode(create(name, text.join("")), start2, scanner.getTokenEnd()); } function parseJSDocLinkPrefix() { skipWhitespaceOrAsterisk(); @@ -32094,9 +32145,9 @@ } function isObjectOrObjectArrayTypeReference(node) { switch (node.kind) { - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return true; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -32126,26 +32177,26 @@ let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { - if (child.kind === 344 /* JSDocParameterTag */ || child.kind === 351 /* JSDocPropertyTag */) { + if (child.kind === 345 /* JSDocParameterTag */ || child.kind === 352 /* JSDocPropertyTag */) { children = append(children, child); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 185 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 186 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } } function parseReturnTag(start2, tagName, indent2, indentText) { if (some(tags, isJSDocReturnTag)) { - parseErrorAt(tagName.pos, scanner.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText); + parseErrorAt(tagName.pos, scanner.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText); } const typeExpression = tryParseTypeExpression(); return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2); } function parseTypeTag(start2, tagName, indent2, indentText) { if (some(tags, isJSDocTypeTag)) { - parseErrorAt(tagName.pos, scanner.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText); + parseErrorAt(tagName.pos, scanner.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText); } const typeExpression = parseJSDocTypeExpression( /*mayOmitBraces*/ @@ -32168,10 +32219,10 @@ function parseAuthorTag(start2, tagName, indent2, indentText) { const commentStart = getNodePos(); const textOnly = parseAuthorNameAndEmail(); - let commentEnd = scanner.getStartPos(); + let commentEnd = scanner.getTokenFullStart(); const comments2 = parseTrailingTagComments(start2, commentEnd, indent2, indentText); if (!comments2) { - commentEnd = scanner.getStartPos(); + commentEnd = scanner.getTokenFullStart(); } const allParts = typeof comments2 !== "string" ? createNodeArray(concatenate([finishNode(textOnly, commentStart, commentEnd)], comments2), commentStart) : textOnly.text + comments2; return finishNode(factory2.createJSDocAuthorTag(tagName, allParts), start2); @@ -32187,7 +32238,7 @@ break; } else if (token2 === 31 /* GreaterThanToken */ && inEmail) { comments2.push(scanner.getTokenText()); - scanner.setTextPos(scanner.getTokenPos() + 1); + scanner.resetTokenState(scanner.getTokenEnd()); break; } comments2.push(scanner.getTokenText()); @@ -32266,7 +32317,7 @@ let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent2))) { hasChildren = true; - if (child.kind === 347 /* JSDocTypeTag */) { + if (child.kind === 348 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -32281,7 +32332,7 @@ } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 185 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 186 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -32295,7 +32346,7 @@ return finishNode(typedefTag, start2, end2); } function parseJSDocTypeNameWithNamespace(nested) { - const pos = scanner.getTokenPos(); + const start2 = scanner.getTokenStart(); if (!tokenIsIdentifierOrKeyword(token())) { return void 0; } @@ -32312,7 +32363,7 @@ body, nested ? 4 /* NestedNamespace */ : void 0 ); - return finishNode(jsDocNamespaceNode, pos); + return finishNode(jsDocNamespaceNode, start2); } if (nested) { typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */; @@ -32333,7 +32384,7 @@ const returnTag = tryParse(() => { if (parseOptionalJsdoc(59 /* AtToken */)) { const tag = parseTag(indent2); - if (tag && tag.kind === 345 /* JSDocReturnTag */) { + if (tag && tag.kind === 346 /* JSDocReturnTag */) { return tag; } } @@ -32388,7 +32439,7 @@ case 59 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent2); - if (child && (child.kind === 344 /* JSDocParameterTag */ || child.kind === 351 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 345 /* JSDocParameterTag */ || child.kind === 352 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -32415,7 +32466,7 @@ } function tryParseChildTag(target, indent2) { Debug.assert(token() === 59 /* AtToken */); - const start2 = scanner.getStartPos(); + const start2 = scanner.getTokenFullStart(); nextTokenJSDoc(); const tagName = parseJSDocIdentifierName(); skipWhitespace(); @@ -32515,11 +32566,11 @@ ); } identifierCount++; - const pos = scanner.getTokenPos(); - const end2 = scanner.getTextPos(); + const start2 = scanner.getTokenStart(); + const end2 = scanner.getTokenEnd(); const originalKeywordKind = token(); const text = internIdentifier(scanner.getTokenValue()); - const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), pos, end2); + const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), start2, end2); nextTokenJSDoc(); return result; } @@ -33108,7 +33159,7 @@ if (lhs.kind === 79 /* Identifier */) { return lhs.escapedText === rhs.escapedText; } - if (lhs.kind === 108 /* ThisKeyword */) { + if (lhs.kind === 109 /* ThisKeyword */) { return true; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -35017,7 +35068,7 @@ var _a2; const rootExpression = (_a2 = sourceFile.statements[0]) == null ? void 0 : _a2.expression; const knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : void 0; - if (rootExpression && rootExpression.kind !== 207 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 208 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -35075,7 +35126,7 @@ function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 299 /* PropertyAssignment */) { + if (element.kind !== 300 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -35133,19 +35184,19 @@ function convertPropertyValueToJson(valueExpression, option) { let invalidReported; switch (valueExpression.kind) { - case 110 /* TrueKeyword */: + case 111 /* TrueKeyword */: reportInvalidOptionValue(option && option.type !== "boolean" && (option.type !== "listOrElement" || option.element.type !== "boolean")); return validateValue( /*value*/ true ); - case 95 /* FalseKeyword */: + case 96 /* FalseKeyword */: reportInvalidOptionValue(option && option.type !== "boolean" && (option.type !== "listOrElement" || option.element.type !== "boolean")); return validateValue( /*value*/ false ); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: reportInvalidOptionValue(option && option.name === "extends"); return validateValue( /*value*/ @@ -35176,13 +35227,13 @@ case 8 /* NumericLiteral */: reportInvalidOptionValue(option && option.type !== "number" && (option.type !== "listOrElement" || option.element.type !== "number")); return validateValue(Number(valueExpression.text)); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: if (valueExpression.operator !== 40 /* MinusToken */ || valueExpression.operand.kind !== 8 /* NumericLiteral */) { break; } reportInvalidOptionValue(option && option.type !== "number" && (option.type !== "listOrElement" || option.element.type !== "number")); return validateValue(-Number(valueExpression.operand.text)); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: reportInvalidOptionValue(option && option.type !== "object" && (option.type !== "listOrElement" || option.element.type !== "object")); const objectLiteralExpression = valueExpression; if (option) { @@ -35204,7 +35255,7 @@ void 0 )); } - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: reportInvalidOptionValue(option && option.type !== "list" && option.type !== "listOrElement"); return validateValue(convertArrayLiteralExpressionToJson( valueExpression.elements, @@ -38744,23 +38795,23 @@ } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 276 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 277 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -38774,7 +38825,7 @@ return state; } break; - case 265 /* ModuleBlock */: { + case 266 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -38793,7 +38844,7 @@ }); return state; } - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 79 /* Identifier */: if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { @@ -38959,7 +39010,7 @@ } } function getDeclarationName(node) { - if (node.kind === 274 /* ExportAssignment */) { + if (node.kind === 275 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -38968,7 +39019,7 @@ const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 164 /* ComputedPropertyName */) { + if (name.kind === 165 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -38990,31 +39041,31 @@ return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return "__constructor" /* Constructor */; - case 181 /* FunctionType */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: + case 182 /* FunctionType */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: return "__call" /* Call */; - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: return "__new" /* New */; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return "__index" /* Index */; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return "export=" /* ExportEquals */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); break; - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 166 /* Parameter */: - Debug.assert(node.parent.kind === 320 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 167 /* Parameter */: + Debug.assert(node.parent.kind === 321 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); const functionType = node.parent; const index = functionType.parameters.indexOf(node); return "arg" + index; @@ -39061,7 +39112,7 @@ messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 274 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 275 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -39100,7 +39151,7 @@ function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 278 /* ExportSpecifier */ || node.kind === 268 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 279 /* ExportSpecifier */ || node.kind === 269 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { Debug.assertNode(container, canHaveLocals); @@ -39167,7 +39218,7 @@ const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 216 /* ArrowFunction */) { + if (node.kind !== 217 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -39189,14 +39240,14 @@ const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 172 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 173 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 173 /* Constructor */ || isInJSFile(node) && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 174 /* Constructor */ || isInJSFile(node) && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; @@ -39210,14 +39261,14 @@ node.flags |= 512 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 173 /* Constructor */ || node.kind === 172 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */)) { + if (node.kind === 174 /* Constructor */ || node.kind === 173 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -39243,8 +39294,8 @@ blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 259 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 259 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 260 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 260 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -39264,59 +39315,59 @@ inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 240 /* FirstStatement */ && node.kind <= 256 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 241 /* FirstStatement */ && node.kind <= 257 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: bindWhileStatement(node); break; - case 243 /* DoStatement */: + case 244 /* DoStatement */: bindDoStatement(node); break; - case 245 /* ForStatement */: + case 246 /* ForStatement */: bindForStatement(node); break; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 242 /* IfStatement */: + case 243 /* IfStatement */: bindIfStatement(node); break; - case 250 /* ReturnStatement */: - case 254 /* ThrowStatement */: + case 251 /* ReturnStatement */: + case 255 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: bindTryStatement(node); break; - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: bindSwitchStatement(node); break; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: bindCaseBlock(node); break; - case 292 /* CaseClause */: + case 293 /* CaseClause */: bindCaseClause(node); break; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: bindLabeledStatement(node); break; - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -39324,49 +39375,49 @@ } bindBinaryExpressionFlow(node); break; - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: bindCallExpressionFlow(node); break; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 308 /* SourceFile */: { + case 309 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 238 /* Block */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 266 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: bindBindingElementFlow(node); break; - case 166 /* Parameter */: + case 167 /* Parameter */: bindParameterFlow(node); break; - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: - case 299 /* PropertyAssignment */: - case 227 /* SpreadElement */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: + case 300 /* PropertyAssignment */: + case 228 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -39379,20 +39430,20 @@ switch (expr.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 108 /* ThisKeyword */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 109 /* ThisKeyword */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return hasNarrowableArgument(expr); - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return expr.operator === 53 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -39411,7 +39462,7 @@ } } } - if (expr.expression.kind === 208 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 209 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -39431,9 +39482,9 @@ case 36 /* EqualsEqualsEqualsToken */: case 37 /* ExclamationEqualsEqualsToken */: return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return isNarrowableOperand(expr.left); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return isNarrowingExpression(expr.right); case 27 /* CommaToken */: return isNarrowingExpression(expr.right); @@ -39442,9 +39493,9 @@ } function isNarrowableOperand(expr) { switch (expr.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 63 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -39479,7 +39530,7 @@ if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if ((expression.kind === 110 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || expression.kind === 95 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && !isExpressionOfOptionalChainRoot(expression) && !isNullishCoalesce(expression.parent)) { + if ((expression.kind === 111 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || expression.kind === 96 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && !isExpressionOfOptionalChainRoot(expression) && !isNullishCoalesce(expression.parent)) { return unreachableFlow; } if (!isNarrowingExpression(expression)) { @@ -39517,21 +39568,21 @@ function isStatementCondition(node) { const parent2 = node.parent; switch (parent2.kind) { - case 242 /* IfStatement */: - case 244 /* WhileStatement */: - case 243 /* DoStatement */: + case 243 /* IfStatement */: + case 245 /* WhileStatement */: + case 244 /* DoStatement */: return parent2.expression === node; - case 245 /* ForStatement */: - case 224 /* ConditionalExpression */: + case 246 /* ForStatement */: + case 225 /* ConditionalExpression */: return parent2.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 214 /* ParenthesizedExpression */) { + if (node.kind === 215 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { + } else if (node.kind === 222 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { node = node.operand; } else { return isLogicalOrCoalescingBinaryExpression(node); @@ -39574,7 +39625,7 @@ } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 253 /* LabeledStatement */) { + while (label && node.parent.kind === 254 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -39625,12 +39676,12 @@ bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 247 /* ForOfStatement */) { + if (node.kind === 248 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 258 /* VariableDeclarationList */) { + if (node.initializer.kind !== 259 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -39652,7 +39703,7 @@ } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 250 /* ReturnStatement */) { + if (node.kind === 251 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -39669,7 +39720,7 @@ return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 249 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 250 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -39739,7 +39790,7 @@ preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 293 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 294 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -39782,9 +39833,9 @@ maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { const call = node; - if (call.expression.kind !== 106 /* SuperKeyword */ && isDottedName(call.expression)) { + if (call.expression.kind !== 107 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); } } @@ -39808,7 +39859,7 @@ currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -39817,21 +39868,21 @@ function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 206 /* ArrayLiteralExpression */) { + } else if (node.kind === 207 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 227 /* SpreadElement */) { + if (e.kind === 228 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 207 /* ObjectLiteralExpression */) { + } else if (node.kind === 208 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 299 /* PropertyAssignment */) { + if (p.kind === 300 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 300 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 301 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 301 /* SpreadAssignment */) { + } else if (p.kind === 302 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -39962,7 +40013,7 @@ const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 63 /* EqualsToken */ && node.left.kind === 209 /* ElementAccessExpression */) { + if (operator === 63 /* EqualsToken */ && node.left.kind === 210 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -39990,7 +40041,7 @@ } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 208 /* PropertyAccessExpression */) { + if (node.expression.kind === 209 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -40055,7 +40106,7 @@ } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 343 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 344 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive( node.fullName, @@ -40070,7 +40121,7 @@ function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 171 /* MethodDeclaration */) { + if (host && host.kind !== 172 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -40083,15 +40134,15 @@ } function bindOptionalChainRest(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -40138,18 +40189,18 @@ bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 215 /* FunctionExpression */ || expr.kind === 216 /* ArrowFunction */) { + if (expr.kind === 216 /* FunctionExpression */ || expr.kind === 217 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); } else { bindEachChild(node); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { currentFlow = createFlowCall(currentFlow, node); } } } - if (node.expression.kind === 208 /* PropertyAccessExpression */) { + if (node.expression.kind === 209 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -40164,39 +40215,39 @@ } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 308 /* SourceFile */: + case 309 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 207 /* ObjectLiteralExpression */: - case 261 /* InterfaceDeclaration */: - case 289 /* JsxAttributes */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 208 /* ObjectLiteralExpression */: + case 262 /* InterfaceDeclaration */: + case 290 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 326 /* JSDocSignature */: - case 178 /* IndexSignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 320 /* JSDocFunctionType */: - case 172 /* ClassStaticBlockDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 197 /* MappedType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 327 /* JSDocSignature */: + case 179 /* IndexSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 321 /* JSDocFunctionType */: + case 173 /* ClassStaticBlockDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 198 /* MappedType */: if (container.locals) Debug.assertNode(container, canHaveLocals); return declareSymbol( @@ -40298,10 +40349,10 @@ } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -40396,13 +40447,13 @@ if (originalKeywordKind === void 0) { return; } - if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) { + if (inStrictMode && originalKeywordKind >= 118 /* FirstFutureReservedWord */ && originalKeywordKind <= 126 /* LastFutureReservedWord */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, getStrictModeIdentifierMessage(node), declarationNameToString(node) )); - } else if (originalKeywordKind === 133 /* AwaitKeyword */) { + } else if (originalKeywordKind === 134 /* AwaitKeyword */) { if (isExternalModule(file) && isInTopLevelContext(node)) { file.bindDiagnostics.push(createDiagnosticForNode2( node, @@ -40416,7 +40467,7 @@ declarationNameToString(node) )); } - } else if (originalKeywordKind === 125 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { + } else if (originalKeywordKind === 126 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, @@ -40504,7 +40555,7 @@ } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 308 /* SourceFile */ && blockScopeContainer.kind !== 264 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 309 /* SourceFile */ && blockScopeContainer.kind !== 265 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -40571,7 +40622,7 @@ node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 162 /* LastToken */) { + if (node.kind > 163 /* LastToken */) { const saveParent = parent; parent = node; const containerFlags = getContainerFlags(node); @@ -40636,24 +40687,24 @@ bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); break; } - case 108 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent.kind === 300 /* ShorthandPropertyAssignment */)) { + case 109 /* ThisKeyword */: + if (currentFlow && (isExpression(node) || parent.kind === 301 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 233 /* MetaProperty */: - case 106 /* SuperKeyword */: + case 234 /* MetaProperty */: + case 107 /* SuperKeyword */: node.flowNode = currentFlow; break; case 80 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -40672,7 +40723,7 @@ ); } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -40707,83 +40758,83 @@ Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return checkStrictModeCatchClause(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return checkStrictModeWithStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 194 /* ThisType */: + case 195 /* ThisType */: seenThisKeyword = true; return; - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return bindTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return bindParameter(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return bindPropertyWorker(node); - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 302 /* EnumMember */: + case 303 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return declareSymbolAndAddToSymbolTable( node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */ ); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 181 /* FunctionType */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 183 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 197 /* MappedType */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 198 /* MappedType */: return bindAnonymousTypeWorker(node); - case 335 /* JSDocClassTag */: + case 336 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return bindFunctionExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -40801,60 +40852,60 @@ bindCallExpression(node); } break; - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return bindJsxAttributes(node); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 268 /* ImportEqualsDeclaration */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 269 /* ImportEqualsDeclaration */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return bindImportClause(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return bindExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return bindExportAssignment(node); - case 308 /* SourceFile */: + case 309 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 238 /* Block */: + case 239 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 344 /* JSDocParameterTag */: - if (node.parent.kind === 326 /* JSDocSignature */) { + case 345 /* JSDocParameterTag */: + if (node.parent.kind === 327 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 325 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 326 /* JSDocTypeLiteral */) { break; } - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 319 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 320 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return bind(node.typeExpression); } } @@ -41006,8 +41057,8 @@ false ); switch (thisContainer.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 63 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -41025,12 +41076,12 @@ addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -41047,7 +41098,7 @@ ); } break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -41080,9 +41131,9 @@ } } function bindSpecialPropertyDeclaration(node) { - if (node.expression.kind === 108 /* ThisKeyword */) { + if (node.expression.kind === 109 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 308 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 309 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -41131,7 +41182,7 @@ } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 308 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 309 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces( namespaceSymbol, node.arguments[0], @@ -41245,7 +41296,7 @@ declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 308 /* SourceFile */ : propertyAccess.parent.parent.kind === 308 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 309 /* SourceFile */ : propertyAccess.parent.parent.kind === 309 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -41307,7 +41358,7 @@ } } function bindClassLikeDeclaration(node) { - if (node.kind === 260 /* ClassDeclaration */) { + if (node.kind === 261 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -41336,7 +41387,7 @@ checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 257 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 258 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && getEmitModuleResolutionKind(options) !== 100 /* Bundler */ && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -41349,7 +41400,7 @@ } } function bindParameter(node) { - if (node.kind === 344 /* JSDocParameterTag */ && container.kind !== 326 /* JSDocSignature */) { + if (node.kind === 345 /* JSDocParameterTag */ && container.kind !== 327 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { @@ -41423,7 +41474,7 @@ } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 192 /* InferType */) { + } else if (node.parent.kind === 193 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { Debug.assertNode(container2, canHaveLocals); @@ -41454,9 +41505,9 @@ if (currentFlow === unreachableFlow) { const reportError = ( // report error on all statements except empty ones - isStatementButNotDeclaration(node) && node.kind !== 239 /* EmptyStatement */ || // report error on class declarations - node.kind === 260 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - node.kind === 264 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) + isStatementButNotDeclaration(node) && node.kind !== 240 /* EmptyStatement */ || // report error on class declarations + node.kind === 261 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + node.kind === 265 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) ); if (reportError) { currentFlow = reportedUnreachableFlow; @@ -41484,12 +41535,12 @@ } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -41524,54 +41575,54 @@ } function getContainerFlags(node) { switch (node.kind) { - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 289 /* JsxAttributes */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 290 /* JsxAttributes */: return 1 /* IsContainer */; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 197 /* MappedType */: - case 178 /* IndexSignature */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 198 /* MappedType */: + case 179 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: - case 320 /* JSDocFunctionType */: - case 181 /* FunctionType */: - case 177 /* ConstructSignature */: - case 182 /* ConstructorType */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: + case 321 /* JSDocFunctionType */: + case 182 /* FunctionType */: + case 178 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 173 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 295 /* CatchClause */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 266 /* CaseBlock */: + case 296 /* CatchClause */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 267 /* CaseBlock */: return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - case 238 /* Block */: + case 239 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; } return 0 /* None */; @@ -41732,7 +41783,7 @@ symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 183 /* TypeQuery */) { + if (d.type && d.type.kind === 184 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -42909,7 +42960,10 @@ createIndexInfo, getAnyType: () => anyType, getStringType: () => stringType, + getStringLiteralType, getNumberType: () => numberType, + getNumberLiteralType, + getBigIntType: () => bigintType, createPromiseType, createArrayType, getElementTypeOfArrayType, @@ -43823,7 +43877,7 @@ return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 308 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 309 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning) { @@ -43867,13 +43921,13 @@ return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 205 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 205 /* BindingElement */); + if (declaration.kind === 206 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 206 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 257 /* VariableDeclaration */), usage); - } else if (declaration.kind === 257 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 258 /* VariableDeclaration */), usage); + } else if (declaration.kind === 258 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -43889,10 +43943,10 @@ } return true; } - if (usage.parent.kind === 278 /* ExportSpecifier */ || usage.parent.kind === 274 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 279 /* ExportSpecifier */ || usage.parent.kind === 275 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 274 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 275 /* ExportAssignment */ && usage.isExportEquals) { return true; } if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { @@ -43913,9 +43967,9 @@ return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 240 /* VariableStatement */: - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: + case 241 /* VariableStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -43940,7 +43994,7 @@ const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 171 /* MethodDeclaration */) { + if (declaration2.kind === 172 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -43954,7 +44008,7 @@ } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 169 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 170 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -43973,15 +44027,15 @@ return "quit"; } switch (node.kind) { - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return true; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 238 /* Block */: + case 239 /* Block */: switch (node.parent.kind) { - case 174 /* GetAccessor */: - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: return true; default: return false; @@ -44011,17 +44065,17 @@ } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 173 /* Constructor */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 174 /* Constructor */: return false; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 299 /* PropertyAssignment */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 300 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (hasStaticModifier(node)) { return target < 99 /* ESNext */ || !useDefineForClassFields; } @@ -44066,17 +44120,17 @@ if (result = lookup(location.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 323 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 166 /* Parameter */ || lastLocation.kind === 344 /* JSDocParameterTag */ || lastLocation.kind === 345 /* JSDocReturnTag */ || lastLocation.kind === 165 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 324 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 167 /* Parameter */ || lastLocation.kind === 345 /* JSDocParameterTag */ || lastLocation.kind === 346 /* JSDocReturnTag */ || lastLocation.kind === 166 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 166 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 167 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 191 /* ConditionalType */) { + } else if (location.kind === 192 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -44088,13 +44142,13 @@ } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const moduleExports = ((_a2 = getSymbolOfDeclaration(location)) == null ? void 0 : _a2.exports) || emptySymbols; - if (location.kind === 308 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 309 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { if (result = moduleExports.get("default" /* Default */)) { const localSymbol = getLocalSymbolForExportDefault(result); if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { @@ -44103,7 +44157,7 @@ result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 278 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 277 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 279 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 278 /* NamespaceExport */))) { break; } } @@ -44115,7 +44169,7 @@ } } break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 16777216 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { error( @@ -44129,7 +44183,7 @@ break loop; } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -44140,9 +44194,9 @@ } } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -44164,8 +44218,8 @@ } } break; - case 230 /* ExpressionWithTypeArguments */: - if (lastLocation === location.expression && location.parent.token === 94 /* ExtendsKeyword */) { + case 231 /* ExpressionWithTypeArguments */: + if (lastLocation === location.expression && location.parent.token === 95 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) { if (nameNotFoundMessage) { @@ -44175,9 +44229,9 @@ } } break; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 261 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 262 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -44186,21 +44240,21 @@ } } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -44213,37 +44267,37 @@ } } break; - case 167 /* Decorator */: - if (location.parent && location.parent.kind === 166 /* Parameter */) { + case 168 /* Decorator */: + if (location.parent && location.parent.kind === 167 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 260 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 261 /* ClassDeclaration */)) { location = location.parent; } break; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 192 /* InferType */: + case 193 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -44371,7 +44425,7 @@ if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */); if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 277 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + const message = typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 278 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; const unescapedName = unescapeLeadingUnderscores(name); addTypeOnlyDeclarationRelatedInfo( error(errorLocation, message, unescapedName), @@ -44391,14 +44445,14 @@ diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 277 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 278 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 216 /* ArrowFunction */ && location.kind !== 215 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 169 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 217 /* ArrowFunction */ && location.kind !== 216 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 170 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -44410,12 +44464,12 @@ } function isSelfReferenceLocation(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 264 /* ModuleDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 265 /* ModuleDeclaration */: return true; default: return false; @@ -44427,7 +44481,7 @@ function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 165 /* TypeParameter */) { + if (decl.kind === 166 /* TypeParameter */) { const parent = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -44488,9 +44542,9 @@ function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -44558,7 +44612,7 @@ return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 278 /* ExportSpecifier */) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 279 /* ExportSpecifier */) { error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } @@ -44604,7 +44658,7 @@ const grandparent = node.parent.parent; const parentOfGrandparent = grandparent.parent; if (grandparent && parentOfGrandparent) { - const isExtending = isHeritageClause(grandparent) && grandparent.token === 94 /* ExtendsKeyword */; + const isExtending = isHeritageClause(grandparent) && grandparent.token === 95 /* ExtendsKeyword */; const isInterface = isInterfaceDeclaration(parentOfGrandparent); return isExtending && isInterface; } @@ -44682,7 +44736,7 @@ return; } const declaration = (_a2 = result.declarations) == null ? void 0 : _a2.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 263 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 264 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); @@ -44714,13 +44768,13 @@ } function getAnyImportSyntax(node) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return node; - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.parent; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.parent; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -44730,7 +44784,7 @@ return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration); } function isAliasSymbolDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 267 /* NamespaceExportDeclaration */ || node.kind === 270 /* ImportClause */ && !!node.name || node.kind === 271 /* NamespaceImport */ || node.kind === 277 /* NamespaceExport */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 278 /* ExportSpecifier */ || node.kind === 274 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 300 /* ShorthandPropertyAssignment */ || node.kind === 299 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 257 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 205 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 268 /* NamespaceExportDeclaration */ || node.kind === 271 /* ImportClause */ && !!node.name || node.kind === 272 /* NamespaceImport */ || node.kind === 278 /* NamespaceExport */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 279 /* ExportSpecifier */ || node.kind === 275 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 301 /* ShorthandPropertyAssignment */ || node.kind === 300 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 258 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 206 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -44741,7 +44795,7 @@ const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; } - if (isVariableDeclaration(node) || node.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 281 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -44770,10 +44824,10 @@ false ) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node)); - const isExport = typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */; + const isExport = typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */; const message = isExport ? Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; - const name = typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + const name = typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); addRelatedInfo(error(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); } } @@ -44915,15 +44969,15 @@ } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.parent.moduleSpecifier; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -45256,26 +45310,26 @@ } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: - case 257 /* VariableDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 258 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 273 /* ImportSpecifier */: - case 205 /* BindingElement */: + case 274 /* ImportSpecifier */: + case 206 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 274 /* ExportAssignment */: - case 223 /* BinaryExpression */: + case 275 /* ExportAssignment */: + case 224 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return resolveEntityName( node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -45283,10 +45337,10 @@ true, dontRecursivelyResolve ); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -45387,7 +45441,7 @@ return links.typeOnlyDeclaration || void 0; } if (links.typeOnlyDeclaration) { - const resolved = links.typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); + const resolved = links.typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; } return void 0; @@ -45430,7 +45484,7 @@ if (entityName.kind === 79 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 163 /* QualifiedName */) { + if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 164 /* QualifiedName */) { return resolveEntityName( entityName, 1920 /* Namespace */, @@ -45439,7 +45493,7 @@ dontResolveAlias ); } else { - Debug.assert(entityName.parent.kind === 268 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 269 /* ImportEqualsDeclaration */); return resolveEntityName( entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -45510,9 +45564,9 @@ if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 163 /* QualifiedName */ || name.kind === 208 /* PropertyAccessExpression */) { - const left = name.kind === 163 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 163 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 164 /* QualifiedName */ || name.kind === 209 /* PropertyAccessExpression */) { + const left = name.kind === 164 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 164 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName( left, namespaceMeaning, @@ -45576,7 +45630,7 @@ throw Debug.assertNever(name, "Unknown entity name kind."); } Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 274 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 275 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly( getAliasDeclarationFromName(name), symbol, @@ -45928,7 +45982,7 @@ var _a2; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 308 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 309 /* SourceFile */)) { const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; error(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); return symbol; @@ -46033,7 +46087,7 @@ return shouldTreatPropertiesOfExternalModuleAsExports(type) ? getPropertyOfType(type, memberName) : void 0; } function shouldTreatPropertiesOfExternalModuleAsExports(resolvedExternalModuleType) { - return !(resolvedExternalModuleType.flags & 134348796 /* Primitive */ || getObjectFlags(resolvedExternalModuleType) & 1 /* Class */ || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path + return !(resolvedExternalModuleType.flags & 402784252 /* Primitive */ || getObjectFlags(resolvedExternalModuleType) & 1 /* Class */ || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path isArrayType(resolvedExternalModuleType) || isTupleType(resolvedExternalModuleType)); } function getExportsOfSymbol(symbol) { @@ -46290,7 +46344,7 @@ function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 173 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 174 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -46408,11 +46462,11 @@ } } switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const sym = getSymbolOfDeclaration(location); if (result = callback( (sym == null ? void 0 : sym.exports) || emptySymbols, @@ -46425,9 +46479,9 @@ return result; } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: let table; (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -46505,7 +46559,7 @@ return [symbol]; } const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => { - if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 278 /* ExportSpecifier */))) { + if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 279 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -46550,7 +46604,7 @@ if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 278 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 279 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { @@ -46565,10 +46619,10 @@ if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: continue; default: return false; @@ -46704,10 +46758,10 @@ return node && getSymbolOfDeclaration(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -46755,9 +46809,9 @@ } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 183 /* TypeQuery */ || entityName.parent.kind === 230 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 164 /* ComputedPropertyName */) { + if (entityName.parent.kind === 184 /* TypeQuery */ || entityName.parent.kind === 231 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 165 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 163 /* QualifiedName */ || entityName.kind === 208 /* PropertyAccessExpression */ || entityName.parent.kind === 268 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 164 /* QualifiedName */ || entityName.kind === 209 /* PropertyAccessExpression */ || entityName.parent.kind === 269 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -46823,7 +46877,7 @@ return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 309 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode( 4 /* Unspecified */, @@ -46840,9 +46894,9 @@ function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 182 /* ConstructorType */ : 181 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 183 /* ConstructorType */ : 182 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 178 /* ConstructSignature */ : 177 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -46988,7 +47042,7 @@ return void 0; } context.approximateLength += 3; - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (!(context.flags & 536870912 /* NoTypeReduction */)) { type = getReducedType(type); @@ -46998,29 +47052,29 @@ return factory.createTypeReferenceNode(symbolToEntityNameNode(type.aliasSymbol), mapToTypeNodes(type.aliasTypeArguments, context)); } if (type === unresolvedType) { - return addSyntheticLeadingComment(factory.createKeywordTypeNode(131 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "unresolved"); + return addSyntheticLeadingComment(factory.createKeywordTypeNode(132 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "unresolved"); } context.approximateLength += 3; - return factory.createKeywordTypeNode(type === intrinsicMarkerType ? 139 /* IntrinsicKeyword */ : 131 /* AnyKeyword */); + return factory.createKeywordTypeNode(type === intrinsicMarkerType ? 140 /* IntrinsicKeyword */ : 132 /* AnyKeyword */); } if (type.flags & 2 /* Unknown */) { - return factory.createKeywordTypeNode(157 /* UnknownKeyword */); + return factory.createKeywordTypeNode(158 /* UnknownKeyword */); } if (type.flags & 4 /* String */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(152 /* StringKeyword */); + return factory.createKeywordTypeNode(153 /* StringKeyword */); } if (type.flags & 8 /* Number */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(148 /* NumberKeyword */); + return factory.createKeywordTypeNode(149 /* NumberKeyword */); } if (type.flags & 64 /* BigInt */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(160 /* BigIntKeyword */); + return factory.createKeywordTypeNode(161 /* BigIntKeyword */); } if (type.flags & 16 /* Boolean */ && !type.aliasSymbol) { context.approximateLength += 7; - return factory.createKeywordTypeNode(134 /* BooleanKeyword */); + return factory.createKeywordTypeNode(135 /* BooleanKeyword */); } if (type.flags & 1056 /* EnumLike */) { if (type.symbol.flags & 8 /* EnumMember */) { @@ -47079,15 +47133,15 @@ } } context.approximateLength += 13; - return factory.createTypeOperatorNode(156 /* UniqueKeyword */, factory.createKeywordTypeNode(153 /* SymbolKeyword */)); + return factory.createTypeOperatorNode(157 /* UniqueKeyword */, factory.createKeywordTypeNode(154 /* SymbolKeyword */)); } if (type.flags & 16384 /* Void */) { context.approximateLength += 4; - return factory.createKeywordTypeNode(114 /* VoidKeyword */); + return factory.createKeywordTypeNode(115 /* VoidKeyword */); } if (type.flags & 32768 /* Undefined */) { context.approximateLength += 9; - return factory.createKeywordTypeNode(155 /* UndefinedKeyword */); + return factory.createKeywordTypeNode(156 /* UndefinedKeyword */); } if (type.flags & 65536 /* Null */) { context.approximateLength += 4; @@ -47095,15 +47149,15 @@ } if (type.flags & 131072 /* Never */) { context.approximateLength += 5; - return factory.createKeywordTypeNode(144 /* NeverKeyword */); + return factory.createKeywordTypeNode(145 /* NeverKeyword */); } if (type.flags & 4096 /* ESSymbol */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(153 /* SymbolKeyword */); + return factory.createKeywordTypeNode(154 /* SymbolKeyword */); } if (type.flags & 67108864 /* NonPrimitive */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(149 /* ObjectKeyword */); + return factory.createKeywordTypeNode(150 /* ObjectKeyword */); } if (isThisTypeParameter(type)) { if (context.flags & 4194304 /* InObjectTypeLiteral */) { @@ -47197,7 +47251,7 @@ const indexedType = type.type; context.approximateLength += 6; const indexTypeNode = typeToTypeNodeHelper(indexedType, context); - return factory.createTypeOperatorNode(141 /* KeyOfKeyword */, indexTypeNode); + return factory.createTypeOperatorNode(142 /* KeyOfKeyword */, indexTypeNode); } if (type.flags & 134217728 /* TemplateLiteral */) { const texts = type.texts; @@ -47255,9 +47309,9 @@ factory.createTypeReferenceNode(factory.cloneNode(name)), typeToTypeNodeHelper(type2.checkType, context), factory.createConditionalTypeNode(newTypeVariable, extendsTypeNode2, trueTypeNode2, falseTypeNode2), - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ), - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ); } const saveInferTypeParameters = context.inferTypeParameters; @@ -47297,7 +47351,7 @@ const name = typeParameterToName(newParam, context); newTypeVariable = factory.createTypeReferenceNode(name); } - appropriateConstraintTypeNode = factory.createTypeOperatorNode(141 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); + appropriateConstraintTypeNode = factory.createTypeOperatorNode(142 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); } else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context); } @@ -47326,7 +47380,7 @@ originalConstraint.flags & 2 /* Unknown */ ? void 0 : typeToTypeNodeHelper(originalConstraint, context) )), result, - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ); } return result; @@ -47379,7 +47433,7 @@ const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method some(symbol.declarations, (declaration) => isStatic(declaration)); const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol - forEach(symbol.declarations, (declaration) => declaration.parent.kind === 308 /* SourceFile */ || declaration.parent.kind === 265 /* ModuleBlock */)); + forEach(symbol.declarations, (declaration) => declaration.parent.kind === 309 /* SourceFile */ || declaration.parent.kind === 266 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a4 = context.visitedTypes) == null ? void 0 : _a4.has(typeId))) && // it is type of the symbol uses itself recursively (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); @@ -47462,12 +47516,12 @@ } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 181 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 182 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 182 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 183 /* ConstructorType */, context); return signatureNode; } } @@ -47500,7 +47554,7 @@ } const elementType = typeToTypeNodeHelper(typeArguments[0], context); const arrayType = factory.createArrayTypeNode(elementType); - return type2.target === globalArrayType ? arrayType : factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, arrayType); + return type2.target === globalArrayType ? arrayType : factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, arrayType); } else if (type2.target.objectFlags & 8 /* Tuple */) { typeArguments = sameMap(typeArguments, (t, i) => removeMissingType(t, !!(type2.target.elementFlags[i] & 2 /* Optional */))); if (typeArguments.length > 0) { @@ -47524,12 +47578,12 @@ } } const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode(tupleConstituentNodes), 1 /* SingleLine */); - return type2.target.readonly ? factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; + return type2.target.readonly ? factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; } } if (context.encounteredError || context.flags & 524288 /* AllowEmptyTuple */) { const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode([]), 1 /* SingleLine */); - return type2.target.readonly ? factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; + return type2.target.readonly ? factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; } context.encounteredError = true; return void 0; @@ -47653,12 +47707,12 @@ } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 176 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 177 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 177 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 178 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -47705,7 +47759,7 @@ void 0 ); } - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } function shouldUsePlaceholderForProperty(propertySymbol, context) { var _a2; @@ -47742,7 +47796,7 @@ if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); for (const signature of signatures) { - const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 170 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 171 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } } else { @@ -47754,12 +47808,12 @@ context.reverseMappedStack || (context.reverseMappedStack = []); context.reverseMappedStack.push(propertySymbol); } - propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(131 /* AnyKeyword */); + propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(132 /* AnyKeyword */); if (propertyIsReverseMapped) { context.reverseMappedStack.pop(); } } - const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(146 /* ReadonlyKeyword */)] : void 0; + const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(147 /* ReadonlyKeyword */)] : void 0; if (modifiers) { context.approximateLength += 9; } @@ -47773,8 +47827,8 @@ } function preserveCommentsOn(node) { var _a3; - if (some(propertySymbol.declarations, (d) => d.kind === 351 /* JSDocPropertyTag */)) { - const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 351 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 352 /* JSDocPropertyTag */)) { + const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 352 /* JSDocPropertyTag */); const commentText = getTextOfJSDocComment(d.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -47874,7 +47928,7 @@ } context.approximateLength += name.length + 4; return factory.createIndexSignature( - indexInfo.isReadonly ? [factory.createToken(146 /* ReadonlyKeyword */)] : void 0, + indexInfo.isReadonly ? [factory.createToken(147 /* ReadonlyKeyword */)] : void 0, [indexingParameter], typeNode ); @@ -47930,7 +47984,7 @@ } } } - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 173 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); + const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 174 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context); if (thisParameter) { parameters.unshift(thisParameter); @@ -47938,7 +47992,7 @@ let returnTypeNode; const typePredicate = getTypePredicateOfSignature(signature); if (typePredicate) { - const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(129 /* AssertsKeyword */) : void 0; + const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(130 /* AssertsKeyword */) : void 0; const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 33554432 /* NoAsciiEscaping */) : factory.createThisTypeNode(); const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context); returnTypeNode = factory.createTypePredicateNode(assertsModifier, parameterName, typeNode); @@ -47947,15 +48001,15 @@ if (returnType && !(suppressAny && isTypeAny(returnType))) { returnTypeNode = serializeReturnTypeForSignature(context, returnType, signature, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports); } else if (!suppressAny) { - returnTypeNode = factory.createKeywordTypeNode(131 /* AnyKeyword */); + returnTypeNode = factory.createKeywordTypeNode(132 /* AnyKeyword */); } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 182 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 183 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 176 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 177 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 170 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 171 /* MethodDeclaration */ ? factory.createMethodDeclaration( + const node = kind === 177 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 178 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 171 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 172 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -47967,25 +48021,25 @@ returnTypeNode, /*body*/ void 0 - ) : kind === 173 /* Constructor */ ? factory.createConstructorDeclaration( + ) : kind === 174 /* Constructor */ ? factory.createConstructorDeclaration( modifiers, parameters, /*body*/ void 0 - ) : kind === 174 /* GetAccessor */ ? factory.createGetAccessorDeclaration( + ) : kind === 175 /* GetAccessor */ ? factory.createGetAccessorDeclaration( modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, returnTypeNode, /*body*/ void 0 - ) : kind === 175 /* SetAccessor */ ? factory.createSetAccessorDeclaration( + ) : kind === 176 /* SetAccessor */ ? factory.createSetAccessorDeclaration( modifiers, (_e = options == null ? void 0 : options.name) != null ? _e : factory.createIdentifier(""), parameters, /*body*/ void 0 - ) : kind === 178 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 320 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 181 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 182 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 259 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( + ) : kind === 179 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 321 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 182 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 183 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 260 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -47995,7 +48049,7 @@ returnTypeNode, /*body*/ void 0 - ) : kind === 215 /* FunctionExpression */ ? factory.createFunctionExpression( + ) : kind === 216 /* FunctionExpression */ ? factory.createFunctionExpression( modifiers, /*asteriskToken*/ void 0, @@ -48004,7 +48058,7 @@ parameters, returnTypeNode, factory.createBlock([]) - ) : kind === 216 /* ArrowFunction */ ? factory.createArrowFunction( + ) : kind === 217 /* ArrowFunction */ ? factory.createArrowFunction( modifiers, typeParameters, parameters, @@ -48054,9 +48108,9 @@ return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 166 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 167 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 344 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 345 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -48066,7 +48120,7 @@ const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(25 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 33554432 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 163 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 33554432 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 33554432 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 164 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 33554432 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(57 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -48247,11 +48301,11 @@ } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { var _a2; - let file = getDeclarationOfKind(symbol, 308 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 309 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 308 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 309 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -48731,17 +48785,17 @@ } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 322 /* JSDocNamepathType */) { - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + if (isJSDocAllType(node) || node.kind === 323 /* JSDocNamepathType */) { + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { - return factory.createKeywordTypeNode(157 /* UnknownKeyword */); + return factory.createKeywordTypeNode(158 /* UnknownKeyword */); } if (isJSDocNullableType(node)) { return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]); } if (isJSDocOptionalType(node)) { - return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]); + return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(156 /* UndefinedKeyword */)]); } if (isJSDocNonNullableType(node)) { return visitNode(node.type, visitExistingNodeTreeSymbols); @@ -48759,12 +48813,12 @@ void 0, name, t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0, - overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); })); } if (isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "") { - return setOriginalNode(factory.createKeywordTypeNode(131 /* AnyKeyword */), node); + return setOriginalNode(factory.createKeywordTypeNode(132 /* AnyKeyword */), node); } if ((isExpressionWithTypeArguments(node) || isTypeReferenceNode(node)) && isJSDocIndexSignature(node)) { return factory.createTypeLiteralNode([factory.createIndexSignature( @@ -48800,7 +48854,7 @@ /*initializer*/ void 0 )), - visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); } else { return factory.createFunctionTypeNode( @@ -48815,7 +48869,7 @@ /*initializer*/ void 0 )), - visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); } } @@ -48895,13 +48949,13 @@ function symbolTableToDeclarationStatements(symbolTable, context, bundled) { const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, - 171 /* MethodDeclaration */, + 172 /* MethodDeclaration */, /*useAcessors*/ true ); const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol( (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), - 170 /* MethodSignature */, + 171 /* MethodSignature */, /*useAcessors*/ false ); @@ -49360,10 +49414,10 @@ const baseTypes = getBaseTypes(interfaceType); const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0; const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType)); - const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 176 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 177 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 177 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 178 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); - const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(94 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; + const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(95 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( /*modifiers*/ void 0, @@ -49442,7 +49496,7 @@ function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 259 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 260 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); addResult(setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags); } if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) { @@ -49582,8 +49636,8 @@ const isClass = !!((_b = staticType.symbol) == null ? void 0 : _b.valueDeclaration) && isClassLike(staticType.symbol.valueDeclaration); const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType) : anyType; const heritageClauses = [ - ...!length(baseTypes) ? [] : [factory.createHeritageClause(94 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))], - ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(117 /* ImplementsKeyword */, implementsExpressions)] + ...!length(baseTypes) ? [] : [factory.createHeritageClause(95 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))], + ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(118 /* ImplementsKeyword */, implementsExpressions)] ]; const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType)); const publicSymbolProps = filter(symbolProps, (s) => { @@ -49626,7 +49680,7 @@ [], /*body*/ void 0 - )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 173 /* Constructor */); + )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 174 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -49678,8 +49732,8 @@ const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 205 /* BindingElement */: - if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 257 /* VariableDeclaration */) { + case 206 /* BindingElement */: + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 258 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -49705,15 +49759,15 @@ } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); break; - case 300 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 223 /* BinaryExpression */) { + case 301 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 224 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -49736,7 +49790,7 @@ ), modifierFlags); break; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) { serializeMaybeAliasAssignment(symbol); break; @@ -49757,10 +49811,10 @@ ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 270 /* ImportClause */: { + case 271 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -49778,7 +49832,7 @@ ), 0 /* None */); break; } - case 271 /* NamespaceImport */: { + case 272 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -49796,7 +49850,7 @@ ), 0 /* None */); break; } - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: addResult(factory.createExportDeclaration( /*modifiers*/ void 0, @@ -49806,7 +49860,7 @@ factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 273 /* ImportSpecifier */: { + case 274 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -49831,7 +49885,7 @@ ), 0 /* None */); break; } - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -49839,12 +49893,12 @@ specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 223 /* BinaryExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 224 /* BinaryExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -50260,7 +50314,7 @@ return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker); function typePredicateToStringWorker(writer2) { const predicate = factory.createTypePredicateNode( - typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(129 /* AssertsKeyword */) : void 0, + typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(130 /* AssertsKeyword */) : void 0, typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createIdentifier(typePredicate.parameterName) : factory.createThisTypeNode(), typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */) // TODO: GH#18217 @@ -50323,10 +50377,10 @@ return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 265 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 266 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 308 /* SourceFile */ || isAmbientModule(location); + return location.kind === 309 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -50374,17 +50428,17 @@ if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 257 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 258 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 228 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 229 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -50401,66 +50455,66 @@ return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: - case 343 /* JSDocEnumTag */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 344 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 259 /* FunctionDeclaration */: - case 263 /* EnumDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + case 264 /* EnumDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 268 /* ImportEqualsDeclaration */ && parent.kind !== 308 /* SourceFile */ && parent.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 269 /* ImportEqualsDeclaration */ && parent.kind !== 309 /* SourceFile */ && parent.flags & 16777216 /* Ambient */)) { return isGlobalSourceFile(parent); } return isDeclarationVisible(parent); - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 173 /* Constructor */: - case 177 /* ConstructSignature */: - case 176 /* CallSignature */: - case 178 /* IndexSignature */: - case 166 /* Parameter */: - case 265 /* ModuleBlock */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 184 /* TypeLiteral */: - case 180 /* TypeReference */: - case 185 /* ArrayType */: - case 186 /* TupleType */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: + case 174 /* Constructor */: + case 178 /* ConstructSignature */: + case 177 /* CallSignature */: + case 179 /* IndexSignature */: + case 167 /* Parameter */: + case 266 /* ModuleBlock */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 185 /* TypeLiteral */: + case 181 /* TypeReference */: + case 186 /* ArrayType */: + case 187 /* TupleType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: return false; - case 165 /* TypeParameter */: - case 308 /* SourceFile */: - case 267 /* NamespaceExportDeclaration */: + case 166 /* TypeParameter */: + case 309 /* SourceFile */: + case 268 /* NamespaceExportDeclaration */: return true; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return false; default: return false; @@ -50469,7 +50523,7 @@ } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 274 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 275 /* ExportAssignment */) { exportSymbol = resolveName( node, node.escapedText, @@ -50480,7 +50534,7 @@ /*isUse*/ false ); - } else if (node.parent.kind === 278 /* ExportSpecifier */) { + } else if (node.parent.kind === 279 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -50582,12 +50636,12 @@ function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 257 /* VariableDeclaration */: - case 258 /* VariableDeclarationList */: - case 273 /* ImportSpecifier */: - case 272 /* NamedImports */: - case 271 /* NamespaceImport */: - case 270 /* ImportClause */: + case 258 /* VariableDeclaration */: + case 259 /* VariableDeclarationList */: + case 274 /* ImportSpecifier */: + case 273 /* NamedImports */: + case 272 /* NamespaceImport */: + case 271 /* ImportClause */: return false; default: return true; @@ -50705,23 +50759,23 @@ function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return ancestor.initializer; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent = node.parent; - if (node.kind === 205 /* BindingElement */ && parent.kind === 203 /* ObjectBindingPattern */) { + if (node.kind === 206 /* BindingElement */ && parent.kind === 204 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 299 /* PropertyAssignment */ || node.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.kind === 300 /* PropertyAssignment */ || node.kind === 301 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent.elements.indexOf(node); @@ -50746,7 +50800,7 @@ parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 203 /* ObjectBindingPattern */) { + if (pattern.kind === 204 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { @@ -50802,7 +50856,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 104 /* NullKeyword */ || expr.kind === 79 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; + return expr.kind === 105 /* NullKeyword */ || expr.kind === 79 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; } function isEmptyArrayLiteral2(node) { const expr = skipParentheses( @@ -50810,13 +50864,13 @@ /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 206 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 207 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, isProperty = false, isOptional = true) { return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type; } function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) { - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 246 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression( declaration.parent.parent.expression, /*checkMode*/ @@ -50824,7 +50878,7 @@ ))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -50853,8 +50907,8 @@ } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 175 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 174 /* GetAccessor */); + if (func.kind === 176 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 175 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -50928,7 +50982,7 @@ const links = getSymbolLinks(symbol); if (links.isConstructorDeclaredProperty === void 0) { links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 209 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 210 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( /*declaredType*/ void 0, declaration, @@ -50956,7 +51010,7 @@ /*includeClassComputedPropertyName*/ false ); - if (container && (container.kind === 173 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 174 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -51226,7 +51280,7 @@ return type; } function containsSameNamedThisProperty(thisProperty, expression) { - return isPropertyAccessExpression(thisProperty) && thisProperty.expression.kind === 108 /* ThisKeyword */ && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); + return isPropertyAccessExpression(thisProperty) && thisProperty.expression.kind === 109 /* ThisKeyword */ && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); } function isDeclarationInConstructor(expression) { const thisContainer = getThisContainer( @@ -51236,7 +51290,7 @@ /*includeClassComputedPropertyName*/ false ); - return thisContainer.kind === 173 /* Constructor */ || thisContainer.kind === 259 /* FunctionDeclaration */ || thisContainer.kind === 215 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 174 /* Constructor */ || thisContainer.kind === 260 /* FunctionDeclaration */ || thisContainer.kind === 216 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -51303,7 +51357,7 @@ function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 205 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 206 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -51319,7 +51373,7 @@ return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 203 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 204 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration( @@ -51360,7 +51414,7 @@ } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 166 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 167 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -51434,7 +51488,7 @@ return reportCircularityError(symbol); } let type; - if (declaration.kind === 274 /* ExportAssignment */) { + if (declaration.kind === 275 /* ExportAssignment */) { type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) { type = getWidenedTypeForAssignmentDeclaration(symbol); @@ -51475,13 +51529,13 @@ function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -51506,9 +51560,9 @@ if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 174 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 175 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 169 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 175 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 176 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration( accessor, /*includeOptionality*/ @@ -51547,7 +51601,7 @@ if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = (_a2 = getDeclarationOfKind(symbol, 175 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 169 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = (_a2 = getDeclarationOfKind(symbol, 176 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { @@ -51587,7 +51641,7 @@ const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 223 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 223 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 224 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 224 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -51651,7 +51705,7 @@ ); return errorType; } - if (noImplicitAny && (declaration.kind !== 166 /* Parameter */ || declaration.initializer)) { + if (noImplicitAny && (declaration.kind !== 167 /* Parameter */ || declaration.initializer)) { error( symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, @@ -51765,43 +51819,43 @@ return void 0; } switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 320 /* JSDocFunctionType */: - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 262 /* TypeAliasDeclaration */: - case 348 /* JSDocTemplateTag */: - case 349 /* JSDocTypedefTag */: - case 343 /* JSDocEnumTag */: - case 341 /* JSDocCallbackTag */: - case 197 /* MappedType */: - case 191 /* ConditionalType */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 321 /* JSDocFunctionType */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 263 /* TypeAliasDeclaration */: + case 349 /* JSDocTemplateTag */: + case 350 /* JSDocTypedefTag */: + case 344 /* JSDocEnumTag */: + case 342 /* JSDocCallbackTag */: + case 198 /* MappedType */: + case 192 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 197 /* MappedType */) { + if (node.kind === 198 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))); - } else if (node.kind === 191 /* ConditionalType */) { + } else if (node.kind === 192 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */ || node.kind === 261 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; + const thisType = includeThisTypes && (node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */ || node.kind === 262 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 323 /* JSDoc */: { + case 324 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -51811,14 +51865,14 @@ function getOuterTypeParametersOfClassOrInterface(symbol) { var _a2; const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a2 = symbol.declarations) == null ? void 0 : _a2.find((decl) => { - if (decl.kind === 261 /* InterfaceDeclaration */) { + if (decl.kind === 262 /* InterfaceDeclaration */) { return true; } - if (decl.kind !== 257 /* VariableDeclaration */) { + if (decl.kind !== 258 /* VariableDeclaration */) { return false; } const initializer = decl.initializer; - return !!initializer && (initializer.kind === 215 /* FunctionExpression */ || initializer.kind === 216 /* ArrowFunction */); + return !!initializer && (initializer.kind === 216 /* FunctionExpression */ || initializer.kind === 217 /* ArrowFunction */); }); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); @@ -51829,7 +51883,7 @@ } let result; for (const node of symbol.declarations) { - if (node.kind === 261 /* InterfaceDeclaration */ || node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 262 /* InterfaceDeclaration */ || node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -51967,7 +52021,7 @@ } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 260 /* ClassDeclaration */ || declaration.kind === 261 /* InterfaceDeclaration */) { + if (declaration.kind === 261 /* ClassDeclaration */ || declaration.kind === 262 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -52056,7 +52110,7 @@ type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 261 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 262 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -52084,7 +52138,7 @@ return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 261 /* InterfaceDeclaration */) { + if (declaration.kind === 262 /* InterfaceDeclaration */) { if (declaration.flags & 128 /* ContainsThis */) { return false; } @@ -52156,7 +52210,7 @@ } } else { type = errorType; - if (declaration.kind === 343 /* JSDocEnumTag */) { + if (declaration.kind === 344 /* JSDocEnumTag */) { error(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } else { error(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); @@ -52175,7 +52229,7 @@ const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 263 /* EnumDeclaration */) { + if (declaration.kind === 264 /* EnumDeclaration */) { for (const member of declaration.members) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); @@ -52256,22 +52310,22 @@ } function isThislessType(node) { switch (node.kind) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 149 /* ObjectKeyword */: - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: - case 198 /* LiteralType */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 150 /* ObjectKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: + case 199 /* LiteralType */: return true; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return isThislessType(node.elementType); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -52287,21 +52341,21 @@ function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 173 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 174 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); } function isThisless(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { const declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -52316,10 +52370,15 @@ return result; } function addInheritedMembers(symbols, baseSymbols) { - for (const s of baseSymbols) { - if (!symbols.has(s.escapedName) && !isStaticPrivateIdentifierProperty(s)) { - symbols.set(s.escapedName, s); + for (const base of baseSymbols) { + if (isStaticPrivateIdentifierProperty(base)) { + continue; } + const derived = symbols.get(base.escapedName); + if (!derived || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration) && !isConstructorDeclaredProperty(derived) && !getContainingClassStaticBlock(derived.valueDeclaration)) { + symbols.set(base.escapedName, base); + symbols.set(base.escapedName, base); + } } } function isStaticPrivateIdentifierProperty(s) { @@ -53260,7 +53319,7 @@ } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 195 /* TypeOperator */ && constraintDeclaration.operator === 141 /* KeyOfKeyword */; + return constraintDeclaration.kind === 196 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -54127,7 +54186,7 @@ } else { parameters.push(paramSymbol); } - if (type && type.kind === 198 /* LiteralType */) { + if (type && type.kind === 199 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -54135,8 +54194,8 @@ minArgumentCount = parameters.length; } } - if ((declaration.kind === 174 /* GetAccessor */ || declaration.kind === 175 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter || !thisParameter)) { - const otherKind = declaration.kind === 174 /* GetAccessor */ ? 175 /* SetAccessor */ : 174 /* GetAccessor */; + if ((declaration.kind === 175 /* GetAccessor */ || declaration.kind === 176 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter || !thisParameter)) { + const otherKind = declaration.kind === 175 /* GetAccessor */ ? 176 /* SetAccessor */ : 175 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); @@ -54148,7 +54207,7 @@ thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, "this" /* This */), getTypeFromTypeNode(thisTag.typeExpression)); } } - const classType = declaration.kind === 173 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; + const classType = declaration.kind === 174 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { flags |= 1 /* HasRestParameter */; @@ -54226,15 +54285,15 @@ switch (node.kind) { case 79 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - return node.name.kind === 164 /* ComputedPropertyName */ && traverse(node.name); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + return node.name.kind === 165 /* ComputedPropertyName */ && traverse(node.name); + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return traverse(node.expression); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -54321,7 +54380,7 @@ function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 194 /* ThisType */ ? createTypePredicate( + return parameterName.kind === 195 /* ThisType */ ? createTypePredicate( node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, /*parameterName*/ void 0, @@ -54371,7 +54430,7 @@ return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 173 /* Constructor */) { + if (declaration.kind === 174 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } if (isJSDocSignature(declaration)) { @@ -54387,12 +54446,12 @@ if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 174 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 175 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 175 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 176 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -54495,7 +54554,7 @@ var _a2; if (!signature.isolatedSignatureType) { const kind = (_a2 = signature.declaration) == null ? void 0 : _a2.kind; - const isConstructor = kind === void 0 || kind === 173 /* Constructor */ || kind === 177 /* ConstructSignature */ || kind === 182 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 174 /* Constructor */ || kind === 178 /* ConstructSignature */ || kind === 183 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -54554,9 +54613,9 @@ let inferences; if ((_a2 = typeParameter.symbol) == null ? void 0 : _a2.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 192 /* InferType */) { + if (declaration.parent.kind === 193 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 180 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 181 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference); if (typeParameters) { @@ -54574,13 +54633,13 @@ } } } - } else if (grandParent.kind === 166 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 188 /* RestType */ || grandParent.kind === 199 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 167 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 189 /* RestType */ || grandParent.kind === 200 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 201 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 202 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 165 /* TypeParameter */ && grandParent.parent.kind === 197 /* MappedType */) { + } else if (grandParent.kind === 166 /* TypeParameter */ && grandParent.parent.kind === 198 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 197 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 191 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 197 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 198 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 192 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 198 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -54605,7 +54664,7 @@ } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 197 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 198 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -54614,7 +54673,7 @@ return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 165 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 166 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -54699,7 +54758,7 @@ return ((_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 180 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 185 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 181 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 186 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { @@ -54738,7 +54797,7 @@ return errorType; } } - if (node.kind === 180 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 181 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference( type, node, @@ -54829,9 +54888,9 @@ } function getTypeReferenceName(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -54843,10 +54902,10 @@ return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 163 /* QualifiedName */ ? name.right : name.kind === 208 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 164 /* QualifiedName */ ? name.right : name.kind === 209 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 163 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 208 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 164 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 209 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -54898,7 +54957,7 @@ const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 202 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 203 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -54926,7 +54985,7 @@ return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 186 /* TupleType */ && node.elements.length === 1; + return node.kind === 187 /* TupleType */ && node.elements.length === 1; } function getImpliedConstraint(type, checkNode, extendsNode) { return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0; @@ -54934,17 +54993,17 @@ function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 323 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 324 /* JSDoc */) { const parent = node.parent; - if (parent.kind === 166 /* Parameter */) { + if (parent.kind === 167 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent.kind === 191 /* ConditionalType */ && node === parent.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent.kind === 192 /* ConditionalType */ && node === parent.trueType) { const constraint = getImpliedConstraint(type, parent.checkType, parent.extendsType); if (constraint) { constraints = append(constraints, constraint); } - } else if (type.flags & 262144 /* TypeParameter */ && parent.kind === 197 /* MappedType */ && node === parent.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent.kind === 198 /* MappedType */ && node === parent.type) { const mappedType = getTypeFromTypeNode(parent); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -54961,7 +55020,7 @@ return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 180 /* TypeReference */ || node.kind === 202 /* ImportType */); + return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 181 /* TypeReference */ || node.kind === 203 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { @@ -55077,9 +55136,9 @@ if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: return declaration; } } @@ -55459,11 +55518,11 @@ } function getTupleElementFlags(node) { switch (node.kind) { - case 187 /* OptionalType */: + case 188 /* OptionalType */: return 2 /* Optional */; - case 188 /* RestType */: + case 189 /* RestType */: return getRestTypeElementFlags(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -55479,7 +55538,7 @@ return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 199 /* NamedTupleMember */); + const missingName = some(node.elements, (e) => e.kind !== 200 /* NamedTupleMember */); return getTupleTargetType( elementFlags, readonly, @@ -55488,51 +55547,51 @@ ); } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 185 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 186 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 186 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 187 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent = node.parent; switch (parent.kind) { - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: - case 180 /* TypeReference */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 196 /* IndexedAccessType */: - case 191 /* ConditionalType */: - case 195 /* TypeOperator */: - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: + case 181 /* TypeReference */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 197 /* IndexedAccessType */: + case 192 /* ConditionalType */: + case 196 /* TypeOperator */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return isResolvedByTypeAlias(parent); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return true; - case 195 /* TypeOperator */: - return node.operator !== 156 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 193 /* ParenthesizedType */: - case 187 /* OptionalType */: - case 199 /* NamedTupleMember */: - case 319 /* JSDocOptionalType */: - case 317 /* JSDocNullableType */: - case 318 /* JSDocNonNullableType */: - case 312 /* JSDocTypeExpression */: + case 196 /* TypeOperator */: + return node.operator !== 157 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); + case 194 /* ParenthesizedType */: + case 188 /* OptionalType */: + case 200 /* NamedTupleMember */: + case 320 /* JSDocOptionalType */: + case 318 /* JSDocNullableType */: + case 319 /* JSDocNonNullableType */: + case 313 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 188 /* RestType */: - return node.type.kind !== 185 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 189 /* RestType */: + return node.type.kind !== 186 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 190 /* UnionType */: + case 191 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -55543,22 +55602,22 @@ const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 186 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 186 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( + } else if (!(node.kind === 187 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 187 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( target, node, /*mapper*/ void 0 ); } else { - const elementTypes = node.kind === 185 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 186 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } return links.resolvedType; } function isReadonlyTypeOperator(node) { - return isTypeOperatorNode(node) && node.operator === 146 /* ReadonlyKeyword */; + return isTypeOperatorNode(node) && node.operator === 147 /* ReadonlyKeyword */; } function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations) { const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, (_) => 1 /* Required */), readonly, namedMemberDeclarations); @@ -55766,7 +55825,7 @@ return addTypesToUnion(typeSet, includes | (isNamedUnionType(type) ? 1048576 /* Union */ : 0), type.types); } if (!(flags & 131072 /* Never */)) { - includes |= flags & 205258751 /* IncludesMask */; + includes |= flags & 473694207 /* IncludesMask */; if (flags & 465829888 /* Instantiable */) includes |= 33554432 /* IncludesInstantiable */; if (type === wildcardType) @@ -56038,7 +56097,7 @@ typeSet.set(type.id.toString(), type); } } - includes |= flags & 205258751 /* IncludesMask */; + includes |= flags & 473694207 /* IncludesMask */; } return includes; } @@ -56241,12 +56300,15 @@ function getConstituentCountOfTypes(types) { return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0); } + function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) { + return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType; + } function getTypeFromIntersectionTypeNode(node) { const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); const types = map(node.types, getTypeFromTypeNode); - const noSupertypeReduction = types.length === 2 && !!(types[0].flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && types[1] === emptyTypeLiteralType; + const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0])); links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction); } return links.resolvedType; @@ -56308,7 +56370,7 @@ const typeVariable = getTypeParameterFromMappedType(mappedType); return isDistributive(getNameTypeFromMappedType(mappedType) || typeVariable); function isDistributive(type) { - return type.flags & (3 /* AnyOrUnknown */ | 134348796 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false; + return type.flags & (3 /* AnyOrUnknown */ | 402784252 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false; } } function getLiteralTypeFromPropertyName(name) { @@ -56377,13 +56439,13 @@ const links = getNodeLinks(node); if (!links.resolvedType) { switch (node.operator) { - case 141 /* KeyOfKeyword */: + case 142 /* KeyOfKeyword */: links.resolvedType = getIndexType(getTypeFromTypeNode(node.type)); break; - case 156 /* UniqueKeyword */: - links.resolvedType = node.type.kind === 153 /* SymbolKeyword */ ? getESSymbolLikeTypeForNode(walkUpParenthesizedTypes(node.parent)) : errorType; + case 157 /* UniqueKeyword */: + links.resolvedType = node.type.kind === 154 /* SymbolKeyword */ ? getESSymbolLikeTypeForNode(walkUpParenthesizedTypes(node.parent)) : errorType; break; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: links.resolvedType = getTypeFromTypeNode(node.type); break; default: @@ -56569,7 +56631,7 @@ } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { var _a2; - const accessExpression = accessNode && accessNode.kind === 209 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 210 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -56767,7 +56829,7 @@ } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 209 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 196 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 164 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 210 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 197 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 165 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); @@ -56904,7 +56966,7 @@ } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 196 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 197 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -57244,7 +57306,7 @@ } function getAliasSymbolForTypeNode(node) { let host2 = node.parent; - while (isParenthesizedTypeNode(host2) || isJSDocTypeExpression(host2) || isTypeOperatorNode(host2) && host2.operator === 146 /* ReadonlyKeyword */) { + while (isParenthesizedTypeNode(host2) || isJSDocTypeExpression(host2) || isTypeOperatorNode(host2) && host2.operator === 147 /* ReadonlyKeyword */) { host2 = host2.parent; } return isTypeAlias(host2) ? getSymbolOfDeclaration(host2) : void 0; @@ -57434,7 +57496,7 @@ return enumLiteralTypes.get(key) || (enumLiteralTypes.set(key, type = createLiteralType(flags, value, symbol)), type); } function getTypeFromLiteralTypeNode(node) { - if (node.literal.kind === 104 /* NullKeyword */) { + if (node.literal.kind === 105 /* NullKeyword */) { return nullType; } const links = getNodeLinks(node); @@ -57467,7 +57529,7 @@ false ); const parent = container && container.parent; - if (parent && (isClassLike(parent) || parent.kind === 261 /* InterfaceDeclaration */)) { + if (parent && (isClassLike(parent) || parent.kind === 262 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent)).thisType; } @@ -57497,17 +57559,17 @@ } function getArrayElementTypeNode(node) { switch (node.kind) { - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 186 /* TupleType */: + case 187 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 188 /* RestType */ || node.kind === 199 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 189 /* RestType */ || node.kind === 200 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return node.elementType; } return void 0; @@ -57526,94 +57588,94 @@ } function getTypeFromTypeNodeWorker(node) { switch (node.kind) { - case 131 /* AnyKeyword */: - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: + case 132 /* AnyKeyword */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: return anyType; - case 157 /* UnknownKeyword */: + case 158 /* UnknownKeyword */: return unknownType; - case 152 /* StringKeyword */: + case 153 /* StringKeyword */: return stringType; - case 148 /* NumberKeyword */: + case 149 /* NumberKeyword */: return numberType; - case 160 /* BigIntKeyword */: + case 161 /* BigIntKeyword */: return bigintType; - case 134 /* BooleanKeyword */: + case 135 /* BooleanKeyword */: return booleanType; - case 153 /* SymbolKeyword */: + case 154 /* SymbolKeyword */: return esSymbolType; - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return voidType; - case 155 /* UndefinedKeyword */: + case 156 /* UndefinedKeyword */: return undefinedType; - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return nullType; - case 144 /* NeverKeyword */: + case 145 /* NeverKeyword */: return neverType; - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; - case 139 /* IntrinsicKeyword */: + case 140 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 194 /* ThisType */: - case 108 /* ThisKeyword */: + case 195 /* ThisType */: + case 109 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return getTypeFromTypeReference(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 187 /* OptionalType */: + case 188 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 189 /* UnionType */: + case 190 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 193 /* ParenthesizedType */: - case 318 /* JSDocNonNullableType */: - case 312 /* JSDocTypeExpression */: + case 194 /* ParenthesizedType */: + case 319 /* JSDocNonNullableType */: + case 313 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 188 /* RestType */: + case 189 /* RestType */: return getTypeFromRestTypeNode(node); - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 192 /* InferType */: + case 193 /* InferType */: return getTypeFromInferTypeNode(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return getTypeFromImportTypeNode(node); case 79 /* Identifier */: - case 163 /* QualifiedName */: - case 208 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -57818,13 +57880,13 @@ return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 180 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 202 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 181 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 203 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); } function isTypeParameterPossiblyReferenced(tp, node) { if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { const container = tp.symbol.declarations[0].parent; for (let n = node; n !== container; n = n.parent) { - if (!n || n.kind === 238 /* Block */ || n.kind === 191 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 239 /* Block */ || n.kind === 192 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -57833,17 +57895,17 @@ return true; function containsReference(node2) { switch (node2.kind) { - case 194 /* ThisType */: + case 195 /* ThisType */: return !!tp.isThisType; case 79 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; let tpScope; - if (tpDeclaration.kind === 165 /* TypeParameter */) { + if (tpDeclaration.kind === 166 /* TypeParameter */) { tpScope = tpDeclaration.parent; } else if (tp.isThisType) { tpScope = tpDeclaration; @@ -57854,8 +57916,8 @@ return some(firstIdentifierSymbol.declarations, (idDecl) => isNodeDescendantOf(idDecl, tpScope)) || some(node2.typeArguments, containsReference); } return true; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -58091,13 +58153,13 @@ return type; } function getUniqueLiteralFilledInstantiation(type) { - return type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper)); + return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper)); } function getPermissiveInstantiation(type) { - return type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper)); + return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper)); } function getRestrictiveInstantiation(type) { - if (type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */)) { + if (type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */)) { return type; } if (type.restrictiveInstantiation) { @@ -58111,32 +58173,32 @@ return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return (node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 288 /* JsxAttribute */: { + case 289 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 291 /* JsxExpression */: { + case 292 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -58147,7 +58209,7 @@ return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node); } function hasContextSensitiveReturnExpression(node) { - return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 238 /* Block */ && isContextSensitive(node.body); + return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 239 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func); @@ -58239,23 +58301,23 @@ return true; } switch (node.kind) { - case 291 /* JsxExpression */: - case 214 /* ParenthesizedExpression */: + case 292 /* JsxExpression */: + case 215 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 27 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -58555,16 +58617,16 @@ } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return { errorNode: child, innerExpression: child.expression, nameType }; case 11 /* JsxText */: if (child.containsOnlyTriviaWhiteSpaces) { break; } return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() }; - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -58680,7 +58742,7 @@ } } function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (target.flags & (134348796 /* Primitive */ | 131072 /* Never */)) + if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) return false; if (isTupleLikeType(source)) { return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); @@ -58714,13 +58776,13 @@ continue; } switch (prop.kind) { - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: - case 171 /* MethodDeclaration */: - case 300 /* ShorthandPropertyAssignment */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: + case 172 /* MethodDeclaration */: + case 301 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; break; default: @@ -58729,7 +58791,7 @@ } } function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (target.flags & (134348796 /* Primitive */ | 131072 /* Never */)) + if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) return false; return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer); } @@ -58792,7 +58854,7 @@ void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 171 /* MethodDeclaration */ && kind !== 170 /* MethodSignature */ && kind !== 173 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 172 /* MethodDeclaration */ && kind !== 171 /* MethodSignature */ && kind !== 174 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -59386,7 +59448,7 @@ return isRelatedTo(source2, target2, 3 /* Both */, reportErrors2); } function isRelatedTo(originalSource, originalTarget, recursionFlags = 3 /* Both */, reportErrors2 = false, headMessage2, intersectionState = 0 /* None */) { - if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 134348796 /* Primitive */) { + if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 402784252 /* Primitive */) { if (relation === comparableRelation && !(originalTarget.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(originalTarget, originalSource, relation) || isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors2 ? reportError : void 0)) { return -1 /* True */; } @@ -59450,7 +59512,7 @@ return 0 /* False */; } } - const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (134348796 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2)); + const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (402784252 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2)); const isComparingJsxAttributes = !!(getObjectFlags(source2) & 2048 /* JsxAttributes */); if (isPerformingCommonPropertyChecks && !hasCommonProperties(source2, target2, isComparingJsxAttributes)) { if (reportErrors2) { @@ -59512,7 +59574,7 @@ maybeSuppress = !!errorInfo; } } - if (source2.flags & 524288 /* Object */ && target2.flags & 134348796 /* Primitive */) { + if (source2.flags & 524288 /* Object */ && target2.flags & 402784252 /* Primitive */) { tryElaborateErrorsForPrimitivesAndObjects(source2, target2); } else if (source2.symbol && source2.flags & 524288 /* Object */ && globalObjectType === source2) { reportError(Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead); @@ -59619,8 +59681,8 @@ if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, (d) => d === objectLiteralDeclaration) && getSourceFileOfNode(objectLiteralDeclaration) === getSourceFileOfNode(errorNode)) { const propDeclaration = prop.valueDeclaration; Debug.assertNode(propDeclaration, isObjectLiteralElementLike); - errorNode = propDeclaration; const name = propDeclaration.name; + errorNode = name; if (isIdentifier(name)) { suggestion = getSuggestionForNonexistentProperty(name, errorTarget); } @@ -59658,15 +59720,15 @@ } function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) { if (source2.flags & 1048576 /* Union */) { - return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */), intersectionState); + return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState); } if (target2.flags & 1048576 /* Union */) { - return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source2), target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */) && !(target2.flags & 134348796 /* Primitive */)); + return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source2), target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */) && !(target2.flags & 402784252 /* Primitive */)); } if (target2.flags & 2097152 /* Intersection */) { return typeRelatedToEachType(source2, target2, reportErrors2, 2 /* Target */); } - if (relation === comparableRelation && target2.flags & 134348796 /* Primitive */) { + if (relation === comparableRelation && target2.flags & 402784252 /* Primitive */) { const constraints = sameMap(source2.types, (t) => t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(t) || unknownType : t); if (constraints !== source2.types) { source2 = getIntersectionType(constraints); @@ -60560,7 +60622,7 @@ } return 0 /* False */; } - const sourceIsPrimitive = !!(sourceFlags & 134348796 /* Primitive */); + const sourceIsPrimitive = !!(sourceFlags & 402784252 /* Primitive */); if (relation !== identityRelation) { source2 = getApparentType(source2); sourceFlags = source2.flags; @@ -61152,7 +61214,7 @@ const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 173 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 173 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 174 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 174 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString( signature, /*enclosingDeclaration*/ @@ -61852,7 +61914,7 @@ const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 208 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 209 /* PropertyAccessExpression */) { return void 0; } } @@ -62252,12 +62314,12 @@ } let diagnostic; switch (declaration.kind) { - case 223 /* BinaryExpression */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 224 /* BinaryExpression */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 166 /* Parameter */: + case 167 /* Parameter */: const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); @@ -62278,27 +62340,27 @@ } diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 326 /* JSDocSignature */: + case 327 /* JSDocSignature */: if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) { error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); } return; - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (noImplicitAny && !declaration.name) { if (wideningKind === 3 /* GeneratorYield */) { error(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); @@ -62309,7 +62371,7 @@ } diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; - case 197 /* MappedType */: + case 198 /* MappedType */: if (noImplicitAny) { error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } @@ -62407,7 +62469,7 @@ function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 171 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType(node, 2 /* NoConstraints */); + const contextualType = node.kind === 172 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -62459,8 +62521,8 @@ } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 262 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 308 /* SourceFile */ ? true : n.kind === 264 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 263 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 309 /* SourceFile */ ? true : n.kind === 265 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -63275,7 +63337,7 @@ function inferFromSignature(source, target) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 173 /* Constructor */; + bivariant = bivariant || kind === 172 /* MethodDeclaration */ || kind === 171 /* MethodSignature */ || kind === 174 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; applyToReturnTypes(source, target, inferFromTypes); @@ -63318,7 +63380,7 @@ } function hasPrimitiveConstraint(type) { const constraint = getConstraintOfTypeParameter(type); - return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 134348796 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); + return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); } function isObjectLiteralType(type) { return !!(getObjectFlags(type) & 128 /* ObjectLiteral */); @@ -63432,7 +63494,7 @@ return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 301 /* ShorthandPropertyAssignment */) { return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer; } else { return Diagnostics.Cannot_find_name_0; @@ -63458,7 +63520,7 @@ function isInTypeQuery(node) { return !!findAncestor( node, - (n) => n.kind === 183 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 163 /* QualifiedName */ ? false : "quit" + (n) => n.kind === 184 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 164 /* QualifiedName */ ? false : "quit" ); } function isInAmbientOrTypeNode(node) { @@ -63471,61 +63533,61 @@ const symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? `${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}|${getSymbolId(symbol)}` : void 0; } - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 233 /* MetaProperty */: - return target.kind === 233 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 234 /* MetaProperty */: + return target.kind === 234 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - return isThisInTypeQuery(source) ? target.kind === 108 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); - case 108 /* ThisKeyword */: - return target.kind === 108 /* ThisKeyword */; - case 106 /* SuperKeyword */: - return target.kind === 106 /* SuperKeyword */; - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: + return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); + case 109 /* ThisKeyword */: + return target.kind === 109 /* ThisKeyword */; + case 107 /* SuperKeyword */: + return target.kind === 107 /* SuperKeyword */; + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const sourcePropertyName = getAccessedPropertyName(source); const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0; return sourcePropertyName !== void 0 && targetPropertyName !== void 0 && targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -63680,7 +63742,7 @@ } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 299 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 300 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -63695,7 +63757,7 @@ } } } - if (expression.expression.kind === 208 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 209 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -63800,7 +63862,7 @@ return 83886079 /* UnknownFacts */; } function getIntersectionTypeFacts(type) { - const ignoreObjects = maybeTypeOfKind(type, 134348796 /* Primitive */); + const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */); let oredFacts = 0 /* None */; let andedFacts = 134217727 /* All */; for (const t of type.types) { @@ -63868,11 +63930,11 @@ ) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 206 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 299 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 207 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 300 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent) { - return parent.parent.kind === 223 /* BinaryExpression */ && parent.parent.left === parent || parent.parent.kind === 247 /* ForOfStatement */ && parent.parent.initializer === parent; + return parent.parent.kind === 224 /* BinaryExpression */ && parent.parent.left === parent || parent.parent.kind === 248 /* ForOfStatement */ && parent.parent.initializer === parent; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -63889,21 +63951,21 @@ function getAssignedType(node) { const { parent } = node; switch (parent.kind) { - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return stringType; - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return checkRightHandSideOfForOf(parent) || errorType; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return undefinedType; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent, node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent); } return errorType; @@ -63911,7 +63973,7 @@ function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 203 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 204 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); return getTypeWithDefault(type, node.initializer); } function getTypeOfInitializer(node) { @@ -63922,25 +63984,25 @@ if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 246 /* ForInStatement */) { + if (node.parent.parent.kind === 247 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 247 /* ForOfStatement */) { + if (node.parent.parent.kind === 248 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 257 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 258 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 257 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 205 /* BindingElement */ && node.parent.kind === 223 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 258 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 206 /* BindingElement */ && node.parent.kind === 224 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 75 /* BarBarEqualsToken */: @@ -63955,10 +64017,10 @@ } function getReferenceRoot(node) { const { parent } = node; - return parent.kind === 214 /* ParenthesizedExpression */ || parent.kind === 223 /* BinaryExpression */ && parent.operatorToken.kind === 63 /* EqualsToken */ && parent.left === node || parent.kind === 223 /* BinaryExpression */ && parent.operatorToken.kind === 27 /* CommaToken */ && parent.right === node ? getReferenceRoot(parent) : node; + return parent.kind === 215 /* ParenthesizedExpression */ || parent.kind === 224 /* BinaryExpression */ && parent.operatorToken.kind === 63 /* EqualsToken */ && parent.left === node || parent.kind === 224 /* BinaryExpression */ && parent.operatorToken.kind === 27 /* CommaToken */ && parent.right === node ? getReferenceRoot(parent) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -63974,12 +64036,12 @@ return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 292 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 293 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 292 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 293 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -64137,8 +64199,8 @@ function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent) && (parent.name.escapedText === "length" || parent.parent.kind === 210 /* CallExpression */ && isIdentifier(parent.name) && isPushOrUnshiftIdentifier(parent.name)); - const isElementAssignment = parent.kind === 209 /* ElementAccessExpression */ && parent.expression === root && parent.parent.kind === 223 /* BinaryExpression */ && parent.parent.operatorToken.kind === 63 /* EqualsToken */ && parent.parent.left === parent && !isAssignmentTarget(parent.parent) && isTypeAssignableToKind(getTypeOfExpression(parent.argumentExpression), 296 /* NumberLike */); + const isLengthPushOrUnshift = isPropertyAccessExpression(parent) && (parent.name.escapedText === "length" || parent.parent.kind === 211 /* CallExpression */ && isIdentifier(parent.name) && isPushOrUnshiftIdentifier(parent.name)); + const isElementAssignment = parent.kind === 210 /* ElementAccessExpression */ && parent.expression === root && parent.parent.kind === 224 /* BinaryExpression */ && parent.parent.operatorToken.kind === 63 /* EqualsToken */ && parent.parent.left === parent && !isAssignmentTarget(parent.parent) && isTypeAssignableToKind(getTypeOfExpression(parent.argumentExpression), 296 /* NumberLike */); return isLengthPushOrUnshift || isElementAssignment; } function isDeclarationWithExplicitTypeAnnotation(node) { @@ -64161,7 +64223,7 @@ if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName( statement.expression, @@ -64191,11 +64253,11 @@ case 79 /* Identifier */: const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node)); return getExplicitTypeOfSymbol(symbol, diagnostic); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return getExplicitThisType(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 208 /* PropertyAccessExpression */: { + case 209 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -64212,7 +64274,7 @@ } return void 0; } - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -64222,13 +64284,13 @@ let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 241 /* ExpressionStatement */) { + if (node.parent.kind === 242 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ void 0 ); - } else if (node.expression.kind !== 106 /* SuperKeyword */) { + } else if (node.expression.kind !== 107 /* SuperKeyword */) { if (isOptionalChain(node)) { funcType = checkNonNullType( getOptionalExpressionType(checkExpression(node.expression), node.expression), @@ -64276,7 +64338,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 95 /* FalseKeyword */ || node.kind === 223 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + return node.kind === 96 /* FalseKeyword */ || node.kind === 224 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { @@ -64365,7 +64427,7 @@ if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 128 /* SwitchClause */)) { flow = flow.antecedent; } else if (flags & 512 /* Call */) { - if (flow.node.expression.kind === 106 /* SuperKeyword */) { + if (flow.node.expression.kind === 107 /* SuperKeyword */) { return true; } flow = flow.antecedent; @@ -64401,8 +64463,8 @@ return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } break; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -64422,7 +64484,7 @@ const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode)); sharedFlowCount = sharedFlowStart; const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType); - if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 232 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 233 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -64491,7 +64553,7 @@ target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 208 /* PropertyAccessExpression */ && reference.kind !== 209 /* ElementAccessExpression */ && reference.kind !== 108 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 209 /* PropertyAccessExpression */ && reference.kind !== 210 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { flow = container.flowNode; continue; } @@ -64510,7 +64572,7 @@ } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -64540,13 +64602,13 @@ } if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 215 /* FunctionExpression */ || init.kind === 216 /* ArrowFunction */)) { + if (init && (init.kind === 216 /* FunctionExpression */ || init.kind === 217 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 246 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 247 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -64557,10 +64619,10 @@ /*excludeJSDocTypeAssertions*/ true ); - if (node.kind === 95 /* FalseKeyword */) { + if (node.kind === 96 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 223 /* BinaryExpression */) { + if (node.kind === 224 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -64600,13 +64662,13 @@ function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 210 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 211 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { const flowType = getTypeAtFlowNode(flow.antecedent); const type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { let evolvedType2 = type; - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -64643,7 +64705,7 @@ let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 218 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 219 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -64655,7 +64717,7 @@ flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 218 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 219 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -64918,10 +64980,10 @@ const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 218 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 219 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 218 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 219 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -64952,9 +65014,9 @@ return narrowTypeByConstructor(type, operator, left, assumeTrue); } break; - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return narrowTypeByInstanceof(type, expr, assumeTrue); - case 101 /* InKeyword */: + case 102 /* InKeyword */: if (isPrivateIdentifier(expr.left)) { return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue); } @@ -65063,7 +65125,7 @@ } if (assumeTrue) { if (!doubleEquals && (type.flags & 2 /* Unknown */ || someType(type, isEmptyAnonymousObjectType))) { - if (valueType.flags & (134348796 /* Primitive */ | 67108864 /* NonPrimitive */) || isEmptyAnonymousObjectType(valueType)) { + if (valueType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) || isEmptyAnonymousObjectType(valueType)) { return valueType; } if (valueType.flags & 524288 /* Object */) { @@ -65113,7 +65175,7 @@ let groundClauseTypes; for (let i = 0; i < clauseTypes.length; i += 1) { const t = clauseTypes[i]; - if (t.flags & (134348796 /* Primitive */ | 67108864 /* NonPrimitive */)) { + if (t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) { if (groundClauseTypes !== void 0) { groundClauseTypes.push(t); } @@ -65180,7 +65242,7 @@ if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 293 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 294 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -65355,19 +65417,19 @@ } } } - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: if (expr.operator === 53 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -65405,7 +65467,7 @@ return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 266 /* ModuleBlock */ || node2.kind === 309 /* SourceFile */ || node2.kind === 170 /* PropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -65456,12 +65518,12 @@ return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 166 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 167 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { const parent = node.parent; - return parent.kind === 208 /* PropertyAccessExpression */ || parent.kind === 163 /* QualifiedName */ || parent.kind === 210 /* CallExpression */ && parent.expression === node || parent.kind === 209 /* ElementAccessExpression */ && parent.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent.argumentExpression))); + return parent.kind === 209 /* PropertyAccessExpression */ || parent.kind === 164 /* QualifiedName */ || parent.kind === 211 /* CallExpression */ && parent.expression === node || parent.kind === 210 /* ElementAccessExpression */ && parent.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent.argumentExpression))); } function isGenericTypeWithUnionConstraint(type) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */)); @@ -65522,14 +65584,14 @@ if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent = declaration.parent.parent; - if (parent.kind === 257 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent.kind === 166 /* Parameter */) { + if (parent.kind === 258 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent.kind === 167 /* Parameter */) { const links = getNodeLinks(parent); if (!(links.flags & 16777216 /* InCheckIdentifier */)) { links.flags |= 16777216 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); links.flags &= ~16777216 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent.kind === 166 /* Parameter */ && isSymbolAssigned(symbol))) { + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent.kind === 167 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference( pattern, @@ -65586,7 +65648,7 @@ } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 216 /* ArrowFunction */) { + if (container.kind === 217 /* ArrowFunction */) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (hasSyntacticModifier(container, 512 /* Async */)) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); @@ -65605,7 +65667,7 @@ } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 260 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { + if (declaration.kind === 261 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { let container = getContainingClass(node); while (container !== void 0) { if (container === declaration && container.name !== node) { @@ -65615,7 +65677,7 @@ } container = getContainingClass(container); } - } else if (declaration.kind === 228 /* ClassExpression */) { + } else if (declaration.kind === 229 /* ClassExpression */) { let container = getThisContainer( node, /*includeArrowFunctions*/ @@ -65623,7 +65685,7 @@ /*includeClassComputedPropertyName*/ false ); - while (container.kind !== 308 /* SourceFile */) { + while (container.kind !== 309 /* SourceFile */) { if (container.parent === declaration) { if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; @@ -65673,16 +65735,16 @@ return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 167 /* Parameter */; const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); const isModuleExports = symbol.flags & 134217728 /* ModuleExports */; - while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + while (flowContainer !== declarationContainer && (flowContainer.kind === 216 /* FunctionExpression */ || flowContainer.kind === 217 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } - const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; + const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 279 /* ExportSpecifier */) || node.parent.kind === 233 /* NonNullExpression */ || declaration.kind === 258 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type); const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer); if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) { @@ -65736,7 +65798,7 @@ )); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 295 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 296 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -65746,7 +65808,7 @@ if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 259 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -65765,7 +65827,7 @@ } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 259 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */; } @@ -65782,13 +65844,13 @@ } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 214 /* ParenthesizedExpression */) { + while (current.parent.kind === 215 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 221 /* PrefixUnaryExpression */ || current.parent.kind === 222 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 222 /* PrefixUnaryExpression */ || current.parent.kind === 223 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; } @@ -65799,7 +65861,7 @@ } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 169 /* PropertyDeclaration */ || container.kind === 173 /* Constructor */) { + if (container.kind === 170 /* PropertyDeclaration */ || container.kind === 174 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -65844,11 +65906,11 @@ ); let capturedByArrowFunction = false; let thisInComputedPropertyName = false; - if (container.kind === 173 /* Constructor */) { + if (container.kind === 174 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } while (true) { - if (container.kind === 216 /* ArrowFunction */) { + if (container.kind === 217 /* ArrowFunction */) { container = getThisContainer( container, /* includeArrowFunctions */ @@ -65857,7 +65919,7 @@ ); capturedByArrowFunction = true; } - if (container.kind === 164 /* ComputedPropertyName */) { + if (container.kind === 165 /* ComputedPropertyName */) { container = getThisContainer( container, !capturedByArrowFunction, @@ -65874,13 +65936,13 @@ error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); } else { switch (container.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 173 /* Constructor */: + case 174 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } @@ -65974,13 +66036,13 @@ } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 215 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 216 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 171 /* MethodDeclaration */ && container.parent.kind === 207 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 172 /* MethodDeclaration */ && container.parent.kind === 208 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 215 /* FunctionExpression */ && container.parent.kind === 299 /* PropertyAssignment */ && container.parent.parent.kind === 207 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 216 /* FunctionExpression */ && container.parent.kind === 300 /* PropertyAssignment */ && container.parent.parent.kind === 208 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 215 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { + } else if (container.kind === 216 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.parent.arguments[0].expression; } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.arguments[0].expression; @@ -65988,7 +66050,7 @@ } function getTypeForThisExpressionFromJSDoc(node) { const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 320 /* JSDocFunctionType */) { + if (jsdocType && jsdocType.kind === 321 /* JSDocFunctionType */) { const jsDocFunctionType = jsdocType; if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].name && jsDocFunctionType.parameters[0].name.escapedText === "this" /* This */) { return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); @@ -66000,10 +66062,10 @@ } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 166 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 167 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 210 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 211 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer( node, /*stopOnFunctions*/ @@ -66013,7 +66075,7 @@ let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 216 /* ArrowFunction */) { + while (container && container.kind === 217 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer( @@ -66028,19 +66090,19 @@ } let nodeCheckFlag = 0; if (!container || !isLegalUsageOfSuperExpression(container)) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 164 /* ComputedPropertyName */); - if (current && current.kind === 164 /* ComputedPropertyName */) { + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 165 /* ComputedPropertyName */); + if (current && current.kind === 165 /* ComputedPropertyName */) { error(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression2) { error(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 207 /* ObjectLiteralExpression */)) { + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 208 /* ObjectLiteralExpression */)) { error(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { error(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); } return errorType; } - if (!isCallExpression2 && immediateContainer.kind === 173 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 174 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if (isStatic(container) || isCallExpression2) { @@ -66056,7 +66118,7 @@ nodeCheckFlag = 16 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 171 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 172 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -66066,7 +66128,7 @@ if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 207 /* ObjectLiteralExpression */) { + if (container.parent.kind === 208 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { error(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return errorType; @@ -66084,20 +66146,20 @@ if (!baseClassType) { return errorType; } - if (container.kind === 173 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 174 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType); function isLegalUsageOfSuperExpression(container2) { if (isCallExpression2) { - return container2.kind === 173 /* Constructor */; + return container2.kind === 174 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 207 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 208 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 171 /* MethodDeclaration */ || container2.kind === 170 /* MethodSignature */ || container2.kind === 174 /* GetAccessor */ || container2.kind === 175 /* SetAccessor */ || container2.kind === 169 /* PropertyDeclaration */ || container2.kind === 172 /* ClassStaticBlockDeclaration */; + return container2.kind === 172 /* MethodDeclaration */ || container2.kind === 171 /* MethodSignature */ || container2.kind === 175 /* GetAccessor */ || container2.kind === 176 /* SetAccessor */ || container2.kind === 170 /* PropertyDeclaration */ || container2.kind === 173 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 171 /* MethodDeclaration */ || container2.kind === 170 /* MethodSignature */ || container2.kind === 174 /* GetAccessor */ || container2.kind === 175 /* SetAccessor */ || container2.kind === 169 /* PropertyDeclaration */ || container2.kind === 168 /* PropertySignature */ || container2.kind === 173 /* Constructor */; + return container2.kind === 172 /* MethodDeclaration */ || container2.kind === 171 /* MethodSignature */ || container2.kind === 175 /* GetAccessor */ || container2.kind === 176 /* SetAccessor */ || container2.kind === 170 /* PropertyDeclaration */ || container2.kind === 169 /* PropertySignature */ || container2.kind === 174 /* Constructor */; } } } @@ -66105,7 +66167,7 @@ } } function getContainingObjectLiteral(func) { - return (func.kind === 171 /* MethodDeclaration */ || func.kind === 174 /* GetAccessor */ || func.kind === 175 /* SetAccessor */) && func.parent.kind === 207 /* ObjectLiteralExpression */ ? func.parent : func.kind === 215 /* FunctionExpression */ && func.parent.kind === 299 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 172 /* MethodDeclaration */ || func.kind === 175 /* GetAccessor */ || func.kind === 176 /* SetAccessor */) && func.parent.kind === 208 /* ObjectLiteralExpression */ ? func.parent : func.kind === 216 /* FunctionExpression */ && func.parent.kind === 300 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -66116,7 +66178,7 @@ }); } function getContextualThisParameterType(func) { - if (func.kind === 216 /* ArrowFunction */) { + if (func.kind === 217 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -66144,7 +66206,7 @@ if (thisType) { return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } - if (literal.parent.kind !== 299 /* PropertyAssignment */) { + if (literal.parent.kind !== 300 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -66157,7 +66219,7 @@ return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent = walkUpParenthesizedExpressions(func.parent); - if (parent.kind === 223 /* BinaryExpression */ && parent.operatorToken.kind === 63 /* EqualsToken */) { + if (parent.kind === 224 /* BinaryExpression */ && parent.operatorToken.kind === 63 /* EqualsToken */) { const target = parent.left; if (isAccessExpression(target)) { const { expression } = target; @@ -66212,11 +66274,11 @@ return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 166 /* Parameter */: + case 167 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -66225,10 +66287,10 @@ function getContextualTypeForBindingElement(declaration, contextFlags) { const parent = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent, contextFlags) || parent.kind !== 205 /* BindingElement */ && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent, contextFlags) || parent.kind !== 206 /* BindingElement */ && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent.name.kind === 204 /* ArrayBindingPattern */) { + if (parent.name.kind === 205 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -66378,7 +66440,7 @@ return signature ? getOrCreateTypeFromSignature(signature) : void 0; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 212 /* TaggedTemplateExpression */) { + if (template.parent.kind === 213 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -66707,16 +66769,16 @@ case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: case 79 /* Identifier */: - case 155 /* UndefinedKeyword */: + case 156 /* UndefinedKeyword */: return true; - case 208 /* PropertyAccessExpression */: - case 214 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 215 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -66726,7 +66788,7 @@ contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 299 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 300 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -66746,7 +66808,7 @@ contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 288 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 289 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -66814,47 +66876,47 @@ } const { parent } = node; switch (parent.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 206 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 216 /* ArrowFunction */: - case 250 /* ReturnStatement */: + case 217 /* ArrowFunction */: + case 251 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return getContextualTypeForYieldOperand(parent, contextFlags); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent, contextFlags); - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return getContextualTypeForArgument(parent, node); - case 167 /* Decorator */: + case 168 /* Decorator */: return getContextualTypeForDecorator(parent); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return isConstTypeReference(parent.type) ? getContextualType(parent, contextFlags) : getTypeFromTypeNode(parent.type); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent, contextFlags); - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return getContextualType(parent.parent, contextFlags); - case 206 /* ArrayLiteralExpression */: { + case 207 /* ArrayLiteralExpression */: { const arrayLiteral = parent; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); const spreadIndex = (_b = (_a2 = getNodeLinks(arrayLiteral)).firstSpreadIndex) != null ? _b : _a2.firstSpreadIndex = findIndex(arrayLiteral.elements, isSpreadElement); const elementIndex = indexOfNode(arrayLiteral.elements, node); return getContextualTypeForElementExpression(type, spreadIndex < 0 || elementIndex < spreadIndex ? elementIndex : -1); } - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 236 /* TemplateSpan */: - Debug.assert(parent.parent.kind === 225 /* TemplateExpression */); + case 237 /* TemplateSpan */: + Debug.assert(parent.parent.kind === 226 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 214 /* ParenthesizedExpression */: { + case 215 /* ParenthesizedExpression */: { if (isInJSFile(parent)) { if (isJSDocSatisfiesExpression(parent)) { return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent)); @@ -66866,19 +66928,19 @@ } return getContextualType(parent, contextFlags); } - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return getContextualType(parent, contextFlags); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return getTypeFromTypeNode(parent.type); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return getContextualTypeForJsxExpression(parent, contextFlags); - case 288 /* JsxAttribute */: - case 290 /* JsxSpreadAttribute */: + case 289 /* JsxAttribute */: + case 291 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent, contextFlags); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent, contextFlags); } return void 0; @@ -67146,7 +67208,7 @@ return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -67197,7 +67259,7 @@ return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 205 /* BindingElement */ && !!node.initializer || node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; + return node.kind === 206 /* BindingElement */ && !!node.initializer || node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -67216,7 +67278,7 @@ let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 227 /* SpreadElement */) { + if (e.kind === 228 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -67240,7 +67302,7 @@ elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 229 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 230 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(undefinedOrMissingType); elementFlags.push(2 /* Optional */); @@ -67287,7 +67349,7 @@ } function isNumericName(name) { switch (name.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return isNumericComputedName(name); case 79 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -67304,7 +67366,7 @@ function checkComputedPropertyName(node) { const links = getNodeLinks(node.expression); if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 101 /* InKeyword */ && node.parent.kind !== 174 /* GetAccessor */ && node.parent.kind !== 175 /* SetAccessor */) { + if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 102 /* InKeyword */ && node.parent.kind !== 175 /* GetAccessor */ && node.parent.kind !== 176 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -67373,7 +67435,7 @@ /*contextFlags*/ void 0 ); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 203 /* ObjectBindingPattern */ || contextualType.pattern.kind === 207 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 204 /* ObjectBindingPattern */ || contextualType.pattern.kind === 208 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -67392,13 +67454,13 @@ let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfDeclaration(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 164 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 299 /* PropertyAssignment */ || memberDecl.kind === 300 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 299 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( + const computedNameType = memberDecl.name && memberDecl.name.kind === 165 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 300 /* PropertyAssignment */ || memberDecl.kind === 301 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 300 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. // we don't want to say "could not find 'a'". - memberDecl.kind === 300 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) + memberDecl.kind === 301 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) ); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); @@ -67416,7 +67478,7 @@ prop.links.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 299 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 300 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 300 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 301 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -67442,13 +67504,13 @@ prop.links.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 299 /* PropertyAssignment */ || memberDecl.kind === 171 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 300 /* PropertyAssignment */ || memberDecl.kind === 172 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 299 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 300 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } - } else if (memberDecl.kind === 301 /* SpreadAssignment */) { + } else if (memberDecl.kind === 302 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -67477,7 +67539,7 @@ } continue; } else { - Debug.assert(memberDecl.kind === 174 /* GetAccessor */ || memberDecl.kind === 175 /* SetAccessor */); + Debug.assert(memberDecl.kind === 175 /* GetAccessor */ || memberDecl.kind === 176 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -67502,13 +67564,13 @@ if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 257 /* VariableDeclaration */ || n.kind === 223 /* BinaryExpression */ || n.kind === 166 /* Parameter */ + (n) => n.kind === 258 /* VariableDeclaration */ || n.kind === 224 /* BinaryExpression */ || n.kind === 167 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 301 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 302 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 301 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 302 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { @@ -67637,7 +67699,7 @@ } } } else { - Debug.assert(attributeDecl.kind === 290 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 291 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType( spread, @@ -67683,7 +67745,7 @@ ); } } - const parent = openingLikeElement.parent.kind === 281 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent = openingLikeElement.parent.kind === 282 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) { const childrenTypes = checkJsxChildren(parent, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { @@ -67742,7 +67804,7 @@ if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 291 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 292 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -68094,7 +68156,7 @@ } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 163 /* QualifiedName */ ? node.right : node.kind === 202 /* ImportType */ ? node : node.kind === 205 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 164 /* QualifiedName */ ? node.right : node.kind === 203 /* ImportType */ ? node : node.kind === 206 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -68229,7 +68291,7 @@ } function reportObjectPossiblyNullOrUndefinedError(node, facts) { const nodeText = isEntityNameExpression(node) ? entityNameToString(node) : void 0; - if (node.kind === 104 /* NullKeyword */) { + if (node.kind === 105 /* NullKeyword */) { error(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); return; } @@ -68297,8 +68359,8 @@ } return nonNullType; } - function checkPropertyAccessExpression(node, checkMode) { - return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode); + function checkPropertyAccessExpression(node, checkMode, writeOnly) { + return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); } function checkPropertyAccessChain(node, checkMode) { const leftType = checkExpression(node.expression); @@ -68310,7 +68372,7 @@ return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 214 /* ParenthesizedExpression */) { + while (node.parent.kind === 215 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; @@ -68333,7 +68395,7 @@ if (!isExpressionNode(privId)) { return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression); } - const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 101 /* InKeyword */; + const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 102 /* InKeyword */; if (!getSymbolForPrivateIdentifierExpression(privId) && !isInOperation) { return grammarErrorOnNode(privId, Diagnostics.Cannot_find_name_0, idText(privId)); } @@ -68429,7 +68491,7 @@ false ) === getDeclaringConstructor(prop); } - function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode) { + function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode, writeOnly) { const parentSymbol = getNodeLinks(left).resolvedSymbol; const assignmentKind = getAssignmentTargetKind(node); const apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); @@ -68479,10 +68541,10 @@ /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ - node.kind === 163 /* QualifiedName */ + node.kind === 164 /* QualifiedName */ ); } - if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 302 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 303 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -68528,13 +68590,12 @@ checkPropertyNotUsedBeforeDeclaration(prop, node, right); markPropertyAsReferenced(prop, node, isSelfTypeAccess(left, parentSymbol)); getNodeLinks(node).resolvedSymbol = prop; - const writing = isWriteAccess(node); - checkPropertyAccessibility(node, left.kind === 106 /* SuperKeyword */, writing, apparentType, prop); + checkPropertyAccessibility(node, left.kind === 107 /* SuperKeyword */, isWriteAccess(node), apparentType, prop); if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) { error(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); return errorType; } - propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writing ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); + propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writeOnly || isWriteOnlyAccess(node) ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); } return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode); } @@ -68543,7 +68604,7 @@ if (file) { if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) { const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode); - return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */); + return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */); } } return false; @@ -68561,12 +68622,12 @@ } propType = getNarrowableTypeForReference(propType, node, checkMode); let assumeUninitialized = false; - if (strictNullChecks && strictPropertyInitialization && isAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */) { + if (strictNullChecks && strictPropertyInitialization && isAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */) { const declaration = prop && prop.valueDeclaration; if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 173 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 174 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { assumeUninitialized = true; } } @@ -68590,7 +68651,7 @@ const declarationName = idText(right); if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlags(valueDeclaration) & 32 /* Static */) && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); - } else if (valueDeclaration.kind === 260 /* ClassDeclaration */ && node.parent.kind !== 180 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + } else if (valueDeclaration.kind === 261 /* ClassDeclaration */ && node.parent.kind !== 181 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { @@ -68603,25 +68664,25 @@ function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return true; - case 299 /* PropertyAssignment */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 301 /* SpreadAssignment */: - case 164 /* ComputedPropertyName */: - case 236 /* TemplateSpan */: - case 291 /* JsxExpression */: - case 288 /* JsxAttribute */: - case 289 /* JsxAttributes */: - case 290 /* JsxSpreadAttribute */: - case 283 /* JsxOpeningElement */: - case 230 /* ExpressionWithTypeArguments */: - case 294 /* HeritageClause */: + case 300 /* PropertyAssignment */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 302 /* SpreadAssignment */: + case 165 /* ComputedPropertyName */: + case 237 /* TemplateSpan */: + case 292 /* JsxExpression */: + case 289 /* JsxAttribute */: + case 290 /* JsxAttributes */: + case 291 /* JsxSpreadAttribute */: + case 284 /* JsxOpeningElement */: + case 231 /* ExpressionWithTypeArguments */: + case 295 /* HeritageClause */: return false; - case 216 /* ArrowFunction */: - case 241 /* ExpressionStatement */: + case 217 /* ArrowFunction */: + case 242 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -68654,7 +68715,7 @@ function reportNonexistentProperty(propNode, containingType, isUncheckedJS) { let errorInfo; let relatedInfo; - if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 134348796 /* Primitive */)) { + if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) { for (const subtype of containingType.types) { if (!getPropertyOfType(subtype, propNode.escapedText) && !getApplicableIndexInfoForName(subtype, propNode.escapedText)) { errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(subtype)); @@ -68862,13 +68923,13 @@ (getCheckFlags(prop) & 1 /* Instantiated */ ? getSymbolLinks(prop).target : prop).isReferenced = 67108863 /* All */; } function isSelfTypeAccess(name, parent) { - return name.kind === 108 /* ThisKeyword */ || !!parent && isEntityNameExpression(name) && parent === getResolvedSymbol(getFirstIdentifier(name)); + return name.kind === 109 /* ThisKeyword */ || !!parent && isEntityNameExpression(name) && parent === getResolvedSymbol(getFirstIdentifier(name)); } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: - return isValidPropertyAccessWithType(node, node.expression.kind === 106 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + return isValidPropertyAccessWithType(node, node.expression.kind === 107 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); + case 164 /* QualifiedName */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -68876,7 +68937,7 @@ propertyName, getWidenedType(checkExpression(node.left)) ); - case 202 /* ImportType */: + case 203 /* ImportType */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -68889,7 +68950,7 @@ function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 208 /* PropertyAccessExpression */ && node.expression.kind === 106 /* SuperKeyword */, + node.kind === 209 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, /* isWrite */ false, type, @@ -68922,7 +68983,7 @@ } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 258 /* VariableDeclarationList */) { + if (initializer.kind === 259 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfDeclaration(variable); @@ -68943,7 +69004,7 @@ let child = expr; let node = expr.parent; while (node) { - if (node.kind === 246 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 247 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -68984,11 +69045,11 @@ if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 167 /* Decorator */) { + } else if (node.kind !== 168 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -69033,7 +69094,7 @@ } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 227 /* SpreadElement */ || arg.kind === 234 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 228 /* SpreadElement */ || arg.kind === 235 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -69049,9 +69110,9 @@ let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 225 /* TemplateExpression */) { + if (node.template.kind === 226 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -69059,7 +69120,7 @@ Debug.assert(templateLiteral.kind === 14 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 167 /* Decorator */) { + } else if (node.kind === 168 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -69070,7 +69131,7 @@ effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 211 /* NewExpression */); + Debug.assert(node.kind === 212 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -69166,7 +69227,7 @@ if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 167 /* Decorator */) { + if (node.kind !== 168 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -69203,7 +69264,7 @@ } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 229 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 230 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -69231,11 +69292,11 @@ if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); + const spreadType = arg.kind === 235 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); if (isArrayLikeType(spreadType)) { return getMutableArrayOrTupleType(spreadType); } - return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg), inConstContext); + return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 228 /* SpreadElement */ ? arg.expression : arg), inConstContext); } } const types = []; @@ -69244,22 +69305,22 @@ for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 235 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 228 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { const contextualType = getIndexedAccessType(restType, getNumberLiteralType(i - index), 256 /* Contextual */); const argType = checkExpressionWithContextualType(arg, contextualType, context, checkMode); - const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 134348796 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); + const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 234 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 235 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -69436,7 +69497,7 @@ const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 229 /* OmittedExpression */) { + if (arg.kind !== 230 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType( arg, @@ -69494,7 +69555,7 @@ } } function getThisArgumentOfCall(node) { - const expression = node.kind === 210 /* CallExpression */ ? node.expression : node.kind === 212 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 211 /* CallExpression */ ? node.expression : node.kind === 213 /* TaggedTemplateExpression */ ? node.tag : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -69509,17 +69570,17 @@ return result; } function getEffectiveCallArguments(node) { - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 225 /* TemplateExpression */) { + if (template.kind === 226 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 167 /* Decorator */) { + if (node.kind === 168 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -69531,7 +69592,7 @@ const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 227 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 228 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getTypeArguments(spreadType), (t, i2) => { var _a2; @@ -69570,16 +69631,16 @@ } function getLegacyDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return 1; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 166 /* Parameter */: + case 167 /* Parameter */: return 3; default: return Debug.fail(); @@ -69786,14 +69847,14 @@ return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) { - const isTaggedTemplate = node.kind === 212 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 167 /* Decorator */; + const isTaggedTemplate = node.kind === 213 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 168 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; if (!isDecorator2 && !isSuperCall(node)) { typeArguments = node.typeArguments; - if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 106 /* SuperKeyword */) { + if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 107 /* SuperKeyword */) { forEach(typeArguments, checkSourceElement); } } @@ -69813,7 +69874,7 @@ let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 210 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 211 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -70164,7 +70225,7 @@ return maxParamsIndex; } function resolveCallExpression(node, candidatesOutArray, checkMode) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { const superType = checkSuperExpression(node.expression); if (isTypeAny(superType)) { for (const arg of node.arguments) { @@ -70341,7 +70402,7 @@ } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 173 /* Constructor */) { + if (!modifiers || declaration.kind !== 174 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -70488,16 +70549,16 @@ } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 166 /* Parameter */: + case 167 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; default: return Debug.fail(); @@ -70559,7 +70620,7 @@ returnNode, /*typeArguments*/ void 0 - ) : factory.createKeywordTypeNode(131 /* AnyKeyword */) + ) : factory.createKeywordTypeNode(132 /* AnyKeyword */) ); const parameterSymbol = createSymbol(1 /* FunctionScopedVariable */, "props"); parameterSymbol.links.type = result; @@ -70620,16 +70681,16 @@ } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 167 /* Decorator */: + case 168 /* Decorator */: return resolveDecorator(node, candidatesOutArray, checkMode); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } throw Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); @@ -70739,7 +70800,7 @@ return false; } let parent = node.parent; - while (parent && parent.kind === 208 /* PropertyAccessExpression */) { + while (parent && parent.kind === 209 /* PropertyAccessExpression */) { parent = parent.parent; } if (parent && isBinaryExpression(parent) && isPrototypeAccess(parent.left) && parent.operatorToken.kind === 63 /* EqualsToken */) { @@ -70760,12 +70821,12 @@ return silentNeverType; } checkDeprecatedSignature(signature, node); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return voidType; } - if (node.kind === 211 /* NewExpression */) { + if (node.kind === 212 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 173 /* Constructor */ && declaration.kind !== 177 /* ConstructSignature */ && declaration.kind !== 182 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a2 = getJSDocRoot(declaration)) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 173 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 174 /* Constructor */ && declaration.kind !== 178 /* ConstructSignature */ && declaration.kind !== 183 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a2 = getJSDocRoot(declaration)) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 174 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -70779,7 +70840,7 @@ if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 210 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 241 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 211 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 242 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { if (!isDottedName(node.expression)) { error(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); } else if (!getEffectsSignature(node)) { @@ -70811,20 +70872,20 @@ function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 210 /* CallExpression */: - case 167 /* Decorator */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 168 /* Decorator */: + case 212 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return node.argumentExpression; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.name; - case 180 /* TypeReference */: + case 181 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -70984,7 +71045,7 @@ if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 259 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 257 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 260 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 258 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); return !!decl && !!(decl.flags & 16777216 /* Ambient */); @@ -71002,7 +71063,7 @@ return getReturnTypeOfSignature(signature); } function checkAssertion(node) { - if (node.kind === 213 /* TypeAssertionExpression */) { + if (node.kind === 214 /* TypeAssertionExpression */) { const file = getSourceFileOfNode(node); if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) { grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); @@ -71016,20 +71077,20 @@ case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 225 /* TemplateExpression */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 226 /* TemplateExpression */: return true; - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const op = node.operator; const arg = node.operand; return op === 40 /* MinusToken */ && (arg.kind === 8 /* NumericLiteral */ || arg.kind === 9 /* BigIntLiteral */) || op === 39 /* PlusToken */ && arg.kind === 8 /* NumericLiteral */; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = skipParentheses(node.expression); const symbol = isEntityNameExpression(expr) ? resolveEntityName( expr, @@ -71078,7 +71139,7 @@ function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); forEach(node.typeArguments, checkSourceElement); - const exprType = node.kind === 230 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 231 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); return getInstantiationExpressionType(exprType, node); } function getInstantiationExpressionType(exprType, node) { @@ -71160,19 +71221,19 @@ } function checkMetaProperty(node) { checkGrammarMetaProperty(node); - if (node.keywordToken === 103 /* NewKeyword */) { + if (node.keywordToken === 104 /* NewKeyword */) { return checkNewTargetMetaProperty(node); } - if (node.keywordToken === 100 /* ImportKeyword */) { + if (node.keywordToken === 101 /* ImportKeyword */) { return checkImportMetaProperty(node); } return Debug.assertNever(node.keywordToken); } function checkMetaPropertyKeyword(node) { switch (node.keywordToken) { - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return getGlobalImportMetaExpressionType(); - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: const type = checkNewTargetMetaProperty(node); return isErrorType(type) ? errorType : createNewTargetExpressionType(type); default: @@ -71184,7 +71245,7 @@ if (!container) { error(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return errorType; - } else if (container.kind === 173 /* Constructor */) { + } else if (container.kind === 174 /* Constructor */) { const symbol = getSymbolOfDeclaration(container.parent); return getTypeOfSymbol(symbol); } else { @@ -71234,7 +71295,7 @@ } function getParameterIdentifierNameAtPosition(signature, pos) { var _a2; - if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 320 /* JSDocFunctionType */) { + if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 321 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -71266,7 +71327,7 @@ return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); } function isValidDeclarationForTupleLabel(d) { - return d.kind === 199 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 200 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -71602,17 +71663,17 @@ if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: { const node = parent; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const contextType = createClassDecoratorContextType(targetType); links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType); break; } - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { const node = parent; if (!isClassLike(node.parent)) break; @@ -71624,7 +71685,7 @@ links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); break; } - case 169 /* PropertyDeclaration */: { + case 170 /* PropertyDeclaration */: { const node = parent; if (!isClassLike(node.parent)) break; @@ -71646,8 +71707,8 @@ if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: { const node = parent; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const targetParam = createParameter("target", targetType); @@ -71661,7 +71722,7 @@ ); break; } - case 166 /* Parameter */: { + case 167 /* Parameter */: { const node = parent; if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { break; @@ -71687,10 +71748,10 @@ ); break; } - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: { + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: { const node = parent; if (!isClassLike(node.parent)) break; @@ -71785,7 +71846,7 @@ let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 238 /* Block */) { + if (func.body.kind !== 239 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType( @@ -71959,7 +72020,7 @@ return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 218 /* TypeOfExpression */) { + if (node.expression.kind === 219 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -72020,11 +72081,11 @@ } function mayReturnNever(func) { switch (func.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; - case 171 /* MethodDeclaration */: - return func.parent.kind === 207 /* ObjectLiteralExpression */; + case 172 /* MethodDeclaration */: + return func.parent.kind === 208 /* ObjectLiteralExpression */; default: return false; } @@ -72038,7 +72099,7 @@ if (type && maybeTypeOfKind(type, 1 /* Any */ | 16384 /* Void */)) { return; } - if (func.kind === 170 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 238 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 171 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 239 /* Block */ || !functionHasImplicitReturn(func)) { return; } const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; @@ -72064,7 +72125,7 @@ } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -72097,7 +72158,7 @@ return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 215 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 216 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -72141,7 +72202,7 @@ } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -72149,7 +72210,7 @@ if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 238 /* Block */) { + if (node.body.kind === 239 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -72219,9 +72280,9 @@ return false; } if (isReadonlySymbol(symbol)) { - if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 108 /* ThisKeyword */) { + if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 109 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 173 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 174 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -72242,7 +72303,7 @@ const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 271 /* NamespaceImport */; + return !!declaration && declaration.kind === 272 /* NamespaceImport */; } } } @@ -72347,7 +72408,7 @@ if (!hasParseDiagnostics(sourceFile)) { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); - if (container && container.kind !== 173 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + if (container && container.kind !== 174 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } @@ -72505,7 +72566,7 @@ if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } - if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 134348796 /* Primitive */)) { + if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { error(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { @@ -72556,7 +72617,7 @@ function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 299 /* PropertyAssignment */ || property.kind === 300 /* ShorthandPropertyAssignment */) { + if (property.kind === 300 /* PropertyAssignment */ || property.kind === 301 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -72577,8 +72638,8 @@ } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 300 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 301 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 301 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 302 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { @@ -72610,7 +72671,7 @@ let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 227 /* SpreadElement */) { + if (node.elements[i].kind === 228 /* SpreadElement */) { type = inBoundsType = inBoundsType != null ? inBoundsType : checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType; } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -72620,8 +72681,8 @@ function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 229 /* OmittedExpression */) { - if (element.kind !== 227 /* SpreadElement */) { + if (element.kind !== 230 /* OmittedExpression */) { + if (element.kind !== 228 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -72636,7 +72697,7 @@ error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 223 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { + if (restExpression.kind === 224 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { error(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); } else { checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); @@ -72649,7 +72710,7 @@ } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 300 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 301 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -72661,25 +72722,25 @@ } else { target = exprOrAssignment; } - if (target.kind === 223 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { + if (target.kind === 224 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 207 /* ObjectLiteralExpression */) { + if (target.kind === 208 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 206 /* ArrayLiteralExpression */) { + if (target.kind === 207 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { const targetType = checkExpression(target, checkMode); - const error2 = target.parent.kind === 301 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; - const optionalError = target.parent.kind === 301 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + const error2 = target.parent.kind === 302 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; + const optionalError = target.parent.kind === 302 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; if (checkReferenceExpression(target, error2, optionalError)) { checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target); } @@ -72694,34 +72755,34 @@ case 79 /* Identifier */: case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: - case 212 /* TaggedTemplateExpression */: - case 225 /* TemplateExpression */: + case 213 /* TaggedTemplateExpression */: + case 226 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: - case 155 /* UndefinedKeyword */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 218 /* TypeOfExpression */: - case 232 /* NonNullExpression */: - case 282 /* JsxSelfClosingElement */: - case 281 /* JsxElement */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 156 /* UndefinedKeyword */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 219 /* TypeOfExpression */: + case 233 /* NonNullExpression */: + case 283 /* JsxSelfClosingElement */: + case 282 /* JsxElement */: return true; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: switch (node.operator) { case 53 /* ExclamationToken */: case 39 /* PlusToken */: @@ -72730,9 +72791,9 @@ return true; } return false; - case 219 /* VoidExpression */: - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 220 /* VoidExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: default: return false; } @@ -72776,9 +72837,9 @@ } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (node.left.kind === 207 /* ObjectLiteralExpression */ || node.left.kind === 206 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (node.left.kind === 208 /* ObjectLiteralExpression */ || node.left.kind === 207 /* ArrayLiteralExpression */)) { state.skip = true; - setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 108 /* ThisKeyword */)); + setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 109 /* ThisKeyword */)); return state; } return state; @@ -72801,7 +72862,7 @@ const operator = operatorToken.kind; if (isLogicalOrCoalescingBinaryOperator(operator)) { let parent = node.parent; - while (parent.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent)) { + while (parent.kind === 215 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent)) { parent = parent.parent; } if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent)) { @@ -72877,8 +72938,8 @@ } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (left.kind === 207 /* ObjectLiteralExpression */ || left.kind === 206 /* ArrayLiteralExpression */)) { - return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */); + if (operator === 63 /* EqualsToken */ && (left.kind === 208 /* ObjectLiteralExpression */ || left.kind === 207 /* ArrayLiteralExpression */)) { + return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 109 /* ThisKeyword */); } let leftType; if (isLogicalOrCoalescingBinaryOperator(operator)) { @@ -73053,9 +73114,9 @@ checkNaNEquality(errorNode, operator, left, right); reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); return booleanType; - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return checkInExpression(left, right, leftType, rightType); case 55 /* AmpersandAmpersandToken */: case 76 /* AmpersandAmpersandEqualsToken */: { @@ -73137,7 +73198,7 @@ } } function isIndirectCall(node) { - return node.parent.kind === 214 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 212 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + return node.parent.kind === 215 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 213 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval"); } function checkForDisallowedESSymbolOperand(operator2) { @@ -73168,6 +73229,16 @@ addLazyDiagnostic(checkAssignmentOperatorWorker); } function checkAssignmentOperatorWorker() { + let assigneeType = leftType; + if (isCompoundAssignment(operatorToken.kind) && left.kind === 209 /* PropertyAccessExpression */) { + assigneeType = checkPropertyAccessExpression( + left, + /*checkMode*/ + void 0, + /*writeOnly*/ + true + ); + } if (checkReferenceExpression( left, Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, @@ -73180,7 +73251,7 @@ headMessage = Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target; } } - checkTypeAssignableToAndOptionallyElaborate(valueType, leftType, left, right, headMessage); + checkTypeAssignableToAndOptionallyElaborate(valueType, assigneeType, left, right, headMessage); } } } @@ -73257,7 +73328,7 @@ const err = error( errorNode2, Diagnostics.This_condition_will_always_return_0, - tokenToString(operator2 === 36 /* EqualsEqualsEqualsToken */ || operator2 === 34 /* EqualsEqualsToken */ ? 95 /* FalseKeyword */ : 110 /* TrueKeyword */) + tokenToString(operator2 === 36 /* EqualsEqualsEqualsToken */ || operator2 === 34 /* EqualsEqualsToken */ ? 96 /* FalseKeyword */ : 111 /* TrueKeyword */) ); if (isLeftNaN && isRightNaN) return; @@ -73432,7 +73503,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 213 /* TypeAssertionExpression */ || node.kind === 231 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 214 /* TypeAssertionExpression */ || node.kind === 232 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); @@ -73449,7 +73520,7 @@ void 0, checkMode || 0 /* Normal */ ) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 204 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 205 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; } function padTupleType(type, pattern) { const patternElements = pattern.elements; @@ -73457,7 +73528,7 @@ const elementFlags = type.target.elementFlags.slice(); for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) { const e = patternElements[i]; - if (i < patternElements.length - 1 || !(e.kind === 205 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 206 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement( e, /*includePatternInType*/ @@ -73522,14 +73593,14 @@ )); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -73717,7 +73788,7 @@ const type = getQuickTypeOfExpression(expr.expression); return type ? getAwaitedType(type) : void 0; } - if (isCallExpression(expr) && expr.expression.kind !== 106 /* SuperKeyword */ && !isRequireCall( + if (isCallExpression(expr) && expr.expression.kind !== 107 /* SuperKeyword */ && !isRequireCall( expr, /*checkArgumentIsStringLiteralLike*/ true @@ -73761,7 +73832,7 @@ return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 209 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 163 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 183 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 278 /* ExportSpecifier */; + const ok = node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 210 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 164 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 184 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 279 /* ExportSpecifier */; if (!ok) { error(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -73789,9 +73860,9 @@ const kind = node.kind; if (cancellationToken) { switch (kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -73800,15 +73871,15 @@ return checkIdentifier(node, checkMode); case 80 /* PrivateIdentifier */: return checkPrivateIdentifierExpression(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return checkThisExpression(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return nullWideningType; case 14 /* NoSubstitutionTemplateLiteral */: case 10 /* StringLiteral */: - return getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? anyType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 8 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -73818,85 +73889,85 @@ negative: false, base10Value: parsePseudoBigInt(node.text) })); - case 110 /* TrueKeyword */: + case 111 /* TrueKeyword */: return trueType; - case 95 /* FalseKeyword */: + case 96 /* FalseKeyword */: return falseType; - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return checkTemplateExpression(node); case 13 /* RegularExpressionLiteral */: return globalRegExpType; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 210 /* CallExpression */: - if (node.expression.kind === 100 /* ImportKeyword */) { + case 211 /* CallExpression */: + if (node.expression.kind === 101 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 211 /* NewExpression */: + case 212 /* NewExpression */: return checkCallExpression(node, checkMode); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return checkClassExpression(node); - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return checkAssertion(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return checkNonNullAssertion(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return checkMetaProperty(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return checkDeleteExpression(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return checkVoidExpression(node); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return checkAwaitExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 229 /* OmittedExpression */: + case 230 /* OmittedExpression */: return undefinedWideningType; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return checkYieldExpression(node); - case 234 /* SyntheticExpression */: + case 235 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return checkJsxElement(node, checkMode); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return checkJsxFragment(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -73948,10 +74019,10 @@ checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 173 /* Constructor */ && nodeIsPresent(func.body))) { + if (!(func.kind === 174 /* Constructor */ && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 173 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 174 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } @@ -73962,13 +74033,13 @@ if (func.parameters.indexOf(node) !== 0) { error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 173 /* Constructor */ || func.kind === 177 /* ConstructSignature */ || func.kind === 182 /* ConstructorType */) { + if (func.kind === 174 /* Constructor */ || func.kind === 178 /* ConstructSignature */ || func.kind === 183 /* ConstructorType */) { error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 216 /* ArrowFunction */) { + if (func.kind === 217 /* ArrowFunction */) { error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 174 /* GetAccessor */ || func.kind === 175 /* SetAccessor */) { + if (func.kind === 175 /* GetAccessor */ || func.kind === 176 /* SetAccessor */) { error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } @@ -74028,13 +74099,13 @@ } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 216 /* ArrowFunction */: - case 176 /* CallSignature */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 217 /* ArrowFunction */: + case 177 /* CallSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: const parent = node.parent; if (node === parent.type) { return parent; @@ -74054,7 +74125,7 @@ predicateVariableName ); return true; - } else if (name.kind === 204 /* ArrayBindingPattern */ || name.kind === 203 /* ObjectBindingPattern */) { + } else if (name.kind === 205 /* ArrayBindingPattern */ || name.kind === 204 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -74066,9 +74137,9 @@ } } function checkSignatureDeclaration(node) { - if (node.kind === 178 /* IndexSignature */) { + if (node.kind === 179 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 181 /* FunctionType */ || node.kind === 259 /* FunctionDeclaration */ || node.kind === 182 /* ConstructorType */ || node.kind === 176 /* CallSignature */ || node.kind === 173 /* Constructor */ || node.kind === 177 /* ConstructSignature */) { + } else if (node.kind === 182 /* FunctionType */ || node.kind === 260 /* FunctionDeclaration */ || node.kind === 183 /* ConstructorType */ || node.kind === 177 /* CallSignature */ || node.kind === 174 /* Constructor */ || node.kind === 178 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -74095,10 +74166,10 @@ const returnTypeNode = getEffectiveReturnTypeNode(node); if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -74120,7 +74191,7 @@ checkAsyncFunctionReturnType(node, returnTypeNode); } } - if (node.kind !== 178 /* IndexSignature */ && node.kind !== 320 /* JSDocFunctionType */) { + if (node.kind !== 179 /* IndexSignature */ && node.kind !== 321 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -74130,7 +74201,7 @@ const staticNames = /* @__PURE__ */ new Map(); const privateIdentifiers = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 173 /* Constructor */) { + if (member.kind === 174 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -74148,16 +74219,16 @@ const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -74210,7 +74281,7 @@ function checkObjectTypeForDuplicateDeclarations(node) { const names = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 168 /* PropertySignature */) { + if (member.kind === 169 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -74234,7 +74305,7 @@ } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 261 /* InterfaceDeclaration */) { + if (node.kind === 262 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfDeclaration(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -74269,7 +74340,7 @@ checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 169 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 170 /* PropertyDeclaration */ && node.initializer) { error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } @@ -74286,7 +74357,7 @@ error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* MethodDeclaration */ && node.body) { error(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { @@ -74331,7 +74402,7 @@ if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 169 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 170 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -74374,7 +74445,7 @@ return isExpressionStatement(superCallParent) && superCallParent.parent === body; } function nodeImmediatelyReferencesSuperOrThis(node) { - if (node.kind === 106 /* SuperKeyword */ || node.kind === 108 /* ThisKeyword */) { + if (node.kind === 107 /* SuperKeyword */ || node.kind === 109 /* ThisKeyword */) { return true; } if (isThisContainerOrFunctionBlock(node)) { @@ -74383,7 +74454,7 @@ return !!forEachChild(node, nodeImmediatelyReferencesSuperOrThis); } function checkAccessorDeclaration(node) { - if (isIdentifier(node.name) && idText(node.name) === "constructor") { + if (isIdentifier(node.name) && idText(node.name) === "constructor" && isClassLike(node.parent)) { error(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); } addLazyDiagnostic(checkAccessorDeclarationDiagnostics); @@ -74394,20 +74465,20 @@ checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { if (!(node.flags & 16777216 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 256 /* HasImplicitReturn */) { if (!(node.flags & 512 /* HasExplicitReturn */)) { error(node.name, Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfDeclaration(node); - const getter = getDeclarationOfKind(symbol, 174 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 175 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 175 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 176 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); @@ -74428,7 +74499,7 @@ } } const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node)); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -74489,7 +74560,7 @@ } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 180 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { + if (node.kind === 181 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { const sourceFile = getSourceFileOfNode(node); if (scanTokenAtPosition(sourceFile, node.typeName.end) === 24 /* DotToken */) { grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); @@ -74553,7 +74624,7 @@ let seenRestElement = false; const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 199 /* NamedTupleMember */ && hasNamedElement) { + if (e.kind !== 200 /* NamedTupleMember */ && hasNamedElement) { grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); break; } @@ -74602,7 +74673,7 @@ /*stringsOnly*/ false ))) { - if (accessNode.kind === 209 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + if (accessNode.kind === 210 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } return type; @@ -74663,7 +74734,7 @@ forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 191 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 192 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -74673,7 +74744,7 @@ if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 165 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 166 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { @@ -74711,10 +74782,10 @@ if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 187 /* OptionalType */) { + if (node.type.kind === 188 /* OptionalType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type); } - if (node.type.kind === 188 /* RestType */) { + if (node.type.kind === 189 /* RestType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type); } checkSourceElement(node.type); @@ -74725,7 +74796,7 @@ } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 261 /* InterfaceDeclaration */ && n.parent.kind !== 260 /* ClassDeclaration */ && n.parent.kind !== 228 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { + if (n.parent.kind !== 262 /* InterfaceDeclaration */ && n.parent.kind !== 261 /* ClassDeclaration */ && n.parent.kind !== 229 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } @@ -74802,7 +74873,7 @@ // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) || // Both are literal property names that are the same. isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); if (reportError) { const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; error(errorNode2, diagnostic); @@ -74834,14 +74905,14 @@ for (const current of declarations) { const node = current; const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 261 /* InterfaceDeclaration */ || node.parent.kind === 184 /* TypeLiteral */) || inAmbientContext; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 262 /* InterfaceDeclaration */ || node.parent.kind === 185 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 259 /* FunctionDeclaration */ || node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */ || node.kind === 173 /* Constructor */) { + if (node.kind === 260 /* FunctionDeclaration */ || node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */ || node.kind === 174 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -74894,9 +74965,9 @@ }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 260 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 261 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 260 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 259 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 261 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 260 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; if (diagnostic) { addRelatedInfo( error(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), @@ -74976,45 +75047,45 @@ function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return 2 /* ExportType */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 274 /* ExportAssignment */: - case 223 /* BinaryExpression */: + case 275 /* ExportAssignment */: + case 224 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 268 /* ImportEqualsDeclaration */: - case 271 /* NamespaceImport */: - case 270 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 272 /* NamespaceImport */: + case 271 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfDeclaration(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: - case 259 /* FunctionDeclaration */: - case 273 /* ImportSpecifier */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 260 /* FunctionDeclaration */: + case 274 /* ImportSpecifier */: case 79 /* Identifier */: return 1 /* ExportValue */; - case 170 /* MethodSignature */: - case 168 /* PropertySignature */: + case 171 /* MethodSignature */: + case 169 /* PropertySignature */: return 2 /* ExportType */; default: return Debug.failBadSyntaxKind(d); @@ -75039,7 +75110,7 @@ ))) { return typeAsPromise.promisedTypeOfPromise = getTypeArguments(type)[0]; } - if (allTypesAssignableToKind(getBaseConstraintOrType(type), 134348796 /* Primitive */ | 131072 /* Never */)) { + if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) { return void 0; } const thenFunction = getTypeOfPropertyOfType(type, "then"); @@ -75091,7 +75162,7 @@ return awaitedType || errorType; } function isThenableType(type) { - if (allTypesAssignableToKind(getBaseConstraintOrType(type), 134348796 /* Primitive */ | 131072 /* Never */)) { + if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) { return false; } const thenFunction = getTypeOfPropertyOfType(type, "then"); @@ -75301,21 +75372,21 @@ let headMessage; const expectedReturnType = decoratorSignature.resolvedReturnType; switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!legacyDecorators) { headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; } - case 166 /* Parameter */: + case 167 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; default: @@ -75328,7 +75399,7 @@ /*typeParameters*/ void 0, emptyArray, - factory.createKeywordTypeNode(131 /* AnyKeyword */) + factory.createKeywordTypeNode(132 /* AnyKeyword */) ); return createSignature(decl, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, flags); } @@ -75405,15 +75476,15 @@ function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 190 /* IntersectionType */: - case 189 /* UnionType */: + case 191 /* IntersectionType */: + case 190 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; } } @@ -75421,13 +75492,13 @@ function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 193 /* ParenthesizedType */ || typeNode.kind === 199 /* NamedTupleMember */) { + while (typeNode.kind === 194 /* ParenthesizedType */ || typeNode.kind === 200 /* NamedTupleMember */) { typeNode = typeNode.type; } - if (typeNode.kind === 144 /* NeverKeyword */) { + if (typeNode.kind === 145 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 198 /* LiteralType */ && typeNode.literal.kind === 104 /* NullKeyword */ || typeNode.kind === 155 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 199 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 156 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -75458,7 +75529,7 @@ } if (legacyDecorators) { checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 166 /* Parameter */) { + if (node.kind === 167 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } } else if (languageVersion < 99 /* ESNext */) { @@ -75484,7 +75555,7 @@ if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -75492,22 +75563,22 @@ } } break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - const otherKind = node.kind === 174 /* GetAccessor */ ? 175 /* SetAccessor */ : 174 /* GetAccessor */; + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + const otherKind = node.kind === 175 /* GetAccessor */ ? 176 /* SetAccessor */ : 175 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 166 /* Parameter */: + case 167 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { @@ -75622,7 +75693,7 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -75633,7 +75704,7 @@ checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -75650,7 +75721,7 @@ checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 170 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 171 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); @@ -75686,42 +75757,42 @@ function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 308 /* SourceFile */: - case 264 /* ModuleDeclaration */: - case 238 /* Block */: - case 266 /* CaseBlock */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 309 /* SourceFile */: + case 265 /* ModuleDeclaration */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 173 /* Constructor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 192 /* InferType */: + case 193 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -75740,11 +75811,11 @@ function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 171 /* MethodDeclaration */: - case 169 /* PropertyDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - if (member.kind === 175 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 172 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + if (member.kind === 176 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfDeclaration(member); @@ -75752,16 +75823,16 @@ addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 173 /* Constructor */: + case 174 /* Constructor */: for (const parameter of member.parameters) { if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } break; - case 178 /* IndexSignature */: - case 237 /* SemicolonClassElement */: - case 172 /* ClassStaticBlockDeclaration */: + case 179 /* IndexSignature */: + case 238 /* SemicolonClassElement */: + case 173 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -75785,7 +75856,7 @@ continue; const name = idText(typeParameter.name); const { parent } = typeParameter; - if (parent.kind !== 192 /* InferType */ && parent.typeParameters.every(isTypeParameterUnused)) { + if (parent.kind !== 193 /* InferType */ && parent.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent)) { const sourceFile = getSourceFileOfNode(parent); const range = isJSDocTemplateTag(parent) ? rangeOfNode(parent) : rangeOfTypeParameters(sourceFile, parent.typeParameters); @@ -75865,7 +75936,7 @@ }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 271 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 272 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); } else { @@ -75876,7 +75947,7 @@ unusedDestructures.forEach(([bindingPattern, bindingElements]) => { const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */; if (bindingPattern.elements.length === bindingElements.length) { - if (bindingElements.length === 1 && bindingPattern.parent.kind === 257 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 258 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 258 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 259 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); @@ -75889,7 +75960,7 @@ }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 240 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 241 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -75918,21 +75989,21 @@ switch (name.kind) { case 79 /* Identifier */: return idText(name); - case 204 /* ArrayBindingPattern */: - case 203 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 270 /* ImportClause */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 271 /* NamespaceImport */; + return node.kind === 271 /* ImportClause */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 272 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 270 /* ImportClause */ ? decl : decl.kind === 271 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 271 /* ImportClause */ ? decl : decl.kind === 272 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 238 /* Block */) { + if (node.kind === 239 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -75960,7 +76031,7 @@ if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 168 /* PropertySignature */ || node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */ || node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */ || node.kind === 299 /* PropertyAssignment */) { + if (node.kind === 170 /* PropertyDeclaration */ || node.kind === 169 /* PropertySignature */ || node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */ || node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */ || node.kind === 300 /* PropertyAssignment */) { return false; } if (node.flags & 16777216 /* Ambient */) { @@ -76016,7 +76087,7 @@ return; } const parent = getDeclarationContainer(node); - if (parent.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(parent)) { + if (parent.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(parent)) { errorSkippedOn( "noEmit", name, @@ -76034,7 +76105,7 @@ return; } const parent = getDeclarationContainer(node); - if (parent.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(parent) && parent.flags & 2048 /* HasAsyncFunctions */) { + if (parent.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(parent) && parent.flags & 2048 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -76111,7 +76182,7 @@ if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } - if (node.kind === 257 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 258 /* VariableDeclaration */ && !node.initializer) { return; } const symbol = getSymbolOfDeclaration(node); @@ -76131,9 +76202,9 @@ ); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 258 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 240 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 238 /* Block */ && isFunctionLike(container.parent) || container.kind === 265 /* ModuleBlock */ || container.kind === 264 /* ModuleDeclaration */ || container.kind === 308 /* SourceFile */); + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 259 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 241 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 239 /* Block */ && isFunctionLike(container.parent) || container.kind === 266 /* ModuleBlock */ || container.kind === 265 /* ModuleDeclaration */ || container.kind === 309 /* SourceFile */); if (!namesShareScope) { const name = symbolToString(localDeclarationSymbol); error(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); @@ -76154,7 +76225,7 @@ if (!node.name) { return; } - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -76168,7 +76239,7 @@ if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 164 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent = node.parent.parent; @@ -76190,7 +76261,7 @@ ); checkPropertyAccessibility( node, - !!parent.initializer && parent.initializer.kind === 106 /* SuperKeyword */, + !!parent.initializer && parent.initializer.kind === 107 /* SuperKeyword */, /*writing*/ false, parentType, @@ -76201,7 +76272,7 @@ } } if (isBindingPattern(node.name)) { - if (node.name.kind === 204 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 205 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); @@ -76214,7 +76285,7 @@ if (isInAmbientOrTypeNode(node)) { return; } - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 246 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 247 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -76246,7 +76317,7 @@ const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); if (initializer) { const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a2 = symbol.exports) == null ? void 0 : _a2.size); - if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 246 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 247 /* ForInStatement */) { checkTypeAssignableToAndOptionallyElaborate( checkExpressionCached(initializer), type, @@ -76281,9 +76352,9 @@ error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 168 /* PropertySignature */) { + if (node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 169 /* PropertySignature */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -76291,7 +76362,7 @@ } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 169 /* PropertyDeclaration */ || nextDeclaration.kind === 168 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; + const message = nextDeclaration.kind === 170 /* PropertyDeclaration */ || nextDeclaration.kind === 169 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; const declName = declarationNameToString(nextDeclarationName); const err = error( nextDeclarationName, @@ -76308,7 +76379,7 @@ } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 166 /* Parameter */ && right.kind === 257 /* VariableDeclaration */ || left.kind === 257 /* VariableDeclaration */ && right.kind === 166 /* Parameter */) { + if (left.kind === 167 /* Parameter */ && right.kind === 258 /* VariableDeclaration */ || left.kind === 258 /* VariableDeclaration */ && right.kind === 167 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -76342,7 +76413,7 @@ const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 239 /* EmptyStatement */) { + if (node.thenStatement.kind === 240 /* EmptyStatement */) { error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -76409,7 +76480,7 @@ let testedExpression = testedNode.parent; let childExpression = childNode.parent; while (testedExpression && childExpression) { - if (isIdentifier(testedExpression) && isIdentifier(childExpression) || testedExpression.kind === 108 /* ThisKeyword */ && childExpression.kind === 108 /* ThisKeyword */) { + if (isIdentifier(testedExpression) && isIdentifier(childExpression) || testedExpression.kind === 109 /* ThisKeyword */ && childExpression.kind === 109 /* ThisKeyword */) { return getSymbolAtLocation(testedExpression) === getSymbolAtLocation(childExpression); } else if (isPropertyAccessExpression(testedExpression) && isPropertyAccessExpression(childExpression)) { if (getSymbolAtLocation(testedExpression.name) !== getSymbolAtLocation(childExpression.name)) { @@ -76468,12 +76539,12 @@ } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 259 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { forEach(node.initializer.declarations, checkVariableDeclaration); } else { checkExpression(node.initializer); @@ -76503,12 +76574,12 @@ } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 206 /* ArrayLiteralExpression */ || varExpr.kind === 207 /* ObjectLiteralExpression */) { + if (varExpr.kind === 207 /* ArrayLiteralExpression */ || varExpr.kind === 208 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -76530,7 +76601,7 @@ function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { const variable = node.initializer.declarations[0]; if (variable && isBindingPattern(variable.name)) { error(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -76539,7 +76610,7 @@ } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 206 /* ArrayLiteralExpression */ || varExpr.kind === 207 /* ObjectLiteralExpression */) { + if (varExpr.kind === 207 /* ArrayLiteralExpression */ || varExpr.kind === 208 /* ObjectLiteralExpression */) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); @@ -77224,11 +77295,11 @@ const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 175 /* SetAccessor */) { + if (container.kind === 176 /* SetAccessor */) { if (node.expression) { error(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 173 /* Constructor */) { + } else if (container.kind === 174 /* Constructor */) { if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) { error(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -77245,7 +77316,7 @@ checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 173 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { + } else if (container.kind !== 174 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { error(node, Diagnostics.Not_all_code_paths_return_a_value); } } @@ -77269,7 +77340,7 @@ let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 293 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 294 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -77277,7 +77348,7 @@ hasDuplicateDefaultClause = true; } } - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); @@ -77309,7 +77380,7 @@ if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 253 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 254 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -77399,8 +77470,8 @@ return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 261 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 223 /* BinaryExpression */ || name && name.kind === 164 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 262 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 224 /* BinaryExpression */ || name && name.kind === 165 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -77424,7 +77495,7 @@ function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 261 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 262 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -77530,7 +77601,7 @@ function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 180 /* TypeReference */) { + if (node.kind === 181 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { @@ -77988,7 +78059,7 @@ return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 260 /* ClassDeclaration */ || d.kind === 261 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 261 /* ClassDeclaration */ || d.kind === 262 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a2, _b, _c, _d; @@ -78018,7 +78089,7 @@ continue basePropertyCheck; } } - if (derivedClassDecl.kind === 228 /* ClassExpression */) { + if (derivedClassDecl.kind === 229 /* ClassExpression */) { error( derivedClassDecl, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, @@ -78053,7 +78124,7 @@ const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { - const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 169 /* PropertyDeclaration */ && !d.initializer); + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer); if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; @@ -78163,7 +78234,7 @@ } } function isPropertyWithoutInitializer(node) { - return node.kind === 169 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 170 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -78197,7 +78268,7 @@ checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfDeclaration(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 261 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 262 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -78227,7 +78298,7 @@ checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); - if (node.type.kind === 139 /* IntrinsicKeyword */) { + if (node.type.kind === 140 /* IntrinsicKeyword */) { if (!intrinsicTypeKinds.has(node.name.escapedText) || length(node.typeParameters) !== 1) { error(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); } @@ -78288,7 +78359,7 @@ } function evaluate(expr, location) { switch (expr.kind) { - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const value = evaluate(expr.operand, location); if (typeof value === "number") { switch (expr.operator) { @@ -78301,7 +78372,7 @@ } } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const left = evaluate(expr.left, location); const right = evaluate(expr.right, location); if (typeof left === "number" && typeof right === "number") { @@ -78338,18 +78409,18 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return expr.text; - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return evaluateTemplateExpression(expr, location); case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return evaluate(expr.expression, location); case 79 /* Identifier */: if (isInfinityOrNaNString(expr.escapedText)) { return +expr.escapedText; } - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: if (isEntityNameExpression(expr)) { const symbol = resolveEntityName( expr, @@ -78370,7 +78441,7 @@ } } break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const root = expr.expression; if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { const rootSymbol = resolveEntityName( @@ -78437,7 +78508,7 @@ } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 263 /* EnumDeclaration */) { + if (declaration.kind !== 264 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -78467,7 +78538,7 @@ const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 260 /* ClassDeclaration */ || declaration.kind === 259 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 261 /* ClassDeclaration */ || declaration.kind === 260 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { return declaration; } } @@ -78528,13 +78599,13 @@ error(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - const mergedClass = getDeclarationOfKind(symbol, 260 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 261 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; } } - if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 308 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { - const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 93 /* ExportKeyword */); + if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 309 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { + const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 94 /* ExportKeyword */); if (exportModifier) { error(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } @@ -78566,21 +78637,21 @@ } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 205 /* BindingElement */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 258 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -78588,12 +78659,12 @@ } break; } - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 259 /* FunctionDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 260 /* FunctionDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -78604,12 +78675,12 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -78628,9 +78699,9 @@ error(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 265 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 308 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 275 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + const inAmbientExternalModule = node.parent.kind === 266 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 309 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 276 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -78659,8 +78730,8 @@ symbol = getMergedSymbol(symbol.exportSymbol || symbol); if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) { const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node; - Debug.assert(node.kind !== 277 /* NamespaceExport */); - if (node.kind === 278 /* ExportSpecifier */) { + Debug.assert(node.kind !== 278 /* NamespaceExport */); + if (node.kind === 279 /* ExportSpecifier */) { const diag2 = error(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); const alreadyExportedSymbol = (_b = (_a2 = getSourceFileOfNode(node).symbol) == null ? void 0 : _a2.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText); if (alreadyExportedSymbol === target) { @@ -78674,7 +78745,7 @@ } } } else { - Debug.assert(node.kind !== 257 /* VariableDeclaration */); + Debug.assert(node.kind !== 258 /* VariableDeclaration */); const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)); const moduleSpecifier = (_e = importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) != null ? _e : "..."; const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName); @@ -78690,7 +78761,7 @@ const targetFlags = getAllSymbolFlags(target); const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (targetFlags & excludedMeanings) { - const message = node.kind === 278 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + const message = node.kind === 279 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); } if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { @@ -78698,25 +78769,25 @@ const isType = !(targetFlags & 111551 /* Value */); if (isType || typeOnlyAlias) { switch (node.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 268 /* ImportEqualsDeclaration */: { + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 269 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports || compilerOptions.verbatimModuleSyntax) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? compilerOptions.verbatimModuleSyntax ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled : compilerOptions.verbatimModuleSyntax ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled; - const name = idText(node.kind === 273 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 274 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( error(node, message, name), isType ? void 0 : typeOnlyAlias, name ); } - if (isType && node.kind === 268 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType && node.kind === 269 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; } - case 278 /* ExportSpecifier */: { + case 279 /* ExportSpecifier */: { if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const name = idText(node.propertyName || node.name); const diagnostic = isType ? error(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); @@ -78726,7 +78797,7 @@ } } } - if (compilerOptions.verbatimModuleSyntax && node.kind !== 268 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && node.kind !== 269 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } @@ -78771,7 +78842,7 @@ function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 273 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 274 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -78818,7 +78889,7 @@ checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 272 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -78844,7 +78915,7 @@ if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 280 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 281 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfDeclaration(node)); if (target !== unknownSymbol) { const targetFlags = getAllSymbolFlags(target); @@ -78882,9 +78953,9 @@ if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 265 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 265 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 308 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + const inAmbientExternalModule = node.parent.kind === 266 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 266 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; + if (node.parent.kind !== 309 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { @@ -78909,13 +78980,13 @@ } function checkGrammarExportDeclaration(node) { var _a2; - if (node.isTypeOnly && ((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 276 /* NamedExports */) { + if (node.isTypeOnly && ((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 277 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 308 /* SourceFile */ || node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 264 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 309 /* SourceFile */ || node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 265 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -78999,8 +79070,8 @@ if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 308 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 264 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 309 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 265 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { @@ -79141,182 +79212,182 @@ const kind = node.kind; if (cancellationToken) { switch (kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 240 /* FirstStatement */ && kind <= 256 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 241 /* FirstStatement */ && kind <= 257 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return checkTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return checkParameter(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return checkPropertySignature(node); - case 182 /* ConstructorType */: - case 181 /* FunctionType */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 183 /* ConstructorType */: + case 182 /* FunctionType */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return checkSignatureDeclaration(node); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return checkMethodDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return checkConstructorDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return checkAccessorDeclaration(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return checkTypeReferenceNode(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return checkTypePredicate(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return checkTypeQuery(node); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return checkTypeLiteral(node); - case 185 /* ArrayType */: + case 186 /* ArrayType */: return checkArrayType(node); - case 186 /* TupleType */: + case 187 /* TupleType */: return checkTupleType(node); - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 193 /* ParenthesizedType */: - case 187 /* OptionalType */: - case 188 /* RestType */: + case 194 /* ParenthesizedType */: + case 188 /* OptionalType */: + case 189 /* RestType */: return checkSourceElement(node.type); - case 194 /* ThisType */: + case 195 /* ThisType */: return checkThisType(node); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return checkTypeOperator(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return checkConditionalType(node); - case 192 /* InferType */: + case 193 /* InferType */: return checkInferType(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return checkImportType(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 327 /* JSDocLink */: - case 328 /* JSDocLinkCode */: - case 329 /* JSDocLinkPlain */: + case 328 /* JSDocLink */: + case 329 /* JSDocLinkCode */: + case 330 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 318 /* JSDocNonNullableType */: - case 317 /* JSDocNullableType */: - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: - case 325 /* JSDocTypeLiteral */: + case 319 /* JSDocNonNullableType */: + case 318 /* JSDocNullableType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: + case 326 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 312 /* JSDocTypeExpression */: + case 313 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 336 /* JSDocPublicTag */: - case 338 /* JSDocProtectedTag */: - case 337 /* JSDocPrivateTag */: + case 337 /* JSDocPublicTag */: + case 339 /* JSDocProtectedTag */: + case 338 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 353 /* JSDocSatisfiesTag */: + case 354 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return checkMappedType(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 238 /* Block */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 266 /* ModuleBlock */: return checkBlock(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return checkVariableStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return checkExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return checkIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return checkDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return checkWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return checkForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return checkForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return checkForOfStatement(node); - case 248 /* ContinueStatement */: - case 249 /* BreakStatement */: + case 249 /* ContinueStatement */: + case 250 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return checkReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return checkWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return checkSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return checkLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return checkThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return checkTryStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return checkBindingElement(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return checkClassDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return checkImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return checkExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return checkExportAssignment(node); - case 239 /* EmptyStatement */: - case 256 /* DebuggerStatement */: + case 240 /* EmptyStatement */: + case 257 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -79415,33 +79486,33 @@ currentNode = node; instantiationCount = 0; switch (node.kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 167 /* Decorator */: - case 283 /* JsxOpeningElement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 168 /* Decorator */: + case 284 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 281 /* JsxElement */: + case 282 /* JsxElement */: checkJsxElementDeferred(node); break; } @@ -79593,27 +79664,27 @@ copySymbols(location.locals, meaning); } switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalModule(location)) break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */); break; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */); } break; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -79646,7 +79717,7 @@ function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 278 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 277 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 279 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 278 /* NamespaceExport */)) { copySymbol(symbol, meaning2); } }); @@ -79657,16 +79728,16 @@ return name.kind === 79 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 163 /* QualifiedName */) { + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 180 /* TypeReference */; + return node.parent.kind === 181 /* TypeReference */; } function isInNameOfExpressionWithTypeArguments(node) { - while (node.parent.kind === 208 /* PropertyAccessExpression */) { + while (node.parent.kind === 209 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 230 /* ExpressionWithTypeArguments */; + return node.parent.kind === 231 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -79692,13 +79763,13 @@ return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 163 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 164 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 268 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 269 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 274 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 275 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -79724,7 +79795,7 @@ node = parent; parent = parent.parent; } - if (parent && parent.kind === 202 /* ImportType */ && parent.qualifier === node) { + if (parent && parent.kind === 203 /* ImportType */ && parent.qualifier === node) { return parent; } return void 0; @@ -79733,7 +79804,7 @@ if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 208 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 209 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -79741,7 +79812,7 @@ } } } - if (name.parent.kind === 274 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 275 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, /*all meanings*/ @@ -79753,7 +79824,7 @@ return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 268 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 269 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals( name, @@ -79774,7 +79845,7 @@ } if (isInNameOfExpressionWithTypeArguments(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 230 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 231 /* ExpressionWithTypeArguments */) { meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -79788,10 +79859,10 @@ return entityNameSymbol; } } - if (name.parent.kind === 344 /* JSDocParameterTag */) { + if (name.parent.kind === 345 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 165 /* TypeParameter */ && name.parent.parent.kind === 348 /* JSDocTemplateTag */) { + if (name.parent.kind === 166 /* TypeParameter */ && name.parent.parent.kind === 349 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -79844,12 +79915,12 @@ return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 208 /* PropertyAccessExpression */ || name.kind === 163 /* QualifiedName */) { + } else if (name.kind === 209 /* PropertyAccessExpression */ || name.kind === 164 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 208 /* PropertyAccessExpression */) { + if (name.kind === 209 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -79889,7 +79960,7 @@ return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 180 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 181 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName( name, meaning, @@ -79900,7 +79971,7 @@ ); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 179 /* TypePredicate */) { + if (name.parent.kind === 180 /* TypePredicate */) { return resolveEntityName( name, /*meaning*/ @@ -79953,17 +80024,17 @@ if (node.kind === 79 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent.kind === 205 /* BindingElement */ && grandParent.kind === 203 /* ObjectBindingPattern */ && node === parent.propertyName) { + } else if (parent.kind === 206 /* BindingElement */ && grandParent.kind === 204 /* ObjectBindingPattern */ && node === parent.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { return propertyDeclaration; } } else if (isMetaProperty(parent) && parent.name === node) { - if (parent.keywordToken === 103 /* NewKeyword */ && idText(node) === "target") { + if (parent.keywordToken === 104 /* NewKeyword */ && idText(node) === "target") { return checkNewTargetMetaProperty(parent).symbol; } - if (parent.keywordToken === 100 /* ImportKeyword */ && idText(node) === "meta") { + if (parent.keywordToken === 101 /* ImportKeyword */ && idText(node) === "meta") { return getGlobalImportMetaExpressionType().members.get("meta"); } return void 0; @@ -79972,12 +80043,12 @@ switch (node.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 208 /* PropertyAccessExpression */: - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: const container = getThisContainer( node, /*includeArrowFunctions*/ @@ -79994,19 +80065,19 @@ if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 194 /* ThisType */: + case 195 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkExpression(node).symbol; - case 135 /* ConstructorKeyword */: + case 136 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 173 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 174 /* Constructor */) { return constructorDeclaration.parent.symbol; } return void 0; case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 269 /* ImportDeclaration */ || node.parent.kind === 275 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 270 /* ImportDeclaration */ || node.parent.kind === 276 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( node.parent, /*checkArgumentIsStringLiteralLike*/ false @@ -80019,19 +80090,19 @@ case 8 /* NumericLiteral */: const objectType = isElementAccessExpression(parent) ? parent.argumentExpression === node ? getTypeOfExpression(parent.expression) : void 0 : isLiteralTypeNode(parent) && isIndexedAccessTypeNode(grandParent) ? getTypeFromTypeNode(grandParent.objectType) : void 0; return objectType && getPropertyOfType(objectType, escapeLeadingUnderscores(node.text)); - case 88 /* DefaultKeyword */: - case 98 /* FunctionKeyword */: + case 89 /* DefaultKeyword */: + case 99 /* FunctionKeyword */: case 38 /* EqualsGreaterThanToken */: - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 202 /* ImportType */: + case 203 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; - case 100 /* ImportKeyword */: - case 103 /* NewKeyword */: + case 101 /* ImportKeyword */: + case 104 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return checkExpression(node).symbol; default: return void 0; @@ -80047,7 +80118,7 @@ return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 300 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 301 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); } return void 0; @@ -80119,16 +80190,16 @@ return errorType; } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 207 /* ObjectLiteralExpression */ || expr.kind === 206 /* ArrayLiteralExpression */); - if (expr.parent.kind === 247 /* ForOfStatement */) { + Debug.assert(expr.kind === 208 /* ObjectLiteralExpression */ || expr.kind === 207 /* ArrayLiteralExpression */); + if (expr.parent.kind === 248 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 223 /* BinaryExpression */) { + if (expr.parent.kind === 224 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 299 /* PropertyAssignment */) { + if (expr.parent.kind === 300 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -80161,7 +80232,7 @@ case 8 /* NumericLiteral */: case 10 /* StringLiteral */: return getStringLiteralType(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -80256,7 +80327,7 @@ } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 308 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 309 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -80286,7 +80357,7 @@ return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 295 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 296 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -80314,7 +80385,7 @@ /*lookInLabeledStatements*/ false ); - const inLoopBodyBlock = container.kind === 238 /* Block */ && isIterationStatement( + const inLoopBodyBlock = container.kind === 239 /* Block */ && isIterationStatement( container.parent, /*lookInLabeledStatements*/ false @@ -80354,25 +80425,25 @@ function isValueAliasDeclaration(node) { Debug.assert(!compilerOptions.verbatimModuleSyntax); switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfDeclaration(node)); - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: const symbol = getSymbolOfDeclaration(node); return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return node.expression && node.expression.kind === 79 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfDeclaration(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 308 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 309 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node)); @@ -80463,15 +80534,15 @@ } function canHaveConstantValue(node) { switch (node.kind) { - case 302 /* EnumMember */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 303 /* EnumMember */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 302 /* EnumMember */) { + if (node.kind === 303 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -80575,7 +80646,7 @@ function createTypeOfDeclaration(declarationIn, enclosingDeclaration, flags, tracker, addUndefined) { const declaration = getParseTreeNode(declarationIn, isVariableLikeOrAccessor); if (!declaration) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const symbol = getSymbolOfDeclaration(declaration); let type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? getWidenedLiteralType(getTypeOfSymbol(symbol)) : errorType; @@ -80590,7 +80661,7 @@ function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn, enclosingDeclaration, flags, tracker) { const signatureDeclaration = getParseTreeNode(signatureDeclarationIn, isFunctionLike); if (!signatureDeclaration) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const signature = getSignatureFromDeclaration(signatureDeclaration); return nodeBuilder.typeToTypeNode(getReturnTypeOfSignature(signature), enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); @@ -80598,7 +80669,7 @@ function createTypeOfExpression(exprIn, enclosingDeclaration, flags, tracker) { const expr = getParseTreeNode(exprIn, isExpression); if (!expr) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const type = getWidenedType(getRegularTypeOfExpression(expr)); return nodeBuilder.typeToTypeNode(type, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); @@ -80781,12 +80852,12 @@ getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 175 /* SetAccessor */ ? 174 /* GetAccessor */ : 175 /* SetAccessor */; + const otherKind = accessor.kind === 176 /* SetAccessor */ ? 175 /* GetAccessor */ : 176 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 175 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 174 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 176 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 175 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -80807,7 +80878,7 @@ }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 308 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 309 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfDeclaration(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -80842,18 +80913,18 @@ return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 230 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 294 /* HeritageClause */; + return node.parent && node.parent.kind === 231 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 295 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 164 /* ComputedPropertyName */) { + if (node.parent.kind === 165 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 208 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 209 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -80896,7 +80967,7 @@ break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 308 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 309 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -80921,7 +80992,7 @@ } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 264 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 265 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker( specifier, specifier, @@ -80931,7 +81002,7 @@ if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 308 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 309 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -81217,12 +81288,12 @@ for (const modifier of node.modifiers) { if (isDecorator(modifier)) { if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - if (node.kind === 171 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { + if (node.kind === 172 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); } - } else if (legacyDecorators && (node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */)) { + } else if (legacyDecorators && (node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */)) { const accessors = getAllAccessorDeclarations(node.parent.members, node); if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -81251,30 +81322,30 @@ } firstDecorator != null ? firstDecorator : firstDecorator = modifier; } else { - if (modifier.kind !== 146 /* ReadonlyKeyword */) { - if (node.kind === 168 /* PropertySignature */ || node.kind === 170 /* MethodSignature */) { + if (modifier.kind !== 147 /* ReadonlyKeyword */) { + if (node.kind === 169 /* PropertySignature */ || node.kind === 171 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 178 /* IndexSignature */ && (modifier.kind !== 124 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 179 /* IndexSignature */ && (modifier.kind !== 125 /* StaticKeyword */ || !isClassLike(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); } } - if (modifier.kind !== 101 /* InKeyword */ && modifier.kind !== 145 /* OutKeyword */ && modifier.kind !== 85 /* ConstKeyword */) { - if (node.kind === 165 /* TypeParameter */) { + if (modifier.kind !== 102 /* InKeyword */ && modifier.kind !== 146 /* OutKeyword */ && modifier.kind !== 86 /* ConstKeyword */) { + if (node.kind === 166 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { - case 85 /* ConstKeyword */: - if (node.kind !== 263 /* EnumDeclaration */ && node.kind !== 165 /* TypeParameter */) { - return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(85 /* ConstKeyword */)); + case 86 /* ConstKeyword */: + if (node.kind !== 264 /* EnumDeclaration */ && node.kind !== 166 /* TypeParameter */) { + return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(86 /* ConstKeyword */)); } const parent = node.parent; - if (node.kind === 165 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent) || isClassLike(parent) || isFunctionTypeNode(parent) || isConstructorTypeNode(parent) || isCallSignatureDeclaration(parent) || isConstructSignatureDeclaration(parent) || isMethodSignature(parent))) { + if (node.kind === 166 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent) || isClassLike(parent) || isFunctionTypeNode(parent) || isConstructorTypeNode(parent) || isCallSignatureDeclaration(parent) || isConstructSignatureDeclaration(parent) || isMethodSignature(parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind)); } break; - case 161 /* OverrideKeyword */: + case 162 /* OverrideKeyword */: if (flags & 16384 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); } else if (flags & 2 /* Ambient */) { @@ -81289,9 +81360,9 @@ flags |= 16384 /* Override */; lastOverride = modifier; break; - case 123 /* PublicKeyword */: - case 122 /* ProtectedKeyword */: - case 121 /* PrivateKeyword */: + case 124 /* PublicKeyword */: + case 123 /* ProtectedKeyword */: + case 122 /* PrivateKeyword */: const text = visibilityToString(modifierToFlag(modifier.kind)); if (flags & 28 /* AccessibilityModifier */) { return grammarErrorOnNode(modifier, Diagnostics.Accessibility_modifier_already_seen); @@ -81305,10 +81376,10 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); } else if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); - } else if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + } else if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { - if (modifier.kind === 121 /* PrivateKeyword */) { + if (modifier.kind === 122 /* PrivateKeyword */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); @@ -81318,7 +81389,7 @@ } flags |= modifierToFlag(modifier.kind); break; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: if (flags & 32 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static"); } else if (flags & 64 /* Readonly */) { @@ -81327,9 +81398,9 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); - } else if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + } else if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); @@ -81339,31 +81410,31 @@ flags |= 32 /* Static */; lastStatic = modifier; break; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "accessor"); } else if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); } else if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); - } else if (node.kind !== 169 /* PropertyDeclaration */) { + } else if (node.kind !== 170 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; break; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 168 /* PropertySignature */ && node.kind !== 178 /* IndexSignature */ && node.kind !== 166 /* Parameter */) { + } else if (node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 169 /* PropertySignature */ && node.kind !== 179 /* IndexSignature */ && node.kind !== 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); } flags |= 64 /* Readonly */; break; - case 93 /* ExportKeyword */: - if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 262 /* TypeAliasDeclaration */ && node.kind !== 261 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later - node.kind !== 264 /* ModuleDeclaration */ && node.parent.kind === 308 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + case 94 /* ExportKeyword */: + if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 263 /* TypeAliasDeclaration */ && node.kind !== 262 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later + node.kind !== 265 /* ModuleDeclaration */ && node.parent.kind === 309 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } if (flags & 1 /* Export */) { @@ -81376,14 +81447,14 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1 /* Export */; break; - case 88 /* DefaultKeyword */: - const container = node.parent.kind === 308 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 264 /* ModuleDeclaration */ && !isAmbientModule(container)) { + case 89 /* DefaultKeyword */: + const container = node.parent.kind === 309 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 265 /* ModuleDeclaration */ && !isAmbientModule(container)) { return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); } else if (!(flags & 1 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); @@ -81392,7 +81463,7 @@ } flags |= 1024 /* Default */; break; - case 136 /* DeclareKeyword */: + case 137 /* DeclareKeyword */: if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "declare"); } else if (flags & 512 /* Async */) { @@ -81401,9 +81472,9 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 265 /* ModuleBlock */) { + } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 266 /* ModuleBlock */) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); @@ -81413,15 +81484,15 @@ flags |= 2 /* Ambient */; lastDeclare = modifier; break; - case 126 /* AbstractKeyword */: + case 127 /* AbstractKeyword */: if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 260 /* ClassDeclaration */ && node.kind !== 182 /* ConstructorType */) { - if (node.kind !== 171 /* MethodDeclaration */ && node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 174 /* GetAccessor */ && node.kind !== 175 /* SetAccessor */) { + if (node.kind !== 261 /* ClassDeclaration */ && node.kind !== 183 /* ConstructorType */) { + if (node.kind !== 172 /* MethodDeclaration */ && node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 175 /* GetAccessor */ && node.kind !== 176 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 260 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 261 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { return grammarErrorOnNode(modifier, Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32 /* Static */) { @@ -81445,12 +81516,12 @@ } flags |= 256 /* Abstract */; break; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); } else if (flags & 2 /* Ambient */ || node.parent.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -81459,11 +81530,11 @@ flags |= 512 /* Async */; lastAsync = modifier; break; - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - const inOutFlag = modifier.kind === 101 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; - const inOutText = modifier.kind === 101 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 165 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + const inOutFlag = modifier.kind === 102 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; + const inOutText = modifier.kind === 102 /* InKeyword */ ? "in" : "out"; + if (node.kind !== 166 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); } if (flags & inOutFlag) { @@ -81477,7 +81548,7 @@ } } } - if (node.kind === 173 /* Constructor */) { + if (node.kind === 174 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -81488,11 +81559,11 @@ return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 269 /* ImportDeclaration */ || node.kind === 268 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 270 /* ImportDeclaration */ || node.kind === 269 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 166 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 167 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 166 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 167 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -81512,47 +81583,47 @@ } function findFirstIllegalModifier(node) { switch (node.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 264 /* ModuleDeclaration */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 166 /* Parameter */: - case 165 /* TypeParameter */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 265 /* ModuleDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 167 /* Parameter */: + case 166 /* TypeParameter */: return void 0; - case 172 /* ClassStaticBlockDeclaration */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 267 /* NamespaceExportDeclaration */: - case 279 /* MissingDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 268 /* NamespaceExportDeclaration */: + case 280 /* MissingDeclaration */: return find(node.modifiers, isModifier); default: - if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return void 0; } switch (node.kind) { - case 259 /* FunctionDeclaration */: - return findFirstModifierExcept(node, 132 /* AsyncKeyword */); - case 260 /* ClassDeclaration */: - case 182 /* ConstructorType */: - return findFirstModifierExcept(node, 126 /* AbstractKeyword */); - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 240 /* VariableStatement */: - case 262 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + return findFirstModifierExcept(node, 133 /* AsyncKeyword */); + case 261 /* ClassDeclaration */: + case 183 /* ConstructorType */: + return findFirstModifierExcept(node, 127 /* AbstractKeyword */); + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 241 /* VariableStatement */: + case 263 /* TypeAliasDeclaration */: return find(node.modifiers, isModifier); - case 263 /* EnumDeclaration */: - return findFirstModifierExcept(node, 85 /* ConstKeyword */); + case 264 /* EnumDeclaration */: + return findFirstModifierExcept(node, 86 /* ConstKeyword */); default: Debug.assertNever(node); } @@ -81567,10 +81638,10 @@ } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -81742,7 +81813,7 @@ let seenImplementsClause = false; if (!checkGrammarModifiers(node) && node.heritageClauses) { for (const heritageClause of node.heritageClauses) { - if (heritageClause.token === 94 /* ExtendsKeyword */) { + if (heritageClause.token === 95 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); } @@ -81754,7 +81825,7 @@ } seenExtendsClause = true; } else { - Debug.assert(heritageClause.token === 117 /* ImplementsKeyword */); + Debug.assert(heritageClause.token === 118 /* ImplementsKeyword */); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.implements_clause_already_seen); } @@ -81768,13 +81839,13 @@ let seenExtendsClause = false; if (node.heritageClauses) { for (const heritageClause of node.heritageClauses) { - if (heritageClause.token === 94 /* ExtendsKeyword */) { + if (heritageClause.token === 95 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); } seenExtendsClause = true; } else { - Debug.assert(heritageClause.token === 117 /* ImplementsKeyword */); + Debug.assert(heritageClause.token === 118 /* ImplementsKeyword */); return grammarErrorOnFirstToken(heritageClause, Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -81783,11 +81854,11 @@ return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 164 /* ComputedPropertyName */) { + if (node.kind !== 165 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 223 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { + if (computedPropertyName.expression.kind === 224 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } return false; @@ -81795,7 +81866,7 @@ function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */ || node.kind === 171 /* MethodDeclaration */ + node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */ || node.kind === 172 /* MethodDeclaration */ ); if (node.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); @@ -81814,7 +81885,7 @@ function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = /* @__PURE__ */ new Map(); for (const prop of node.properties) { - if (prop.kind === 301 /* SpreadAssignment */) { + if (prop.kind === 302 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -81824,10 +81895,10 @@ continue; } const name = prop.name; - if (name.kind === 164 /* ComputedPropertyName */) { + if (name.kind === 165 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 300 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 301 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { grammarErrorOnNode(prop.equalsToken, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern); } if (name.kind === 80 /* PrivateIdentifier */) { @@ -81835,7 +81906,7 @@ } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 132 /* AsyncKeyword */ || prop.kind !== 171 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 172 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -81848,8 +81919,8 @@ } let currentKind; switch (prop.kind) { - case 300 /* ShorthandPropertyAssignment */: - case 299 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 8 /* NumericLiteral */) { @@ -81857,13 +81928,13 @@ } currentKind = 4 /* PropertyAssignment */; break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -81900,7 +81971,7 @@ checkGrammarTypeArguments(node, node.typeArguments); const seen = /* @__PURE__ */ new Map(); for (const attr of node.attributes.properties) { - if (attr.kind === 290 /* JsxSpreadAttribute */) { + if (attr.kind === 291 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -81909,7 +81980,7 @@ } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 291 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 292 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -81944,7 +82015,7 @@ if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 247 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 248 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { @@ -81984,7 +82055,7 @@ if (!hasParseDiagnostics(sourceFile)) { const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); const func = getContainingFunction(forInOrOfStatement); - if (func && func.kind !== 173 /* Constructor */) { + if (func && func.kind !== 174 /* Constructor */) { Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); @@ -82000,7 +82071,7 @@ grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 258 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 259 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -82008,16 +82079,16 @@ return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } const firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); } } @@ -82025,7 +82096,7 @@ return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 184 /* TypeLiteral */ && accessor.parent.kind !== 261 /* InterfaceDeclaration */) { + if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 185 /* TypeLiteral */ && accessor.parent.kind !== 262 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -82040,7 +82111,7 @@ if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 184 /* TypeLiteral */ || accessor.parent.kind === 261 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 185 /* TypeLiteral */ || accessor.parent.kind === 262 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -82050,10 +82121,10 @@ if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 174 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 175 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 175 /* SetAccessor */) { + if (accessor.kind === 176 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -82071,17 +82142,17 @@ return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 174 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 175 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 174 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 175 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } function checkGrammarTypeOperatorNode(node) { - if (node.operator === 156 /* UniqueKeyword */) { - if (node.type.kind !== 153 /* SymbolKeyword */) { - return grammarErrorOnNode(node.type, Diagnostics._0_expected, tokenToString(153 /* SymbolKeyword */)); + if (node.operator === 157 /* UniqueKeyword */) { + if (node.type.kind !== 154 /* SymbolKeyword */) { + return grammarErrorOnNode(node.type, Diagnostics._0_expected, tokenToString(154 /* SymbolKeyword */)); } let parent = walkUpParenthesizedTypes(node.parent); if (isInJSFile(parent) && isJSDocTypeExpression(parent)) { @@ -82091,7 +82162,7 @@ } } switch (parent.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: const decl = parent; if (decl.name.kind !== 79 /* Identifier */) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); @@ -82103,12 +82174,12 @@ return grammarErrorOnNode(parent.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!isStatic(parent) || !hasEffectiveReadonlyModifier(parent)) { return grammarErrorOnNode(parent.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); } break; - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (!hasSyntacticModifier(parent, 64 /* Readonly */)) { return grammarErrorOnNode(parent.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } @@ -82116,9 +82187,9 @@ default: return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } - } else if (node.operator === 146 /* ReadonlyKeyword */) { - if (node.type.kind !== 185 /* ArrayType */ && node.type.kind !== 186 /* TupleType */) { - return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(153 /* SymbolKeyword */)); + } else if (node.operator === 147 /* ReadonlyKeyword */) { + if (node.type.kind !== 186 /* ArrayType */ && node.type.kind !== 187 /* TupleType */) { + return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(154 /* SymbolKeyword */)); } } } @@ -82131,9 +82202,9 @@ if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 171 /* MethodDeclaration */) { - if (node.parent.kind === 207 /* ObjectLiteralExpression */) { - if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 132 /* AsyncKeyword */)) { + if (node.kind === 172 /* MethodDeclaration */) { + if (node.parent.kind === 208 /* ObjectLiteralExpression */) { + if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 133 /* AsyncKeyword */)) { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) { return true; @@ -82153,12 +82224,12 @@ } if (node.flags & 16777216 /* Ambient */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.kind === 171 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 172 /* MethodDeclaration */ && !node.body) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } - } else if (node.parent.kind === 261 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 262 /* InterfaceDeclaration */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.parent.kind === 184 /* TypeLiteral */) { + } else if (node.parent.kind === 185 /* TypeLiteral */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } } @@ -82169,9 +82240,9 @@ return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 248 /* ContinueStatement */ && !isIterationStatement( + const isMisplacedContinueLabel = node.kind === 249 /* ContinueStatement */ && !isIterationStatement( current.statement, /*lookInLabeledStatement*/ true @@ -82182,8 +82253,8 @@ return false; } break; - case 252 /* SwitchStatement */: - if (node.kind === 249 /* BreakStatement */ && !node.label) { + case 253 /* SwitchStatement */: + if (node.kind === 250 /* BreakStatement */ && !node.label) { return false; } break; @@ -82200,10 +82271,10 @@ current = current.parent; } if (node.label) { - const message = node.kind === 249 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + const message = node.kind === 250 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - const message = node.kind === 249 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + const message = node.kind === 250 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } } @@ -82223,10 +82294,10 @@ } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 221 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 222 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 221 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; + return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 222 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -82236,7 +82307,7 @@ function checkAmbientInitializer(node) { const initializer = node.initializer; if (initializer) { - const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 110 /* TrueKeyword */ || initializer.kind === 95 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); + const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 111 /* TrueKeyword */ || initializer.kind === 96 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { @@ -82248,7 +82319,7 @@ } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 246 /* ForInStatement */ && node.parent.parent.kind !== 247 /* ForOfStatement */) { + if (node.parent.parent.kind !== 247 /* ForInStatement */ && node.parent.parent.kind !== 248 /* ForOfStatement */) { if (node.flags & 16777216 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { @@ -82260,7 +82331,7 @@ } } } - if (node.exclamationToken && (node.parent.parent.kind !== 240 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 241 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } @@ -82312,15 +82383,15 @@ } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return false; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -82337,12 +82408,12 @@ function checkGrammarMetaProperty(node) { const escapedText = node.name.escapedText; switch (node.keywordToken) { - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: if (escapedText !== "target") { return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.escapedText, tokenToString(node.keywordToken), "target"); } break; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: if (escapedText !== "meta") { return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.escapedText, tokenToString(node.keywordToken), "meta"); } @@ -82400,7 +82471,7 @@ } } function checkGrammarProperty(node) { - if (isComputedPropertyName(node.name) && isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 101 /* InKeyword */) { + if (isComputedPropertyName(node.name) && isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 102 /* InKeyword */) { return grammarErrorOnNode(node.parent.members[0], Diagnostics.A_mapped_type_may_not_declare_properties_or_methods); } if (isClassLike(node.parent)) { @@ -82419,7 +82490,7 @@ if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 261 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 262 /* InterfaceDeclaration */) { if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } @@ -82445,14 +82516,14 @@ } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 261 /* InterfaceDeclaration */ || node.kind === 262 /* TypeAliasDeclaration */ || node.kind === 269 /* ImportDeclaration */ || node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 275 /* ExportDeclaration */ || node.kind === 274 /* ExportAssignment */ || node.kind === 267 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 262 /* InterfaceDeclaration */ || node.kind === 263 /* TypeAliasDeclaration */ || node.kind === 270 /* ImportDeclaration */ || node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 276 /* ExportDeclaration */ || node.kind === 275 /* ExportAssignment */ || node.kind === 268 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (const decl of file.statements) { - if (isDeclaration(decl) || decl.kind === 240 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 241 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -82469,7 +82540,7 @@ if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 238 /* Block */ || node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + if (node.parent.kind === 239 /* Block */ || node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -82484,9 +82555,9 @@ let diagnosticMessage; if (languageVersion >= 1 /* ES5 */) { diagnosticMessage = Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 198 /* LiteralType */)) { + } else if (isChildOfNodeWithKind(node, 199 /* LiteralType */)) { diagnosticMessage = Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 302 /* EnumMember */)) { + } else if (isChildOfNodeWithKind(node, 303 /* EnumMember */)) { diagnosticMessage = Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { @@ -82559,7 +82630,7 @@ if (node.isTypeOnly && node.name && node.namedBindings) { return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); } - if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 272 /* NamedImports */) { + if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 273 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -82569,7 +82640,7 @@ if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 273 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + specifier.kind === 274 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement ); } }); @@ -82632,10 +82703,10 @@ } function findMostOverlappyType(source, unionTarget) { let bestMatch; - if (!(source.flags & (134348796 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { + if (!(source.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { let matchingCount = 0; for (const target of unionTarget.types) { - if (!(target.flags & (134348796 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { + if (!(target.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { const overlap = getIntersectionType([getIndexType(source), getIndexType(target)]); if (overlap.flags & 4194304 /* Index */) { return target; @@ -82653,7 +82724,7 @@ } function filterPrimitivesIfContainsNonPrimitive(type) { if (maybeTypeOfKind(type, 67108864 /* NonPrimitive */)) { - const result = filterType(type, (t) => !(t.flags & 134348796 /* Primitive */)); + const result = filterType(type, (t) => !(t.flags & 402784252 /* Primitive */)); if (!(result.flags & 131072 /* Never */)) { return result; } @@ -82688,12 +82759,12 @@ return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 259 /* FunctionDeclaration */ && declaration.kind !== 171 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 260 /* FunctionDeclaration */ && declaration.kind !== 172 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -83109,21 +83180,21 @@ return fn === void 0 ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor); } var visitEachChildTable = { - [163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [164 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [165 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [165 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83132,7 +83203,7 @@ nodeVisitor(node.default, visitor, isTypeNode) ); }, - [166 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [167 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83143,14 +83214,14 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [168 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83159,7 +83230,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [170 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { var _a2, _b; return context.factory.updatePropertyDeclaration( node, @@ -83171,7 +83242,7 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [170 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83182,7 +83253,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83195,7 +83266,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [173 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [174 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83203,7 +83274,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [174 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [175 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83213,7 +83284,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83222,7 +83293,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [172 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [173 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -83230,7 +83301,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -83238,7 +83309,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [177 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -83246,7 +83317,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [178 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83255,7 +83326,7 @@ ); }, // Types - [179 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -83263,14 +83334,14 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [181 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -83278,7 +83349,7 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83287,56 +83358,56 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [185 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [187 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [189 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [190 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [190 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [191 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -83345,13 +83416,13 @@ Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [193 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -83361,14 +83432,14 @@ node.isTypeOf ); }, - [298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [200 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -83377,26 +83448,26 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [194 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [198 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -83407,20 +83478,20 @@ nodesVisitor(node.members, visitor, isTypeElement) ); }, - [198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [202 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -83428,19 +83499,19 @@ ); }, // Binding patterns - [203 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [204 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [204 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [205 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [206 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -83450,19 +83521,19 @@ ); }, // Expression - [206 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [207 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [209 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -83474,7 +83545,7 @@ Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [210 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -83486,7 +83557,7 @@ Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [211 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -83500,7 +83571,7 @@ nodesVisitor(node.arguments, visitor, isExpression) ); }, - [211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [212 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -83508,7 +83579,7 @@ nodesVisitor(node.arguments, visitor, isExpression) ); }, - [212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [213 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -83516,20 +83587,20 @@ Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [214 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [216 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83541,7 +83612,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [216 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [217 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83552,43 +83623,43 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [219 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [220 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [224 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -83596,7 +83667,7 @@ Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [225 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -83606,27 +83677,27 @@ Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [229 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83636,28 +83707,28 @@ nodesVisitor(node.members, visitor, isClassElement) ); }, - [230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [232 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -83666,14 +83737,14 @@ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -83681,26 +83752,26 @@ ); }, // Element - [238 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [239 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [240 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [241 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [242 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [243 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -83708,21 +83779,21 @@ nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [243 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [245 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -83731,7 +83802,7 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -83739,7 +83810,7 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [248 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -83748,52 +83819,52 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [249 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [250 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -83801,7 +83872,7 @@ nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [258 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -83810,13 +83881,13 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [258 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [259 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [259 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [260 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83828,7 +83899,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [260 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [261 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83838,7 +83909,7 @@ nodesVisitor(node.members, visitor, isClassElement) ); }, - [261 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [262 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83848,7 +83919,7 @@ nodesVisitor(node.members, visitor, isTypeElement) ); }, - [262 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [263 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83857,7 +83928,7 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83865,7 +83936,7 @@ nodesVisitor(node.members, visitor, isEnumMember) ); }, - [264 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83873,25 +83944,25 @@ nodeVisitor(node.body, visitor, isModuleBody) ); }, - [265 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [266 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [266 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [267 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [269 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83900,7 +83971,7 @@ Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [270 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83909,21 +83980,21 @@ nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [296 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [297 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [298 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -83931,25 +84002,25 @@ nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [273 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [273 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -83957,14 +84028,14 @@ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [275 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83974,13 +84045,13 @@ nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [276 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [277 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [278 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -83989,14 +84060,14 @@ ); }, // Module references - [280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -84004,7 +84075,7 @@ Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -84012,7 +84083,7 @@ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -84020,13 +84091,13 @@ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -84034,52 +84105,52 @@ Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [289 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [290 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [293 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [294 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [294 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [295 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [295 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -84087,28 +84158,28 @@ ); }, // Property assignments - [299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -84116,20 +84187,20 @@ ); }, // Top-level nodes - [308 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [309 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [357 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [358 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -84563,7 +84634,7 @@ function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 308 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 309 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -84606,7 +84677,7 @@ let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -84615,12 +84686,12 @@ hasImportDefault = true; } break; - case 268 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 280 /* ExternalModuleReference */) { + case 269 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 281 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -84643,19 +84714,19 @@ addExportedNamesForExportDeclaration(node); } break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames); } } break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -84672,7 +84743,7 @@ } } break; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -84813,7 +84884,7 @@ return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 169 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 170 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -84850,15 +84921,15 @@ } function getAllDecoratorsOfClassElement(member, parent, useLegacyDecorators) { switch (member.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (!useLegacyDecorators) { return getAllDecoratorsOfMethod(member); } return getAllDecoratorsOfAccessors(member, parent); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -85475,8 +85546,8 @@ const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -85487,14 +85558,14 @@ let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 309 /* Bundle */) { + if (node.kind === 310 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 311 /* InputFiles */) { + if (prepend.kind === 312 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -85525,22 +85596,22 @@ } function onBeforeVisitNode(node) { switch (node.kind) { - case 308 /* SourceFile */: - case 266 /* CaseBlock */: - case 265 /* ModuleBlock */: - case 238 /* Block */: + case 309 /* SourceFile */: + case 267 /* CaseBlock */: + case 266 /* ModuleBlock */: + case 239 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 260 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 261 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -85559,10 +85630,10 @@ } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -85577,13 +85648,13 @@ return node; } switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -85593,7 +85664,7 @@ return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 275 /* ExportDeclaration */ || node.kind === 269 /* ImportDeclaration */ || node.kind === 270 /* ImportClause */ || node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (node.kind === 276 /* ExportDeclaration */ || node.kind === 270 /* ImportDeclaration */ || node.kind === 271 /* ImportClause */ || node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 281 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -85605,21 +85676,21 @@ } function classElementVisitorWorker(node, parent) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructor(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessor(node, parent); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessor(node, parent); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node, parent); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return node; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -85630,15 +85701,15 @@ } function objectLiteralElementVisitorWorker(node, parent) { switch (node.kind) { - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return visitor(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessor(node, parent); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessor(node, parent); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node, parent); default: return Debug.failBadSyntaxKind(node); @@ -85655,7 +85726,7 @@ return void 0; if (modifierToFlag(node.kind) & 117086 /* TypeScriptModifier */) { return void 0; - } else if (currentNamespace && node.kind === 93 /* ExportKeyword */) { + } else if (currentNamespace && node.kind === 94 /* ExportKeyword */) { return void 0; } return node; @@ -85665,108 +85736,108 @@ return factory2.createNotEmittedStatement(node); } switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return currentNamespace ? void 0 : node; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 126 /* AbstractKeyword */: - case 161 /* OverrideKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 146 /* ReadonlyKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - case 185 /* ArrayType */: - case 186 /* TupleType */: - case 187 /* OptionalType */: - case 188 /* RestType */: - case 184 /* TypeLiteral */: - case 179 /* TypePredicate */: - case 165 /* TypeParameter */: - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 134 /* BooleanKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 144 /* NeverKeyword */: - case 114 /* VoidKeyword */: - case 153 /* SymbolKeyword */: - case 182 /* ConstructorType */: - case 181 /* FunctionType */: - case 183 /* TypeQuery */: - case 180 /* TypeReference */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 191 /* ConditionalType */: - case 193 /* ParenthesizedType */: - case 194 /* ThisType */: - case 195 /* TypeOperator */: - case 196 /* IndexedAccessType */: - case 197 /* MappedType */: - case 198 /* LiteralType */: - case 178 /* IndexSignature */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 127 /* AbstractKeyword */: + case 162 /* OverrideKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 147 /* ReadonlyKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + case 186 /* ArrayType */: + case 187 /* TupleType */: + case 188 /* OptionalType */: + case 189 /* RestType */: + case 185 /* TypeLiteral */: + case 180 /* TypePredicate */: + case 166 /* TypeParameter */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 135 /* BooleanKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 145 /* NeverKeyword */: + case 115 /* VoidKeyword */: + case 154 /* SymbolKeyword */: + case 183 /* ConstructorType */: + case 182 /* FunctionType */: + case 184 /* TypeQuery */: + case 181 /* TypeReference */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 192 /* ConditionalType */: + case 194 /* ParenthesizedType */: + case 195 /* ThisType */: + case 196 /* TypeOperator */: + case 197 /* IndexedAccessType */: + case 198 /* MappedType */: + case 199 /* LiteralType */: + case 179 /* IndexSignature */: return void 0; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return void 0; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return visitHeritageClause(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return visitArrowFunction(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return visitAssertionExpression(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return visitNonNullExpression(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -85803,7 +85874,7 @@ ))) facts |= 1 /* HasStaticInitializedProperties */; const extendsClauseElement = getEffectiveBaseTypeNode(node); - if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */) + if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */) facts |= 64 /* IsDerivedClass */; if (classOrConstructorParameterIsDecorated(legacyDecorators, node)) facts |= 2 /* HasClassOrConstructorParameterDecorators */; @@ -86099,19 +86170,19 @@ } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 169 /* PropertyDeclaration */; + return kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 170 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 171 /* MethodDeclaration */; + return node.kind === 172 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; } return false; @@ -86143,7 +86214,7 @@ return Debug.checkDefined(visitNode(name, visitor, isPropertyName)); } function visitHeritageClause(node) { - if (node.token === 117 /* ImplementsKeyword */) { + if (node.token === 118 /* ImplementsKeyword */) { return void 0; } return visitEachChild(node, visitor, context); @@ -86739,12 +86810,12 @@ true ) ) - ], currentLexicalScope.kind === 308 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) + ], currentLexicalScope.kind === 309 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) ); setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 263 /* EnumDeclaration */) { + if (node.kind === 264 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -86857,7 +86928,7 @@ let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 265 /* ModuleBlock */) { + if (node.body.kind === 266 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -86888,13 +86959,13 @@ true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 265 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 266 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 264 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 265 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -86929,7 +87000,7 @@ ) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 271 /* NamespaceImport */) { + if (node.kind === 272 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.verbatimModuleSyntax || compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -87127,15 +87198,15 @@ if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(264 /* ModuleDeclaration */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(265 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 264 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 265 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 263 /* EnumDeclaration */; + return getOriginalNode(node).kind === 264 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -87180,9 +87251,9 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -87197,8 +87268,8 @@ /*prefixLocals*/ false ); - if (container && container.kind !== 308 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 264 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 263 /* EnumDeclaration */; + if (container && container.kind !== 309 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 265 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 264 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -87298,7 +87369,7 @@ } function modifierVisitor(node) { switch (node.kind) { - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return shouldTransformAutoAccessorsInCurrentClass() ? void 0 : node; default: return tryCast(node, isModifier); @@ -87309,51 +87380,51 @@ return node; } switch (node.kind) { - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return Debug.fail("Use `modifierVisitor` instead."); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression( node, /*referencedName*/ void 0 ); - case 172 /* ClassStaticBlockDeclaration */: - case 169 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: return Debug.fail("Use `classElementVisitor` instead."); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return visitBindingElement(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); case 80 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -87361,20 +87432,20 @@ /*referencedName*/ void 0 ); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, @@ -87391,21 +87462,21 @@ } function namedEvaluationVisitor(node, referencedName) { switch (node.kind) { - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ false, referencedName ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ false, referencedName ); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node, referencedName); default: return visitor(node); @@ -87413,26 +87484,26 @@ } function discardedValueVisitor(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -87446,9 +87517,9 @@ } function heritageClauseVisitor(node) { switch (node.kind) { - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -87456,8 +87527,8 @@ } function assignmentTargetVisitor(node) { switch (node.kind) { - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -87465,29 +87536,29 @@ } function classElementVisitor(node) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, visitMethodOrAccessorDeclaration, node ); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, visitPropertyDeclaration, node ); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return node; default: return isModifierLike(node) ? modifierVisitor(node) : visitor(node); @@ -87495,7 +87566,7 @@ } function propertyNameVisitor(node) { switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); default: return visitor(node); @@ -87503,10 +87574,10 @@ } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -88683,7 +88754,7 @@ return constructor; } const extendsClauseElement = getEffectiveBaseTypeNode(container); - const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */); + const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */); const parameters = visitParameterList(constructor ? constructor.parameters : void 0, visitor, context); const body = transformConstructorBody(container, constructor, isDerivedClass); if (!body) { @@ -88977,15 +89048,15 @@ function enableSubstitutionForClassStaticThisOrSuperReference() { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; - context.enableSubstitution(108 /* ThisKeyword */); - context.enableEmitNotification(259 /* FunctionDeclaration */); - context.enableEmitNotification(215 /* FunctionExpression */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(169 /* PropertyDeclaration */); - context.enableEmitNotification(164 /* ComputedPropertyName */); + context.enableSubstitution(109 /* ThisKeyword */); + context.enableEmitNotification(260 /* FunctionDeclaration */); + context.enableEmitNotification(216 /* FunctionExpression */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(170 /* PropertyDeclaration */); + context.enableEmitNotification(165 /* ComputedPropertyName */); } } function addInstanceMethodStatements(statements, methods, receiver) { @@ -89359,16 +89430,16 @@ return; } switch (node.kind) { - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) { break; } - case 259 /* FunctionDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - case 169 /* PropertyDeclaration */: { + case 260 /* FunctionDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: { const savedLexicalEnvironment = lexicalEnvironment; const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; lexicalEnvironment = void 0; @@ -89380,7 +89451,7 @@ lexicalEnvironment = savedLexicalEnvironment; return; } - case 164 /* ComputedPropertyName */: { + case 165 /* ComputedPropertyName */: { const savedLexicalEnvironment = lexicalEnvironment; const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; @@ -89404,7 +89475,7 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return substituteThisExpression(node); } return node; @@ -89477,7 +89548,7 @@ return !isGeneratedPrivateIdentifier(node) && node.escapedText === "#constructor"; } function isPrivateIdentifierInExpression(node) { - return isPrivateIdentifier(node.left) && node.operatorToken.kind === 101 /* InKeyword */; + return isPrivateIdentifier(node.left) && node.operatorToken.kind === 102 /* InKeyword */; } // src/compiler/transformers/typeSerializer.ts @@ -89514,15 +89585,15 @@ } function serializeTypeOfNode(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: - case 166 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 167 /* Parameter */: return serializeTypeNode(node.type); - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 171 /* MethodDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 172 /* MethodDeclaration */: return factory2.createIdentifier("Function"); default: return factory2.createVoidZero(); @@ -89549,7 +89620,7 @@ return factory2.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 174 /* GetAccessor */) { + if (container && node.kind === 175 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -89571,76 +89642,76 @@ } node = skipTypeParentheses(node); switch (node.kind) { - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: return factory2.createVoidZero(); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return factory2.createIdentifier("Function"); - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return factory2.createIdentifier("Array"); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean"); - case 134 /* BooleanKeyword */: + case 135 /* BooleanKeyword */: return factory2.createIdentifier("Boolean"); - case 200 /* TemplateLiteralType */: - case 152 /* StringKeyword */: + case 201 /* TemplateLiteralType */: + case 153 /* StringKeyword */: return factory2.createIdentifier("String"); - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return factory2.createIdentifier("Object"); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); - case 148 /* NumberKeyword */: + case 149 /* NumberKeyword */: return factory2.createIdentifier("Number"); - case 160 /* BigIntKeyword */: + case 161 /* BigIntKeyword */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 153 /* SymbolKeyword */: + case 154 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return serializeTypeReferenceNode(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ true ); - case 189 /* UnionType */: + case 190 /* UnionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ false ); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return serializeUnionOrIntersectionConstituents( [node.trueType, node.falseType], /*isIntersection*/ false ); - case 195 /* TypeOperator */: - if (node.operator === 146 /* ReadonlyKeyword */) { + case 196 /* TypeOperator */: + if (node.operator === 147 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 183 /* TypeQuery */: - case 196 /* IndexedAccessType */: - case 197 /* MappedType */: - case 184 /* TypeLiteral */: - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 194 /* ThisType */: - case 202 /* ImportType */: + case 184 /* TypeQuery */: + case 197 /* IndexedAccessType */: + case 198 /* MappedType */: + case 185 /* TypeLiteral */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 195 /* ThisType */: + case 203 /* ImportType */: break; - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: - case 320 /* JSDocFunctionType */: - case 321 /* JSDocVariadicType */: - case 322 /* JSDocNamepathType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: + case 321 /* JSDocFunctionType */: + case 322 /* JSDocVariadicType */: + case 323 /* JSDocNamepathType */: break; - case 317 /* JSDocNullableType */: - case 318 /* JSDocNonNullableType */: - case 319 /* JSDocOptionalType */: + case 318 /* JSDocNullableType */: + case 319 /* JSDocNonNullableType */: + case 320 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -89652,7 +89723,7 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return factory2.createIdentifier("String"); - case 221 /* PrefixUnaryExpression */: { + case 222 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 8 /* NumericLiteral */: @@ -89666,10 +89737,10 @@ return factory2.createIdentifier("Number"); case 9 /* BigIntLiteral */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: return factory2.createIdentifier("Boolean"); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return factory2.createVoidZero(); default: return Debug.failBadSyntaxKind(node); @@ -89679,20 +89750,20 @@ let serializedType; for (let typeNode of types) { typeNode = skipTypeParentheses(typeNode); - if (typeNode.kind === 144 /* NeverKeyword */) { + if (typeNode.kind === 145 /* NeverKeyword */) { if (isIntersection) return factory2.createVoidZero(); continue; } - if (typeNode.kind === 157 /* UnknownKeyword */) { + if (typeNode.kind === 158 /* UnknownKeyword */) { if (!isIntersection) return factory2.createIdentifier("Object"); continue; } - if (typeNode.kind === 131 /* AnyKeyword */) { + if (typeNode.kind === 132 /* AnyKeyword */) { return factory2.createIdentifier("Object"); } - if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 104 /* NullKeyword */ || typeNode.kind === 155 /* UndefinedKeyword */)) { + if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 156 /* UndefinedKeyword */)) { continue; } const serializedConstituent = serializeTypeNode(typeNode); @@ -89811,7 +89882,7 @@ name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -89861,23 +89932,23 @@ return node; } switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -90430,49 +90501,49 @@ return node; } switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return Debug.fail("Use `modifierVisitor` instead."); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression( node, /*referencedName*/ void 0 ); - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return Debug.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return visitBindingElement(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return visitThisExpression(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ false ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -90480,7 +90551,7 @@ /*referencedName*/ void 0 ); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ @@ -90488,28 +90559,28 @@ /*referencedName*/ void 0 ); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discard*/ false ); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: { + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: { enterOther(); const result = visitEachChild(node, fallbackVisitor, context); exitOther(); @@ -90521,7 +90592,7 @@ } function fallbackVisitor(node) { switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; default: return visitor(node); @@ -90529,7 +90600,7 @@ } function modifierVisitor(node) { switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; default: return node; @@ -90537,17 +90608,17 @@ } function classElementVisitor(node) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); default: return visitor(node); @@ -90555,21 +90626,21 @@ } function namedEvaluationVisitor(node, referencedName) { switch (node.kind) { - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ false, referencedName ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ false, referencedName ); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node, referencedName); default: return visitor(node); @@ -90577,26 +90648,26 @@ } function discardedValueVisitor(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -90722,7 +90793,7 @@ } } if (classDecorators && containsLexicalSuperInStaticInitializer(node)) { - const extendsClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const extendsClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); if (extendsExpression) { @@ -90758,7 +90829,7 @@ return node2; } switch (node2.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: if (!outerThis) { outerThis = factory2.createUniqueName("_outerThis", 16 /* Optimistic */); classDefinitionStatements.unshift(createLet(outerThis, factory2.createThis())); @@ -90778,7 +90849,7 @@ const initializerStatements = prepareConstructor(node, classInfo2); if (initializerStatements) { const extendsClauseElement = getEffectiveBaseTypeNode(node); - const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */); + const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */); const constructorStatements = []; if (isDerivedClass) { const spreadArguments = factory2.createSpreadElement(factory2.createIdentifier("arguments")); @@ -91366,7 +91437,7 @@ setterName = factory2.updateComputedPropertyName(name2, temp); } } - const modifiersWithoutAccessor = visitNodes2(modifiers, (node2) => node2.kind !== 127 /* AccessorKeyword */ ? node2 : void 0, isModifier); + const modifiersWithoutAccessor = visitNodes2(modifiers, (node2) => node2.kind !== 128 /* AccessorKeyword */ ? node2 : void 0, isModifier); const backingField = createAccessorPropertyBackingField(factory2, node, modifiersWithoutAccessor, initializer); setOriginalNode(backingField, node); setEmitFlags(backingField, 3072 /* NoComments */); @@ -92089,36 +92160,36 @@ return node; } switch (node.kind) { - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return void 0; - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return visitAwaitExpression(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 208 /* PropertyAccessExpression */: - if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 106 /* SuperKeyword */) { + case 209 /* PropertyAccessExpression */: + if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 209 /* ElementAccessExpression */: - if (capturedSuperProperties && node.expression.kind === 106 /* SuperKeyword */) { + case 210 /* ElementAccessExpression */: + if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 173 /* Constructor */: + case 174 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -92127,27 +92198,27 @@ function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 238 /* Block */: - case 252 /* SwitchStatement */: - case 266 /* CaseBlock */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 255 /* TryStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 242 /* IfStatement */: - case 251 /* WithStatement */: - case 253 /* LabeledStatement */: + case 239 /* Block */: + case 253 /* SwitchStatement */: + case 267 /* CaseBlock */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 256 /* TryStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 243 /* IfStatement */: + case 252 /* WithStatement */: + case 254 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -92424,7 +92495,7 @@ const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 216 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 217 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = /* @__PURE__ */ new Set(); @@ -92523,15 +92594,15 @@ function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); - context.enableEmitNotification(260 /* ClassDeclaration */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(240 /* VariableStatement */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); + context.enableEmitNotification(261 /* ClassDeclaration */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(241 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -92562,17 +92633,17 @@ } function substituteExpression(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), @@ -92584,7 +92655,7 @@ return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return createSuperElementAccessInAsyncMethod( node.argumentExpression, node @@ -92610,7 +92681,7 @@ } function isSuperContainer(node) { const kind = node.kind; - return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 261 /* ClassDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -92828,7 +92899,7 @@ ); } function visitorNoAsyncModifier(node) { - if (node.kind === 132 /* AsyncKeyword */) { + if (node.kind === 133 /* AsyncKeyword */) { return void 0; } return node; @@ -92850,119 +92921,119 @@ return node; } switch (node.kind) { - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return visitAwaitExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 246 /* ForInStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 247 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return visitVoidExpression(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 208 /* PropertyAccessExpression */: - if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 106 /* SuperKeyword */) { + case 209 /* PropertyAccessExpression */: + if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 209 /* ElementAccessExpression */: - if (capturedSuperProperties && node.expression.kind === 106 /* SuperKeyword */) { + case 210 /* ElementAccessExpression */: + if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -93047,7 +93118,7 @@ function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 247 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 248 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -93058,7 +93129,7 @@ let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 301 /* SpreadAssignment */) { + if (e.kind === 302 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -93066,7 +93137,7 @@ const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 299 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 300 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -93077,7 +93148,7 @@ function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 207 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 208 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -93865,15 +93936,15 @@ function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); - context.enableEmitNotification(260 /* ClassDeclaration */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(240 /* VariableStatement */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); + context.enableEmitNotification(261 /* ClassDeclaration */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(241 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -93904,17 +93975,17 @@ } function substituteExpression(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), @@ -93926,7 +93997,7 @@ return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return createSuperElementAccessInAsyncMethod( node.argumentExpression, node @@ -93952,7 +94023,7 @@ } function isSuperContainer(node) { const kind = node.kind; - return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 261 /* ClassDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -93997,7 +94068,7 @@ return node; } switch (node.kind) { - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -94036,7 +94107,7 @@ return node; } switch (node.kind) { - case 210 /* CallExpression */: { + case 211 /* CallExpression */: { const updated = visitNonOptionalCallExpression( node, /*captureThisArg*/ @@ -94045,8 +94116,8 @@ Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression( node, @@ -94059,12 +94130,12 @@ return updated; } return visitEachChild(node, visitor, context); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (node.operatorToken.kind === 60 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -94102,7 +94173,7 @@ thisArg = expression; } } - expression = node.kind === 208 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 209 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -94138,12 +94209,12 @@ } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -94169,8 +94240,8 @@ for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -94179,9 +94250,9 @@ thisArg = rightExpression; } } - rightExpression = segment.kind === 208 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 209 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -94189,7 +94260,7 @@ } rightExpression = factory2.createFunctionCallCall( rightExpression, - leftThisArg.kind === 106 /* SuperKeyword */ ? factory2.createThis() : leftThisArg, + leftThisArg.kind === 107 /* SuperKeyword */ ? factory2.createThis() : leftThisArg, visitNodes2(segment.arguments, visitor, isExpression) ); } else { @@ -94521,25 +94592,25 @@ } function visitorWorker(node) { switch (node.kind) { - case 281 /* JsxElement */: + case 282 /* JsxElement */: return visitJsxElement( node, /*isChild*/ false ); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ false ); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ false ); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -94549,21 +94620,21 @@ switch (node.kind) { case 11 /* JsxText */: return visitJsxText(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return visitJsxExpression(node); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return visitJsxElement( node, /*isChild*/ true ); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ true ); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ @@ -94789,7 +94860,7 @@ const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 291 /* JsxExpression */) { + if (node.kind === 292 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -94863,7 +94934,7 @@ return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 281 /* JsxElement */) { + if (node.kind === 282 /* JsxElement */) { return getTagName(node.openingElement); } else { const name = node.tagName; @@ -95162,7 +95233,7 @@ return node; } switch (node.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -95290,7 +95361,7 @@ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 250 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 251 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -95345,7 +95416,7 @@ return node; } function callExpressionVisitor(node) { - if (node.kind === 106 /* SuperKeyword */) { + if (node.kind === 107 /* SuperKeyword */) { return visitSuperKeyword( /*isExpressionOfCall*/ true @@ -95355,87 +95426,87 @@ } function visitorWorker(node, expressionResultIsUnused2) { switch (node.kind) { - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: return void 0; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return visitArrowFunction(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); case 79 /* Identifier */: return visitIdentifier(node); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return visitCaseBlock(node); - case 238 /* Block */: + case 239 /* Block */: return visitBlock( node, /*isFunctionBody*/ false ); - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return visitDoOrWhileStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: @@ -95446,33 +95517,33 @@ return visitStringLiteral(node); case 8 /* NumericLiteral */: return visitNumericLiteral(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return visitTemplateExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return visitSpreadElement(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return visitSuperKeyword( /*isExpressionOfCall*/ false ); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return visitThisKeyword(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return visitMetaProperty(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return visitAccessorDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -95580,13 +95651,13 @@ } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 249 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 250 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump; if (!canUseBreakOrContinue) { let labelMarker; const label = node.label; if (!label) { - if (node.kind === 249 /* BreakStatement */) { + if (node.kind === 250 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -95594,7 +95665,7 @@ labelMarker = "continue"; } } else { - if (node.kind === 249 /* BreakStatement */) { + if (node.kind === 250 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump( convertedLoopState, @@ -95806,7 +95877,7 @@ return block; } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { - const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */; + const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */; if (!constructor) return createDefaultConstructorBody(node, isDerivedClass); const prologue = []; @@ -95915,14 +95986,14 @@ }; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 250 /* ReturnStatement */) { + if (statement.kind === 251 /* ReturnStatement */) { return true; - } else if (statement.kind === 242 /* IfStatement */) { + } else if (statement.kind === 243 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 238 /* Block */) { + } else if (statement.kind === 239 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -96196,7 +96267,7 @@ return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 216 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 217 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } @@ -96238,27 +96309,27 @@ if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return statements; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 173 /* Constructor */: + case 174 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), "constructor" ); break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), factory2.createBinaryExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), - 102 /* InstanceOfKeyword */, + 103 /* InstanceOfKeyword */, factory2.getLocalName(node) ) ), @@ -96301,21 +96372,21 @@ function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 173 /* Constructor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 173 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -96522,7 +96593,7 @@ const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody(node); - if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -96583,7 +96654,7 @@ multiLine = true; } } else { - Debug.assert(node.kind === 216 /* ArrowFunction */); + Debug.assert(node.kind === 217 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -96809,14 +96880,14 @@ } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -97166,7 +97237,7 @@ let numInitialProperties = -1, hasComputed = false; for (let i = 0; i < properties.length; i++) { const property = properties[i]; - if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 164 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 165 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -97288,15 +97359,15 @@ } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -97348,11 +97419,11 @@ function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 258 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 259 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -97791,20 +97862,20 @@ for (let i = start; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -97930,7 +98001,7 @@ let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody(node); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -97973,7 +98044,7 @@ return visitTypeScriptClassWrapper(node); } const expression = skipOuterExpressions(node.expression); - if (expression.kind === 106 /* SuperKeyword */ || isSuperProperty(expression) || some(node.arguments, isSpreadElement)) { + if (expression.kind === 107 /* SuperKeyword */ || isSuperProperty(expression) || some(node.arguments, isSpreadElement)) { return visitCallExpressionWithPotentialCapturedThisAssignment( node, /*assignToCapturedThis*/ @@ -98093,16 +98164,16 @@ ); } function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { - if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 106 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { + if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 107 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { const { target, thisArg } = factory2.createCallBinding(node.expression, hoistVariableDeclaration); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { setEmitFlags(thisArg, 8 /* NoSubstitution */); } let resultingCall; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { resultingCall = factory2.createFunctionApplyCall( Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)), - node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), + node.expression.kind === 107 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), transformAndSpreadElements( node.arguments, /*isArgumentList*/ @@ -98117,13 +98188,13 @@ resultingCall = setTextRange( factory2.createFunctionCallCall( Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)), - node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), + node.expression.kind === 107 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), visitNodes2(node.arguments, visitor, isExpression) ), node ); } - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { const initializer = factory2.createLogicalOr( resultingCall, createActualThis() @@ -98266,7 +98337,7 @@ return hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), "prototype") : factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); } function visitMetaProperty(node) { - if (node.keywordToken === 103 /* NewKeyword */ && node.name.escapedText === "target") { + if (node.keywordToken === 104 /* NewKeyword */ && node.name.escapedText === "target") { hierarchyFacts |= 32768 /* NewTarget */; return factory2.createUniqueName("_newTarget", 16 /* Optimistic */ | 32 /* FileLevel */); } @@ -98293,14 +98364,14 @@ function enableSubstitutionsForCapturedThis() { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; - context.enableSubstitution(108 /* ThisKeyword */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(216 /* ArrowFunction */); - context.enableEmitNotification(215 /* FunctionExpression */); - context.enableEmitNotification(259 /* FunctionDeclaration */); + context.enableSubstitution(109 /* ThisKeyword */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(217 /* ArrowFunction */); + context.enableEmitNotification(216 /* FunctionExpression */); + context.enableEmitNotification(260 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -98324,10 +98395,10 @@ } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 258 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -98336,7 +98407,7 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return substituteThisKeyword(node); } return node; @@ -98384,19 +98455,19 @@ return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 241 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 242 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 210 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 211 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; - if (!nodeIsSynthesized(callTarget) || callTarget.kind !== 106 /* SuperKeyword */) { + if (!nodeIsSynthesized(callTarget) || callTarget.kind !== 107 /* SuperKeyword */) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 227 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 228 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -98413,24 +98484,24 @@ if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(283 /* JsxOpeningElement */); - context.enableEmitNotification(284 /* JsxClosingElement */); - context.enableEmitNotification(282 /* JsxSelfClosingElement */); + context.enableEmitNotification(284 /* JsxOpeningElement */); + context.enableEmitNotification(285 /* JsxClosingElement */); + context.enableEmitNotification(283 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(299 /* PropertyAssignment */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(300 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: + case 283 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -98468,7 +98539,7 @@ } function trySubstituteReservedName(name) { const token = identifierToKeywordKind(name); - if (token !== void 0 && token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */) { + if (token !== void 0 && token >= 82 /* FirstReservedWord */ && token <= 117 /* LastReservedWord */) { return setTextRange(factory2.createStringLiteralFromNode(name), name); } return void 0; @@ -98556,13 +98627,13 @@ } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 243 /* DoStatement */: + case 244 /* DoStatement */: return visitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return visitWhileStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -98570,24 +98641,24 @@ } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return visitAccessorDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return visitBreakStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return visitContinueStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -98601,23 +98672,23 @@ } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return visitConditionalExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -98625,9 +98696,9 @@ } function visitGenerator(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -98812,14 +98883,14 @@ if (containsYield(right)) { let target; switch (left.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), left.name ); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), @@ -99152,35 +99223,35 @@ } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 238 /* Block */: + case 239 /* Block */: return transformAndEmitBlock(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return transformAndEmitIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return transformAndEmitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return transformAndEmitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return transformAndEmitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -99404,7 +99475,7 @@ markLabel(conditionLabel); emitBreakWhenFalse(endLoopLabel, factory2.createLessThan(keysIndex, factory2.createPropertyAccessExpression(keysArray, "length"))); emitAssignment(key, factory2.createElementAccessExpression(keysArray, keysIndex)); - emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key, 101 /* InKeyword */, obj)); + emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key, 102 /* InKeyword */, obj)); let variable; if (isVariableDeclarationList(initializer)) { for (const variable2 of initializer.declarations) { @@ -99532,7 +99603,7 @@ for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 293 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 294 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -99542,7 +99613,7 @@ let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -100510,12 +100581,12 @@ const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(212 /* TaggedTemplateExpression */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(213 /* TaggedTemplateExpression */); context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(223 /* BinaryExpression */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(224 /* BinaryExpression */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(309 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; let currentSourceFile; @@ -100928,23 +100999,23 @@ } function topLevelVisitor(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 358 /* MergeDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 359 /* EndOfDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -100955,26 +101026,26 @@ return node; } switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -100997,24 +101068,24 @@ if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -101847,7 +101918,7 @@ } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 240 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 241 /* VariableStatement */) { const id = getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -101879,10 +101950,10 @@ const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration( statements, @@ -102053,14 +102124,14 @@ } function modifierVisitor(node) { switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return void 0; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -102098,11 +102169,11 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -102155,7 +102226,7 @@ return node; } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 308 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 309 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -102242,10 +102313,10 @@ context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableSubstitution(223 /* BinaryExpression */); - context.enableSubstitution(233 /* MetaProperty */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableSubstitution(224 /* BinaryExpression */); + context.enableSubstitution(234 /* MetaProperty */); + context.enableEmitNotification(309 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; const exportFunctionsMap = []; @@ -102433,7 +102504,7 @@ if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 275 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 276 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -102581,11 +102652,11 @@ for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -102608,7 +102679,7 @@ ); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -102703,13 +102774,13 @@ } function topLevelVisitor(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -102879,7 +102950,7 @@ } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 308 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 309 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -102916,7 +102987,7 @@ return isExportedDeclaration ? createExportExpression(name, preventSubstitution(setTextRange(factory2.createAssignment(name, value), location))) : preventSubstitution(setTextRange(factory2.createAssignment(name, value), location)); } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 240 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 241 /* VariableStatement */) { const id = getOriginalNodeId(node); const isExportedDeclaration = hasSyntacticModifier(node.original, 1 /* Export */); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -102954,10 +103025,10 @@ const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -103057,47 +103128,47 @@ } function topLevelNestedVisitor(node) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return visitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return visitWhileStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return visitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return visitCaseBlock(node); - case 292 /* CaseClause */: + case 293 /* CaseClause */: return visitCaseClause(node); - case 293 /* DefaultClause */: + case 294 /* DefaultClause */: return visitDefaultClause(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return visitTryStatement(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 238 /* Block */: + case 239 /* Block */: return visitBlock(node); - case 358 /* MergeDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 359 /* EndOfDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -103243,30 +103314,30 @@ return node; } switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -103339,7 +103410,7 @@ return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 308 /* SourceFile */; + return container !== void 0 && container.kind === 309 /* SourceFile */; } else { return false; } @@ -103376,14 +103447,14 @@ } function modifierVisitor(node) { switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return void 0; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -103417,7 +103488,7 @@ } function substituteUnspecified(node) { switch (node.kind) { - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -103461,9 +103532,9 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return substituteBinaryExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -103532,7 +103603,7 @@ /*prefixLocals*/ false ); - if (exportContainer && exportContainer.kind === 308 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 309 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); @@ -103565,7 +103636,7 @@ const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(308 /* SourceFile */); + context.enableEmitNotification(309 /* SourceFile */); context.enableSubstitution(79 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -103613,11 +103684,11 @@ } function visitor(node) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -103667,7 +103738,7 @@ /*typeArguments*/ void 0, [ - factory2.createPropertyAccessExpression(factory2.createMetaProperty(100 /* ImportKeyword */, factory2.createIdentifier("meta")), factory2.createIdentifier("url")) + factory2.createPropertyAccessExpression(factory2.createMetaProperty(101 /* ImportKeyword */, factory2.createIdentifier("meta")), factory2.createIdentifier("url")) ] ) ) @@ -103822,8 +103893,8 @@ const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(308 /* SourceFile */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(309 /* SourceFile */); + context.enableEmitNotification(309 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -103866,7 +103937,7 @@ return result; } function transformSourceFileOrBundle(node) { - return node.kind === 308 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 309 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -103896,7 +103967,7 @@ function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -103913,7 +103984,7 @@ function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; @@ -103944,12 +104015,12 @@ return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`); } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 170 /* PropertyDeclaration */ || node.kind === 209 /* PropertyAccessExpression */ || node.kind === 169 /* PropertySignature */ || node.kind === 167 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */ || node.kind === 166 /* Parameter */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */ || node.kind === 167 /* Parameter */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -103966,7 +104037,7 @@ } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 175 /* SetAccessor */) { + if (node.kind === 176 /* SetAccessor */) { if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1; } else { @@ -103988,26 +104059,26 @@ function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -104028,29 +104099,29 @@ } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 177 /* ConstructSignature */: - case 182 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 183 /* ConstructorType */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 176 /* CallSignature */: + case 177 /* CallSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node.parent)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 259 /* FunctionDeclaration */: - case 181 /* FunctionType */: + case 260 /* FunctionDeclaration */: + case 182 /* FunctionType */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1; default: return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`); @@ -104059,40 +104130,40 @@ function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 197 /* MappedType */: + case 198 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node.parent)) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 261 /* ClassDeclaration */) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 181 /* FunctionType */: - case 259 /* FunctionDeclaration */: + case 182 /* FunctionType */: + case 260 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 192 /* InferType */: + case 193 /* InferType */: diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; break; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -104107,7 +104178,7 @@ function getHeritageClauseVisibilityError() { let diagnosticMessage; if (isClassDeclaration(node.parent.parent)) { - diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 117 /* ImplementsKeyword */ ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 118 /* ImplementsKeyword */ ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; } @@ -104154,7 +104225,7 @@ } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 166 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 167 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -104386,10 +104457,10 @@ return result; } function transformRoot(node) { - if (node.kind === 308 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 309 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 309 /* Bundle */) { + if (node.kind === 310 /* Bundle */) { isBundledEmit = true; refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); @@ -104421,7 +104492,7 @@ const newFile = factory2.updateSourceFile( sourceFile, [factory2.createModuleDeclaration( - [factory2.createModifier(136 /* DeclareKeyword */)], + [factory2.createModifier(137 /* DeclareKeyword */)], factory2.createStringLiteral(getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), factory2.createModuleBlock(setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)) )], @@ -104456,7 +104527,7 @@ ); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 311 /* InputFiles */) { + if (prepend.kind === 312 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -104624,14 +104695,14 @@ if (name.kind === 79 /* Identifier */) { return name; } else { - if (name.kind === 204 /* ArrayBindingPattern */) { + if (name.kind === 205 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 229 /* OmittedExpression */) { + if (elem.kind === 230 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { @@ -104695,15 +104766,15 @@ if (shouldPrintWithInitializer(node)) { return; } - const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 167 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } if (!getParseTreeNode(node)) { - return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */); + return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(132 /* AnyKeyword */); } - if (node.kind === 175 /* SetAccessor */) { - return factory2.createKeywordTypeNode(131 /* AnyKeyword */); + if (node.kind === 176 /* SetAccessor */) { + return factory2.createKeywordTypeNode(132 /* AnyKeyword */); } errorNameNode = node.name; let oldDiag; @@ -104711,10 +104782,10 @@ oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 166 /* Parameter */ || node.kind === 169 /* PropertyDeclaration */ || node.kind === 168 /* PropertySignature */) { + if (node.kind === 167 /* Parameter */ || node.kind === 170 /* PropertyDeclaration */ || node.kind === 169 /* PropertySignature */) { if (isPropertySignature(node) || !node.initializer) return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); @@ -104725,27 +104796,27 @@ if (!suppressNewDiagnosticContexts) { getSymbolAccessibilityDiagnostic = oldDiag; } - return returnValue || factory2.createKeywordTypeNode(131 /* AnyKeyword */); + return returnValue || factory2.createKeywordTypeNode(132 /* AnyKeyword */); } } function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: return !resolver.isDeclarationVisible(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: return false; - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -104833,7 +104904,7 @@ function rewriteModuleSpecifier(parent, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 264 /* ModuleDeclaration */ && parent.kind !== 202 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 265 /* ModuleDeclaration */ && parent.kind !== 203 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent); @@ -104852,7 +104923,7 @@ function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 281 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -104889,7 +104960,7 @@ void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 272 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 @@ -104992,7 +105063,7 @@ const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 184 /* TypeLiteral */ || input.kind === 197 /* MappedType */) && input.parent.kind !== 262 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 185 /* TypeLiteral */ || input.kind === 198 /* MappedType */) && input.parent.kind !== 263 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -105020,26 +105091,26 @@ } if (isProcessedComponent(input)) { switch (input.kind) { - case 230 /* ExpressionWithTypeArguments */: { + case 231 /* ExpressionWithTypeArguments */: { if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) { checkEntityNameVisibility(input.expression, enclosingDeclaration); } const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); } - case 180 /* TypeReference */: { + case 181 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 173 /* Constructor */: { + case 174 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( /*modifiers*/ ensureModifiers(input), @@ -105049,7 +105120,7 @@ ); return cleanup(ctor); } - case 171 /* MethodDeclaration */: { + case 172 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105070,7 +105141,7 @@ ); return cleanup(sig); } - case 174 /* GetAccessor */: { + case 175 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105088,7 +105159,7 @@ void 0 )); } - case 175 /* SetAccessor */: { + case 176 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105104,7 +105175,7 @@ void 0 )); } - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105119,7 +105190,7 @@ ensureType(input, input.type), ensureNoInitializer(input) )); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105133,7 +105204,7 @@ input.questionToken, ensureType(input, input.type) )); - case 170 /* MethodSignature */: { + case 171 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105150,7 +105221,7 @@ ensureType(input, input.type) )); } - case 176 /* CallSignature */: { + case 177 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -105158,15 +105229,15 @@ ensureType(input, input.type) )); } - case 178 /* IndexSignature */: { + case 179 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), updateParamsList(input, input.parameters), - visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(132 /* AnyKeyword */) )); } - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -105181,7 +105252,7 @@ ensureNoInitializer(input) )); } - case 165 /* TypeParameter */: { + case 166 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration( input, @@ -105195,7 +105266,7 @@ } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 191 /* ConditionalType */: { + case 192 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); const oldEnclosingDecl = enclosingDeclaration; @@ -105209,13 +105280,13 @@ Debug.assert(falseType); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 181 /* FunctionType */: { + case 182 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 182 /* ConstructorType */: { + case 183 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 202 /* ImportType */: { + case 203 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -105255,7 +105326,7 @@ } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 171 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 172 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -105264,7 +105335,7 @@ if (shouldStripInternal(input)) return; switch (input.kind) { - case 275 /* ExportDeclaration */: { + case 276 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -105278,7 +105349,7 @@ getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -105301,7 +105372,7 @@ void 0 ); errorFallbackNode = void 0; - const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(136 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); + const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(137 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); preserveJsDoc(statement, input); removeAllComments(input); return [statement, factory2.updateExportAssignment(input, input.modifiers, newId)]; @@ -105327,10 +105398,10 @@ if (shouldStripInternal(input)) return; switch (input.kind) { - case 268 /* ImportEqualsDeclaration */: { + case 269 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 269 /* ImportDeclaration */: { + case 270 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -105350,7 +105421,7 @@ } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 262 /* TypeAliasDeclaration */: { + case 263 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -105362,7 +105433,7 @@ needsDeclare = previousNeedsDeclare; return clean2; } - case 261 /* InterfaceDeclaration */: { + case 262 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -105372,7 +105443,7 @@ visitNodes2(input.members, visitDeclarationSubtree, isTypeElement) )); } - case 259 /* FunctionDeclaration */: { + case 260 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -105419,7 +105490,7 @@ /*initializer*/ void 0 ); - return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(93 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); + return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(94 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); }); if (!exportMappings.length) { declarations = mapDefined(declarations, (declaration) => factory2.updateModifiers(declaration, 0 /* None */)); @@ -105478,10 +105549,10 @@ return clean2; } } - case 264 /* ModuleDeclaration */: { + case 265 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 265 /* ModuleBlock */) { + if (inner && inner.kind === 266 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; @@ -105525,7 +105596,7 @@ )); } } - case 260 /* ClassDeclaration */: { + case 261 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -105594,7 +105665,7 @@ const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement)); const members = factory2.createNodeArray(memberNodes); const extendsClause = getEffectiveBaseTypeNode(input); - if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) { + if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 105 /* NullKeyword */) { const oldId = input.name ? unescapeLeadingUnderscores(input.name.escapedText) : "default"; const newId = factory2.createUniqueName(`${oldId}_base`, 16 /* Optimistic */); getSymbolAccessibilityDiagnostic = () => ({ @@ -105610,16 +105681,16 @@ /*initializer*/ void 0 ); - const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(136 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); + const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(137 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); const heritageClauses = factory2.createNodeArray(map(input.heritageClauses, (clause) => { - if (clause.token === 94 /* ExtendsKeyword */) { + if (clause.token === 95 /* ExtendsKeyword */) { const oldDiag2 = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]); const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode)))); getSymbolAccessibilityDiagnostic = oldDiag2; return newClause; } - return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); + return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 105 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); })); return [statement, cleanup(factory2.updateClassDeclaration( input, @@ -105641,10 +105712,10 @@ )); } } - case 240 /* VariableStatement */: { + case 241 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 263 /* EnumDeclaration */: { + case 264 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -105661,7 +105732,7 @@ if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 264 /* ModuleDeclaration */) { + if (input.kind === 265 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -105684,7 +105755,7 @@ return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 229 /* OmittedExpression */) { + if (e.kind === 230 /* OmittedExpression */) { return; } if (e.name) { @@ -105744,7 +105815,7 @@ function ensureModifierFlags(node) { let mask = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; - const parentIsFile = node.parent.kind === 308 /* SourceFile */; + const parentIsFile = node.parent.kind === 309 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask ^= 2 /* Ambient */; additions = 0 /* None */; @@ -105765,12 +105836,12 @@ } function transformHeritageClauses(nodes) { return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => { - return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */; + return isEntityNameExpression(t.expression) || clause.token === 95 /* ExtendsKeyword */ && t.expression.kind === 105 /* NullKeyword */; })), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length)); } } function isAlwaysType(node) { - if (node.kind === 261 /* InterfaceDeclaration */) { + if (node.kind === 262 /* InterfaceDeclaration */) { return true; } return false; @@ -105790,57 +105861,57 @@ } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 174 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 175 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 166 /* Parameter */: - case 257 /* VariableDeclaration */: + case 167 /* Parameter */: + case 258 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 240 /* VariableStatement */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 241 /* VariableStatement */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 177 /* ConstructSignature */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 178 /* IndexSignature */: - case 257 /* VariableDeclaration */: - case 165 /* TypeParameter */: - case 230 /* ExpressionWithTypeArguments */: - case 180 /* TypeReference */: - case 191 /* ConditionalType */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 202 /* ImportType */: + case 178 /* ConstructSignature */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 179 /* IndexSignature */: + case 258 /* VariableDeclaration */: + case 166 /* TypeParameter */: + case 231 /* ExpressionWithTypeArguments */: + case 181 /* TypeReference */: + case 192 /* ConditionalType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 203 /* ImportType */: return true; } return false; @@ -105949,7 +106020,7 @@ } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a2, _b; - const enabledSyntaxKindFeatures = new Array(361 /* Count */); + const enabledSyntaxKindFeatures = new Array(362 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -106028,7 +106099,7 @@ state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 308 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); + (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 309 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); (_b = tracing) == null ? void 0 : _b.pop(); } @@ -106348,7 +106419,7 @@ } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 309 /* Bundle */) { + if (sourceFile.kind === 310 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -106729,8 +106800,8 @@ } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform, printer, mapOptions) { const sourceFileOrBundle = transform.transformed[0]; - const bundle = sourceFileOrBundle.kind === 309 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 308 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 310 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 309 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -106792,7 +106863,7 @@ writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 308 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 309 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -107161,11 +107232,11 @@ break; } switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return printFile(node); - case 309 /* Bundle */: + case 310 /* Bundle */: return printBundle(node); - case 310 /* UnparsedSource */: + case 311 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -107544,301 +107615,301 @@ return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return emitQualifiedName(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return emitTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return emitParameter(node); - case 167 /* Decorator */: + case 168 /* Decorator */: return emitDecorator(node); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return emitPropertySignature(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 170 /* MethodSignature */: + case 171 /* MethodSignature */: return emitMethodSignature(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return emitConstructor(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return emitAccessorDeclaration(node); - case 176 /* CallSignature */: + case 177 /* CallSignature */: return emitCallSignature(node); - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return emitConstructSignature(node); - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return emitIndexSignature(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return emitTypePredicate(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return emitTypeReference(node); - case 181 /* FunctionType */: + case 182 /* FunctionType */: return emitFunctionType(node); - case 182 /* ConstructorType */: + case 183 /* ConstructorType */: return emitConstructorType(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return emitTypeQuery(node); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return emitTypeLiteral(node); - case 185 /* ArrayType */: + case 186 /* ArrayType */: return emitArrayType(node); - case 186 /* TupleType */: + case 187 /* TupleType */: return emitTupleType(node); - case 187 /* OptionalType */: + case 188 /* OptionalType */: return emitOptionalType(node); - case 189 /* UnionType */: + case 190 /* UnionType */: return emitUnionType(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return emitIntersectionType(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return emitConditionalType(node); - case 192 /* InferType */: + case 193 /* InferType */: return emitInferType(node); - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return emitParenthesizedType(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 194 /* ThisType */: + case 195 /* ThisType */: return emitThisType(); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return emitTypeOperator(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return emitMappedType(node); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return emitLiteralType(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return emitTemplateType(node); - case 201 /* TemplateLiteralTypeSpan */: + case 202 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return emitImportTypeNode(node); - case 203 /* ObjectBindingPattern */: + case 204 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return emitBindingElement(node); - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return emitTemplateSpan(node); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 238 /* Block */: + case 239 /* Block */: return emitBlock(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return emitVariableStatement(node); - case 239 /* EmptyStatement */: + case 240 /* EmptyStatement */: return emitEmptyStatement( /*isEmbeddedStatement*/ false ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return emitExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return emitIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return emitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return emitWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return emitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return emitForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return emitForOfStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return emitContinueStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return emitBreakStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return emitReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return emitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return emitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return emitLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return emitThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return emitTryStatement(node); - case 256 /* DebuggerStatement */: + case 257 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return emitClassDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return emitModuleBlock(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return emitCaseBlock(node); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return emitImportDeclaration(node); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return emitImportClause(node); - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return emitNamespaceImport(node); - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return emitNamespaceExport(node); - case 272 /* NamedImports */: + case 273 /* NamedImports */: return emitNamedImports(node); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return emitImportSpecifier(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return emitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return emitExportDeclaration(node); - case 276 /* NamedExports */: + case 277 /* NamedExports */: return emitNamedExports(node); - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return emitExportSpecifier(node); - case 296 /* AssertClause */: + case 297 /* AssertClause */: return emitAssertClause(node); - case 297 /* AssertEntry */: + case 298 /* AssertEntry */: return emitAssertEntry(node); - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return; - case 280 /* ExternalModuleReference */: + case 281 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 11 /* JsxText */: return emitJsxText(node); - case 283 /* JsxOpeningElement */: - case 286 /* JsxOpeningFragment */: + case 284 /* JsxOpeningElement */: + case 287 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 284 /* JsxClosingElement */: - case 287 /* JsxClosingFragment */: + case 285 /* JsxClosingElement */: + case 288 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return emitJsxAttribute(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return emitJsxAttributes(node); - case 290 /* JsxSpreadAttribute */: + case 291 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return emitJsxExpression(node); - case 292 /* CaseClause */: + case 293 /* CaseClause */: return emitCaseClause(node); - case 293 /* DefaultClause */: + case 294 /* DefaultClause */: return emitDefaultClause(node); - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return emitHeritageClause(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return emitCatchClause(node); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 302 /* EnumMember */: + case 303 /* EnumMember */: return emitEnumMember(node); - case 303 /* UnparsedPrologue */: + case 304 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 310 /* UnparsedSource */: - case 304 /* UnparsedPrepend */: + case 311 /* UnparsedSource */: + case 305 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 305 /* UnparsedText */: - case 306 /* UnparsedInternalText */: + case 306 /* UnparsedText */: + case 307 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 307 /* UnparsedSyntheticReference */: + case 308 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 308 /* SourceFile */: + case 309 /* SourceFile */: return emitSourceFile(node); - case 309 /* Bundle */: + case 310 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 311 /* InputFiles */: + case 312 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 312 /* JSDocTypeExpression */: + case 313 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 313 /* JSDocNameReference */: + case 314 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 315 /* JSDocAllType */: + case 316 /* JSDocAllType */: return writePunctuation("*"); - case 316 /* JSDocUnknownType */: + case 317 /* JSDocUnknownType */: return writePunctuation("?"); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 318 /* JSDocNonNullableType */: + case 319 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 188 /* RestType */: - case 321 /* JSDocVariadicType */: + case 189 /* RestType */: + case 322 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 322 /* JSDocNamepathType */: + case 323 /* JSDocNamepathType */: return; - case 323 /* JSDoc */: + case 324 /* JSDoc */: return emitJSDoc(node); - case 325 /* JSDocTypeLiteral */: + case 326 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 326 /* JSDocSignature */: + case 327 /* JSDocSignature */: return emitJSDocSignature(node); - case 330 /* JSDocTag */: - case 335 /* JSDocClassTag */: - case 340 /* JSDocOverrideTag */: + case 331 /* JSDocTag */: + case 336 /* JSDocClassTag */: + case 341 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 331 /* JSDocAugmentsTag */: - case 332 /* JSDocImplementsTag */: + case 332 /* JSDocAugmentsTag */: + case 333 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 333 /* JSDocAuthorTag */: - case 334 /* JSDocDeprecatedTag */: + case 334 /* JSDocAuthorTag */: + case 335 /* JSDocDeprecatedTag */: return; - case 336 /* JSDocPublicTag */: - case 337 /* JSDocPrivateTag */: - case 338 /* JSDocProtectedTag */: - case 339 /* JSDocReadonlyTag */: + case 337 /* JSDocPublicTag */: + case 338 /* JSDocPrivateTag */: + case 339 /* JSDocProtectedTag */: + case 340 /* JSDocReadonlyTag */: return; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return emitJSDocOverloadTag(node); - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 343 /* JSDocEnumTag */: - case 345 /* JSDocReturnTag */: - case 346 /* JSDocThisTag */: - case 347 /* JSDocTypeTag */: - case 352 /* JSDocThrowsTag */: - case 353 /* JSDocSatisfiesTag */: + case 344 /* JSDocEnumTag */: + case 346 /* JSDocReturnTag */: + case 347 /* JSDocThisTag */: + case 348 /* JSDocTypeTag */: + case 353 /* JSDocThrowsTag */: + case 354 /* JSDocSatisfiesTag */: return emitJSDocSimpleTypedTag(node); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 350 /* JSDocSeeTag */: + case 351 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 355 /* NotEmittedStatement */: - case 359 /* EndOfDeclarationMarker */: - case 358 /* MergeDeclarationMarker */: + case 356 /* NotEmittedStatement */: + case 360 /* EndOfDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return; } if (isExpression(node)) { @@ -107871,86 +107942,86 @@ return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return emitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return emitNewExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return emitFunctionExpression(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return emitArrowFunction(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return emitDeleteExpression(node); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return emitVoidExpression(node); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return emitAwaitExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return emitBinaryExpression(node); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return emitConditionalExpression(node); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return emitTemplateExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return emitYieldExpression(node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return emitSpreadElement(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return emitClassExpression(node); - case 229 /* OmittedExpression */: + case 230 /* OmittedExpression */: return; - case 231 /* AsExpression */: + case 232 /* AsExpression */: return emitAsExpression(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return emitNonNullExpression(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return emitMetaProperty(node); - case 234 /* SyntheticExpression */: + case 235 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return; - case 281 /* JsxElement */: + case 282 /* JsxElement */: return emitJsxElement(node); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return emitJsxFragment(node); - case 354 /* SyntaxList */: + case 355 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 355 /* NotEmittedStatement */: + case 356 /* NotEmittedStatement */: return; - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return emitCommaList(node); - case 358 /* MergeDeclarationMarker */: - case 359 /* EndOfDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return; - case 360 /* SyntheticReferenceExpression */: + case 361 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -107996,7 +108067,7 @@ } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 309 /* Bundle */ ? node : void 0; + const bundle = node.kind === 310 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -108071,7 +108142,7 @@ updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 305 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 306 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -108107,7 +108178,7 @@ } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 239 /* EmptyStatement */, + node.kind === 240 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -108179,7 +108250,7 @@ emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 320 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 321 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -108255,7 +108326,7 @@ /*allowDecorators*/ true ); - const token = node.kind === 174 /* GetAccessor */ ? 137 /* GetKeyword */ : 151 /* SetKeyword */; + const token = node.kind === 175 /* GetAccessor */ ? 138 /* GetKeyword */ : 152 /* SetKeyword */; emitTokenWithComment(token, pos, writeKeyword, node); writeSpace(); emit(node.name); @@ -108437,7 +108508,7 @@ function emitTypeOperator(node) { writeTokenText(node.operator, writeKeyword); writeSpace(); - const parenthesizerRule = node.operator === 146 /* ReadonlyKeyword */ ? parenthesizer.parenthesizeOperandOfReadonlyTypeOperator : parenthesizer.parenthesizeOperandOfTypeOperator; + const parenthesizerRule = node.operator === 147 /* ReadonlyKeyword */ ? parenthesizer.parenthesizeOperandOfReadonlyTypeOperator : parenthesizer.parenthesizeOperandOfTypeOperator; emit(node.type, parenthesizerRule); } function emitIndexedAccessType(node) { @@ -108457,7 +108528,7 @@ } if (node.readonlyToken) { emit(node.readonlyToken); - if (node.readonlyToken.kind !== 146 /* ReadonlyKeyword */) { + if (node.readonlyToken.kind !== 147 /* ReadonlyKeyword */) { writeKeyword("readonly"); } writeSpace(); @@ -108636,7 +108707,7 @@ emitExpressionList(node, node.arguments, 2576 /* CallExpressionArguments */, parenthesizer.parenthesizeExpressionForDisallowedComma); } function emitNewExpression(node) { - emitTokenWithComment(103 /* NewKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(104 /* NewKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfNew); emitTypeArguments(node, node.typeArguments); @@ -108692,22 +108763,22 @@ emit(node.equalsGreaterThanToken); } function emitDeleteExpression(node) { - emitTokenWithComment(89 /* DeleteKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(90 /* DeleteKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitTypeOfExpression(node) { - emitTokenWithComment(112 /* TypeOfKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(113 /* TypeOfKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitVoidExpression(node) { - emitTokenWithComment(114 /* VoidKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(115 /* VoidKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitAwaitExpression(node) { - emitTokenWithComment(133 /* AwaitKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(134 /* AwaitKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } @@ -108720,7 +108791,7 @@ } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 221 /* PrefixUnaryExpression */ && (node.operator === 39 /* PlusToken */ && (operand.operator === 39 /* PlusToken */ || operand.operator === 45 /* PlusPlusToken */) || node.operator === 40 /* MinusToken */ && (operand.operator === 40 /* MinusToken */ || operand.operator === 46 /* MinusMinusToken */)); + return operand.kind === 222 /* PrefixUnaryExpression */ && (node.operator === 39 /* PlusToken */ && (operand.operator === 39 /* PlusToken */ || operand.operator === 45 /* PlusPlusToken */) || node.operator === 40 /* MinusToken */ && (operand.operator === 40 /* MinusToken */ || operand.operator === 46 /* MinusMinusToken */)); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary); @@ -108773,7 +108844,7 @@ const linesAfterOperator = getLinesBetweenNodes(node, operatorToken, node.right); writeLinesAndIndent(linesBeforeOperator, isCommaOperator); emitLeadingCommentsOfPosition(operatorToken.pos); - writeTokenNode(operatorToken, operatorToken.kind === 101 /* InKeyword */ ? writeKeyword : writeOperator); + writeTokenNode(operatorToken, operatorToken.kind === 102 /* InKeyword */ ? writeKeyword : writeOperator); emitTrailingCommentsOfPosition( operatorToken.end, /*prefixSpace*/ @@ -108864,7 +108935,7 @@ emitList(node, node.templateSpans, 262144 /* TemplateExpressionSpans */); } function emitYieldExpression(node) { - emitTokenWithComment(125 /* YieldKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(126 /* YieldKeyword */, node.pos, writeKeyword, node); emit(node.asteriskToken); emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsiAndDisallowedComma); } @@ -108970,7 +109041,7 @@ } } function emitIfStatement(node) { - const openParenPos = emitTokenWithComment(99 /* IfKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(100 /* IfKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -108978,8 +109049,8 @@ emitEmbeddedStatement(node, node.thenStatement); if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); - emitTokenWithComment(91 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 242 /* IfStatement */) { + emitTokenWithComment(92 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); + if (node.elseStatement.kind === 243 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -108988,14 +109059,14 @@ } } function emitWhileClause(node, startPos) { - const openParenPos = emitTokenWithComment(115 /* WhileKeyword */, startPos, writeKeyword, node); + const openParenPos = emitTokenWithComment(116 /* WhileKeyword */, startPos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); } function emitDoStatement(node) { - emitTokenWithComment(90 /* DoKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(91 /* DoKeyword */, node.pos, writeKeyword, node); emitEmbeddedStatement(node, node.statement); if (isBlock(node.statement) && !preserveSourceNewlines) { writeSpace(); @@ -109010,7 +109081,7 @@ emitEmbeddedStatement(node, node.statement); } function emitForStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); let pos = emitTokenWithComment( 20 /* OpenParenToken */, @@ -109028,25 +109099,25 @@ emitEmbeddedStatement(node, node.statement); } function emitForInStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(101 /* InKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(102 /* InKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); emitEmbeddedStatement(node, node.statement); } function emitForOfStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); emitWithTrailingSpace(node.awaitModifier); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(162 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(163 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -109054,7 +109125,7 @@ } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 258 /* VariableDeclarationList */) { + if (node.kind === 259 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -109062,12 +109133,12 @@ } } function emitContinueStatement(node) { - emitTokenWithComment(86 /* ContinueKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(87 /* ContinueKeyword */, node.pos, writeKeyword, node); emitWithLeadingSpace(node.label); writeTrailingSemicolon(); } function emitBreakStatement(node) { - emitTokenWithComment(81 /* BreakKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(82 /* BreakKeyword */, node.pos, writeKeyword, node); emitWithLeadingSpace(node.label); writeTrailingSemicolon(); } @@ -109090,7 +109161,7 @@ } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 291 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 292 /* JsxExpression */; emitTrailingCommentsOfPosition( pos, /*prefixSpace*/ @@ -109138,7 +109209,7 @@ } function emitReturnStatement(node) { emitTokenWithComment( - 105 /* ReturnKeyword */, + 106 /* ReturnKeyword */, node.pos, writeKeyword, /*contextNode*/ @@ -109148,7 +109219,7 @@ writeTrailingSemicolon(); } function emitWithStatement(node) { - const openParenPos = emitTokenWithComment(116 /* WithKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(117 /* WithKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -109156,7 +109227,7 @@ emitEmbeddedStatement(node, node.statement); } function emitSwitchStatement(node) { - const openParenPos = emitTokenWithComment(107 /* SwitchKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(108 /* SwitchKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -109171,12 +109242,12 @@ emit(node.statement); } function emitThrowStatement(node) { - emitTokenWithComment(109 /* ThrowKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(110 /* ThrowKeyword */, node.pos, writeKeyword, node); emitExpressionWithLeadingSpace(parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi); writeTrailingSemicolon(); } function emitTryStatement(node) { - emitTokenWithComment(111 /* TryKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(112 /* TryKeyword */, node.pos, writeKeyword, node); writeSpace(); emit(node.tryBlock); if (node.catchClause) { @@ -109185,13 +109256,13 @@ } if (node.finallyBlock) { writeLineOrSpace(node, node.catchClause || node.tryBlock, node.finallyBlock); - emitTokenWithComment(96 /* FinallyKeyword */, (node.catchClause || node.tryBlock).end, writeKeyword, node); + emitTokenWithComment(97 /* FinallyKeyword */, (node.catchClause || node.tryBlock).end, writeKeyword, node); writeSpace(); emit(node.finallyBlock); } } function emitDebuggerStatement(node) { - writeToken(87 /* DebuggerKeyword */, node.pos, writeKeyword); + writeToken(88 /* DebuggerKeyword */, node.pos, writeKeyword); writeTrailingSemicolon(); } function emitVariableDeclaration(node) { @@ -109329,7 +109400,7 @@ /*allowDecorators*/ true ); - emitTokenWithComment(84 /* ClassKeyword */, moveRangePastModifiers(node).pos, writeKeyword, node); + emitTokenWithComment(85 /* ClassKeyword */, moveRangePastModifiers(node).pos, writeKeyword, node); if (node.name) { writeSpace(); emitIdentifierName(node.name); @@ -109456,10 +109527,10 @@ /*allowDecorators*/ false ); - emitTokenWithComment(100 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); + emitTokenWithComment(101 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); writeSpace(); if (node.isTypeOnly) { - emitTokenWithComment(154 /* TypeKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(155 /* TypeKeyword */, node.pos, writeKeyword, node); writeSpace(); } emit(node.name); @@ -109483,12 +109554,12 @@ /*allowDecorators*/ false ); - emitTokenWithComment(100 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); + emitTokenWithComment(101 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); writeSpace(); if (node.importClause) { emit(node.importClause); writeSpace(); - emitTokenWithComment(158 /* FromKeyword */, node.importClause.end, writeKeyword, node); + emitTokenWithComment(159 /* FromKeyword */, node.importClause.end, writeKeyword, node); writeSpace(); } emitExpression(node.moduleSpecifier); @@ -109499,7 +109570,7 @@ } function emitImportClause(node) { if (node.isTypeOnly) { - emitTokenWithComment(154 /* TypeKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(155 /* TypeKeyword */, node.pos, writeKeyword, node); writeSpace(); } emit(node.name); @@ -109512,7 +109583,7 @@ function emitNamespaceImport(node) { const asPos = emitTokenWithComment(41 /* AsteriskToken */, node.pos, writePunctuation, node); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, asPos, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, asPos, writeKeyword, node); writeSpace(); emit(node.name); } @@ -109523,12 +109594,12 @@ emitImportOrExportSpecifier(node); } function emitExportAssignment(node) { - const nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + const nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.isExportEquals) { emitTokenWithComment(63 /* EqualsToken */, nextPos, writeOperator, node); } else { - emitTokenWithComment(88 /* DefaultKeyword */, nextPos, writeKeyword, node); + emitTokenWithComment(89 /* DefaultKeyword */, nextPos, writeKeyword, node); } writeSpace(); emitExpression(node.expression, node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(63 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault); @@ -109541,10 +109612,10 @@ /*allowDecorators*/ false ); - let nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + let nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.isTypeOnly) { - nextPos = emitTokenWithComment(154 /* TypeKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(155 /* TypeKeyword */, nextPos, writeKeyword, node); writeSpace(); } if (node.exportClause) { @@ -109555,7 +109626,7 @@ if (node.moduleSpecifier) { writeSpace(); const fromPos = node.exportClause ? node.exportClause.end : nextPos; - emitTokenWithComment(158 /* FromKeyword */, fromPos, writeKeyword, node); + emitTokenWithComment(159 /* FromKeyword */, fromPos, writeKeyword, node); writeSpace(); emitExpression(node.moduleSpecifier); } @@ -109565,7 +109636,7 @@ writeTrailingSemicolon(); } function emitAssertClause(node) { - emitTokenWithComment(130 /* AssertKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(131 /* AssertKeyword */, node.pos, writeKeyword, node); writeSpace(); const elements = node.elements; emitList(node, elements, 526226 /* ImportClauseEntries */); @@ -109582,11 +109653,11 @@ emit(value); } function emitNamespaceExportDeclaration(node) { - let nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + let nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); - nextPos = emitTokenWithComment(128 /* AsKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(129 /* AsKeyword */, nextPos, writeKeyword, node); writeSpace(); - nextPos = emitTokenWithComment(143 /* NamespaceKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(144 /* NamespaceKeyword */, nextPos, writeKeyword, node); writeSpace(); emit(node.name); writeTrailingSemicolon(); @@ -109594,7 +109665,7 @@ function emitNamespaceExport(node) { const asPos = emitTokenWithComment(41 /* AsteriskToken */, node.pos, writePunctuation, node); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, asPos, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, asPos, writeKeyword, node); writeSpace(); emit(node.name); } @@ -109617,7 +109688,7 @@ if (node.propertyName) { emit(node.propertyName); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, node.propertyName.end, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, node.propertyName.end, writeKeyword, node); writeSpace(); } emit(node.name); @@ -109720,13 +109791,13 @@ } } function emitCaseClause(node) { - emitTokenWithComment(82 /* CaseKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(83 /* CaseKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma); emitCaseOrDefaultClauseRest(node, node.statements, node.expression.end); } function emitDefaultClause(node) { - const pos = emitTokenWithComment(88 /* DefaultKeyword */, node.pos, writeKeyword, node); + const pos = emitTokenWithComment(89 /* DefaultKeyword */, node.pos, writeKeyword, node); emitCaseOrDefaultClauseRest(node, node.statements, pos); } function emitCaseOrDefaultClauseRest(parentNode, statements, colonPos) { @@ -109749,7 +109820,7 @@ emitList(node, node.types, 528 /* HeritageClauseTypes */); } function emitCatchClause(node) { - const openParenPos = emitTokenWithComment(83 /* CatchKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(84 /* CatchKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.variableDeclaration) { emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); @@ -109805,7 +109876,7 @@ } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 347 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 348 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -109849,7 +109920,7 @@ function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 312 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 313 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -109867,7 +109938,7 @@ emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 325 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 326 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -110750,7 +110821,7 @@ return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 214 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 215 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -110833,84 +110904,84 @@ if (!node) return; switch (node.kind) { - case 238 /* Block */: + case 239 /* Block */: forEach(node.statements, generateNames); break; - case 253 /* LabeledStatement */: - case 251 /* WithStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 254 /* LabeledStatement */: + case 252 /* WithStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: generateNames(node.statement); break; - case 242 /* IfStatement */: + case 243 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 295 /* CatchClause */: + case 296 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: generateNames(node.declarationList); break; - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: generateNames(node.importClause); break; - case 270 /* ImportClause */: + case 271 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: forEach(node.elements, generateNames); break; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -110919,12 +110990,12 @@ if (!node) return; switch (node.kind) { - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -111183,16 +111254,16 @@ prefix, suffix ); - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: { + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: { Debug.assert(!prefix && !suffix && !privateName); const name = node.name; if (name && !isGeneratedIdentifier(name)) { @@ -111207,17 +111278,17 @@ } return generateNameForExportDefault(); } - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return makeTempVariableName( 0 /* Auto */, /*reserveInNestedScopes*/ @@ -111311,7 +111382,7 @@ emitLeadingComments( pos, /*isEmittedNode*/ - node.kind !== 355 /* NotEmittedStatement */ + node.kind !== 356 /* NotEmittedStatement */ ); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) { @@ -111319,7 +111390,7 @@ } if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 258 /* VariableDeclarationList */) { + if (node.kind === 259 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -111335,7 +111406,7 @@ containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 356 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -111607,7 +111678,7 @@ } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 356 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 128 /* NoNestedSourceMaps */) { @@ -111622,7 +111693,7 @@ if (emitFlags & 128 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 356 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -112954,6 +113025,7 @@ const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions; const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion2 } = createProgramOptions; let { oldProgram } = createProgramOptions; + const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations)); let processingDefaultLibFiles; let processingOtherFiles; let files; @@ -114087,89 +114159,89 @@ return diagnostics; function walk(node, parent) { switch (parent.kind) { - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 257 /* VariableDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 258 /* VariableDeclaration */: if (parent.type === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); return "skip"; } } switch (node.kind) { - case 270 /* ImportClause */: + case 271 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? "import...type" : "export...type")); return "skip"; } break; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: const heritageClause = node; - if (heritageClause.token === 117 /* ImplementsKeyword */) { + if (heritageClause.token === 118 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 261 /* InterfaceDeclaration */: - const interfaceKeyword = tokenToString(118 /* InterfaceKeyword */); + case 262 /* InterfaceDeclaration */: + const interfaceKeyword = tokenToString(119 /* InterfaceKeyword */); Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); return "skip"; - case 264 /* ModuleDeclaration */: - const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(143 /* NamespaceKeyword */) : tokenToString(142 /* ModuleKeyword */); + case 265 /* ModuleDeclaration */: + const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(144 /* NamespaceKeyword */) : tokenToString(143 /* ModuleKeyword */); Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); return "skip"; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 263 /* EnumDeclaration */: - const enumKeyword = Debug.checkDefined(tokenToString(92 /* EnumKeyword */)); + case 264 /* EnumDeclaration */: + const enumKeyword = Debug.checkDefined(tokenToString(93 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); return "skip"; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 231 /* AsExpression */: + case 232 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: Debug.fail(); } } @@ -114204,47 +114276,47 @@ } } switch (parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (nodes === parent.modifiers) { - checkModifiers(parent.modifiers, parent.kind === 240 /* VariableStatement */); + checkModifiers(parent.modifiers, parent.kind === 241 /* VariableStatement */); return "skip"; } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (nodes === parent.modifiers) { for (const modifier of nodes) { - if (isModifier(modifier) && modifier.kind !== 124 /* StaticKeyword */ && modifier.kind !== 127 /* AccessorKeyword */) { + if (isModifier(modifier) && modifier.kind !== 125 /* StaticKeyword */ && modifier.kind !== 128 /* AccessorKeyword */) { diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); } } return "skip"; } break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (nodes === parent.modifiers && some(nodes, isModifier)) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: - case 212 /* TaggedTemplateExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 213 /* TaggedTemplateExpression */: if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -114255,25 +114327,25 @@ function checkModifiers(modifiers, isConstValid) { for (const modifier of modifiers) { switch (modifier.kind) { - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: if (isConstValid) { continue; } - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 136 /* DeclareKeyword */: - case 126 /* AbstractKeyword */: - case 161 /* OverrideKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 137 /* DeclareKeyword */: + case 127 /* AbstractKeyword */: + case 162 /* OverrideKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); break; - case 124 /* StaticKeyword */: - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: - case 127 /* AccessorKeyword */: + case 125 /* StaticKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: + case 128 /* AccessorKeyword */: } } } @@ -115380,127 +115452,131 @@ } } } - function getVersionForDeprecationDiagnostics(reportInvalidIgnoreDeprecations) { - const version2 = typeScriptVersion2 || versionMajorMinor; + function getIgnoreDeprecationsVersion() { const ignoreDeprecations = options.ignoreDeprecations; if (ignoreDeprecations) { - if (ignoreDeprecations === "5.0" /* v5_0 */ && version2.startsWith("5.")) { - return; - } else if (reportInvalidIgnoreDeprecations) { - createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations); + if (ignoreDeprecations === "5.0") { + return new Version(ignoreDeprecations); } + reportInvalidIgnoreDeprecations(); } - return version2; + return Version.zero; } - function verifyDeprecatedCompilerOptions() { - const version2 = getVersionForDeprecationDiagnostics( - /*reportInvalidIgnoreDeprecations*/ - true - ); - if (!version2) - return; - if (options.target === 0 /* ES3 */) { - createDeprecatedDiagnosticForOption(version2, "target", "ES3"); + function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn) { + const deprecatedInVersion = new Version(deprecatedIn); + const removedInVersion = new Version(removedIn); + const typescriptVersion = new Version(typeScriptVersion2 || versionMajorMinor); + const ignoreDeprecationsVersion = getIgnoreDeprecationsVersion(); + const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */); + const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1 /* LessThan */; + if (mustBeRemoved || canBeSilenced) { + fn((name, value, useInstead) => { + if (mustBeRemoved) { + if (value === void 0) { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name); + } else { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value); + } + } else { + if (value === void 0) { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn); + } else { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn); + } + } + }); } - if (options.noImplicitUseStrict) { - createDeprecatedDiagnosticForOption(version2, "noImplicitUseStrict"); - } - if (options.keyofStringsOnly) { - createDeprecatedDiagnosticForOption(version2, "keyofStringsOnly"); - } - if (options.suppressExcessPropertyErrors) { - createDeprecatedDiagnosticForOption(version2, "suppressExcessPropertyErrors"); - } - if (options.suppressImplicitAnyIndexErrors) { - createDeprecatedDiagnosticForOption(version2, "suppressImplicitAnyIndexErrors"); - } - if (options.noStrictGenericChecks) { - createDeprecatedDiagnosticForOption(version2, "noStrictGenericChecks"); - } - if (options.charset) { - createDeprecatedDiagnosticForOption(version2, "charset"); - } - if (options.out) { - createDeprecatedDiagnosticForOption(version2, "out"); - } - if (options.importsNotUsedAsValues) { - createDeprecatedDiagnosticForOption( - version2, - "importsNotUsedAsValues", - /*value*/ - void 0, - "verbatimModuleSyntax" - ); - } - if (options.preserveValueImports) { - createDeprecatedDiagnosticForOption( - version2, - "preserveValueImports", - /*value*/ - void 0, - "verbatimModuleSyntax" - ); - } } - function verifyDeprecatedProjectReference(ref, parentFile, index) { - if (ref.prepend) { - const version2 = getVersionForDeprecationDiagnostics( - /*reportInvalidIgnoreDeprecations*/ - false - ); - if (version2) { - createDeprecatedOptionForVersionDiagnostic( - version2, - (message, arg0, arg1, arg2) => createDiagnosticForReference(parentFile, index, message, arg0, arg1, arg2), - "prepend" + function verifyDeprecatedCompilerOptions() { + function createDiagnostic(name, value, useInstead, message, arg0, arg1, arg2, arg3) { + if (useInstead) { + const details = chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.Use_0_instead, + useInstead ); + const chain = chainDiagnosticMessages(details, message, arg0, arg1, arg2, arg3); + createDiagnosticForOption( + /*onKey*/ + !value, + name, + /*option2*/ + void 0, + chain + ); + } else { + createDiagnosticForOption( + /*onKey*/ + !value, + name, + /*option2*/ + void 0, + message, + arg0, + arg1, + arg2, + arg3 + ); } } + checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { + if (options.target === 0 /* ES3 */) { + createDeprecatedDiagnostic("target", "ES3"); + } + if (options.noImplicitUseStrict) { + createDeprecatedDiagnostic("noImplicitUseStrict"); + } + if (options.keyofStringsOnly) { + createDeprecatedDiagnostic("keyofStringsOnly"); + } + if (options.suppressExcessPropertyErrors) { + createDeprecatedDiagnostic("suppressExcessPropertyErrors"); + } + if (options.suppressImplicitAnyIndexErrors) { + createDeprecatedDiagnostic("suppressImplicitAnyIndexErrors"); + } + if (options.noStrictGenericChecks) { + createDeprecatedDiagnostic("noStrictGenericChecks"); + } + if (options.charset) { + createDeprecatedDiagnostic("charset"); + } + if (options.out) { + createDeprecatedDiagnostic( + "out", + /*value*/ + void 0, + "outFile" + ); + } + if (options.importsNotUsedAsValues) { + createDeprecatedDiagnostic( + "importsNotUsedAsValues", + /*value*/ + void 0, + "verbatimModuleSyntax" + ); + } + if (options.preserveValueImports) { + createDeprecatedDiagnostic( + "preserveValueImports", + /*value*/ + void 0, + "verbatimModuleSyntax" + ); + } + }); } - function createDeprecatedDiagnosticForOption(version2, name, value, useInstead) { - return createDeprecatedOptionForVersionDiagnostic( - version2, - (message, arg0, arg1, arg2) => { - if (useInstead) { - const details = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Use_0_instead, - useInstead - ); - const chain = chainDiagnosticMessages(details, message, arg0, arg1, arg2); - createDiagnosticForOption( - /*onKey*/ - !value, - name, - /*option2*/ - void 0, - chain - ); - } else { - createDiagnosticForOption( - /*onKey*/ - !value, - name, - /*option2*/ - void 0, - message, - arg0, - arg1, - arg2 - ); - } - }, - name, - value - ); - } - function createDeprecatedOptionForVersionDiagnostic(version2, createDiagnostic, name, value) { - if (version2 === "6.0" /* v6_0 */) { - createDiagnostic(Diagnostics.Flag_0_is_deprecated_Please_remove_it_from_your_configuration, value || name); - } else { - createDiagnostic(Diagnostics.Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, value || name, "5.5" /* v5_5 */, "5.0" /* v5_0 */); + function verifyDeprecatedProjectReference(ref, parentFile, index) { + function createDiagnostic(_name, _value, _useInstead, message, arg0, arg1, arg2, arg3) { + createDiagnosticForReference(parentFile, index, message, arg0, arg1, arg2, arg3); } + checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { + if (ref.prepend) { + createDeprecatedDiagnostic("prepend"); + } + }); } function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) { var _a3; @@ -115753,25 +115829,25 @@ arg1 ); } - function createDiagnosticForReference(sourceFile, index, message, arg0, arg1, arg2) { + function createDiagnosticForReference(sourceFile, index, message, arg0, arg1, arg2, arg3) { const referencesSyntax = firstDefined( getTsConfigPropArray(sourceFile || options.configFile, "references"), (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 ); if (referencesSyntax && referencesSyntax.elements.length > index) { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, arg0, arg1, arg2)); + programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, arg0, arg1, arg2, arg3)); } else { - programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2)); + programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2, arg3)); } } - function createDiagnosticForOption(onKey, option1, option2, message, arg0, arg1, arg2) { + function createDiagnosticForOption(onKey, option1, option2, message, arg0, arg1, arg2, arg3) { const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax(); - const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, arg0, arg1, arg2); + const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, arg0, arg1, arg2, arg3); if (needCompilerDiagnostic) { if ("messageText" in message) { programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message)); } else { - programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2)); + programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2, arg3)); } } } @@ -115790,13 +115866,13 @@ } return _compilerOptionsObjectLiteralSyntax || void 0; } - function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, arg0, arg1, arg2) { + function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, arg0, arg1, arg2, arg3) { const props = getPropertyAssignment(objectLiteral, key1, key2); for (const prop of props) { if ("messageText" in message) { programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message)); } else { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, arg0, arg1, arg2)); + programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, arg0, arg1, arg2, arg3)); } } return !!props.length; diff --recursive --unified --new-file --exclude test --exclude Makefile 5.1.0-dev.20230307/lib/tsserver.js 5.1.0-dev.20230308/lib/tsserver.js --- 5.1.0-dev.20230307/lib/tsserver.js 1985-10-26 09:15:00 +++ 5.1.0-dev.20230308/lib/tsserver.js 1985-10-26 09:15:00 @@ -62,7 +62,6 @@ ContextFlags: () => ContextFlags, CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, - DeprecationVersion: () => DeprecationVersion, DiagnosticCategory: () => DiagnosticCategory, Diagnostics: () => Diagnostics, DocumentHighlights: () => DocumentHighlights, @@ -2286,7 +2285,7 @@ // src/compiler/corePublic.ts var versionMajorMinor = "5.1"; -var version = `${versionMajorMinor}.0-dev.20230307`; +var version = `${versionMajorMinor}.0-dev.20230308`; var Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -5824,304 +5823,305 @@ SyntaxKind5[SyntaxKind5["CaretEqualsToken"] = 78] = "CaretEqualsToken"; SyntaxKind5[SyntaxKind5["Identifier"] = 79] = "Identifier"; SyntaxKind5[SyntaxKind5["PrivateIdentifier"] = 80] = "PrivateIdentifier"; - SyntaxKind5[SyntaxKind5["BreakKeyword"] = 81] = "BreakKeyword"; - SyntaxKind5[SyntaxKind5["CaseKeyword"] = 82] = "CaseKeyword"; - SyntaxKind5[SyntaxKind5["CatchKeyword"] = 83] = "CatchKeyword"; - SyntaxKind5[SyntaxKind5["ClassKeyword"] = 84] = "ClassKeyword"; - SyntaxKind5[SyntaxKind5["ConstKeyword"] = 85] = "ConstKeyword"; - SyntaxKind5[SyntaxKind5["ContinueKeyword"] = 86] = "ContinueKeyword"; - SyntaxKind5[SyntaxKind5["DebuggerKeyword"] = 87] = "DebuggerKeyword"; - SyntaxKind5[SyntaxKind5["DefaultKeyword"] = 88] = "DefaultKeyword"; - SyntaxKind5[SyntaxKind5["DeleteKeyword"] = 89] = "DeleteKeyword"; - SyntaxKind5[SyntaxKind5["DoKeyword"] = 90] = "DoKeyword"; - SyntaxKind5[SyntaxKind5["ElseKeyword"] = 91] = "ElseKeyword"; - SyntaxKind5[SyntaxKind5["EnumKeyword"] = 92] = "EnumKeyword"; - SyntaxKind5[SyntaxKind5["ExportKeyword"] = 93] = "ExportKeyword"; - SyntaxKind5[SyntaxKind5["ExtendsKeyword"] = 94] = "ExtendsKeyword"; - SyntaxKind5[SyntaxKind5["FalseKeyword"] = 95] = "FalseKeyword"; - SyntaxKind5[SyntaxKind5["FinallyKeyword"] = 96] = "FinallyKeyword"; - SyntaxKind5[SyntaxKind5["ForKeyword"] = 97] = "ForKeyword"; - SyntaxKind5[SyntaxKind5["FunctionKeyword"] = 98] = "FunctionKeyword"; - SyntaxKind5[SyntaxKind5["IfKeyword"] = 99] = "IfKeyword"; - SyntaxKind5[SyntaxKind5["ImportKeyword"] = 100] = "ImportKeyword"; - SyntaxKind5[SyntaxKind5["InKeyword"] = 101] = "InKeyword"; - SyntaxKind5[SyntaxKind5["InstanceOfKeyword"] = 102] = "InstanceOfKeyword"; - SyntaxKind5[SyntaxKind5["NewKeyword"] = 103] = "NewKeyword"; - SyntaxKind5[SyntaxKind5["NullKeyword"] = 104] = "NullKeyword"; - SyntaxKind5[SyntaxKind5["ReturnKeyword"] = 105] = "ReturnKeyword"; - SyntaxKind5[SyntaxKind5["SuperKeyword"] = 106] = "SuperKeyword"; - SyntaxKind5[SyntaxKind5["SwitchKeyword"] = 107] = "SwitchKeyword"; - SyntaxKind5[SyntaxKind5["ThisKeyword"] = 108] = "ThisKeyword"; - SyntaxKind5[SyntaxKind5["ThrowKeyword"] = 109] = "ThrowKeyword"; - SyntaxKind5[SyntaxKind5["TrueKeyword"] = 110] = "TrueKeyword"; - SyntaxKind5[SyntaxKind5["TryKeyword"] = 111] = "TryKeyword"; - SyntaxKind5[SyntaxKind5["TypeOfKeyword"] = 112] = "TypeOfKeyword"; - SyntaxKind5[SyntaxKind5["VarKeyword"] = 113] = "VarKeyword"; - SyntaxKind5[SyntaxKind5["VoidKeyword"] = 114] = "VoidKeyword"; - SyntaxKind5[SyntaxKind5["WhileKeyword"] = 115] = "WhileKeyword"; - SyntaxKind5[SyntaxKind5["WithKeyword"] = 116] = "WithKeyword"; - SyntaxKind5[SyntaxKind5["ImplementsKeyword"] = 117] = "ImplementsKeyword"; - SyntaxKind5[SyntaxKind5["InterfaceKeyword"] = 118] = "InterfaceKeyword"; - SyntaxKind5[SyntaxKind5["LetKeyword"] = 119] = "LetKeyword"; - SyntaxKind5[SyntaxKind5["PackageKeyword"] = 120] = "PackageKeyword"; - SyntaxKind5[SyntaxKind5["PrivateKeyword"] = 121] = "PrivateKeyword"; - SyntaxKind5[SyntaxKind5["ProtectedKeyword"] = 122] = "ProtectedKeyword"; - SyntaxKind5[SyntaxKind5["PublicKeyword"] = 123] = "PublicKeyword"; - SyntaxKind5[SyntaxKind5["StaticKeyword"] = 124] = "StaticKeyword"; - SyntaxKind5[SyntaxKind5["YieldKeyword"] = 125] = "YieldKeyword"; - SyntaxKind5[SyntaxKind5["AbstractKeyword"] = 126] = "AbstractKeyword"; - SyntaxKind5[SyntaxKind5["AccessorKeyword"] = 127] = "AccessorKeyword"; - SyntaxKind5[SyntaxKind5["AsKeyword"] = 128] = "AsKeyword"; - SyntaxKind5[SyntaxKind5["AssertsKeyword"] = 129] = "AssertsKeyword"; - SyntaxKind5[SyntaxKind5["AssertKeyword"] = 130] = "AssertKeyword"; - SyntaxKind5[SyntaxKind5["AnyKeyword"] = 131] = "AnyKeyword"; - SyntaxKind5[SyntaxKind5["AsyncKeyword"] = 132] = "AsyncKeyword"; - SyntaxKind5[SyntaxKind5["AwaitKeyword"] = 133] = "AwaitKeyword"; - SyntaxKind5[SyntaxKind5["BooleanKeyword"] = 134] = "BooleanKeyword"; - SyntaxKind5[SyntaxKind5["ConstructorKeyword"] = 135] = "ConstructorKeyword"; - SyntaxKind5[SyntaxKind5["DeclareKeyword"] = 136] = "DeclareKeyword"; - SyntaxKind5[SyntaxKind5["GetKeyword"] = 137] = "GetKeyword"; - SyntaxKind5[SyntaxKind5["InferKeyword"] = 138] = "InferKeyword"; - SyntaxKind5[SyntaxKind5["IntrinsicKeyword"] = 139] = "IntrinsicKeyword"; - SyntaxKind5[SyntaxKind5["IsKeyword"] = 140] = "IsKeyword"; - SyntaxKind5[SyntaxKind5["KeyOfKeyword"] = 141] = "KeyOfKeyword"; - SyntaxKind5[SyntaxKind5["ModuleKeyword"] = 142] = "ModuleKeyword"; - SyntaxKind5[SyntaxKind5["NamespaceKeyword"] = 143] = "NamespaceKeyword"; - SyntaxKind5[SyntaxKind5["NeverKeyword"] = 144] = "NeverKeyword"; - SyntaxKind5[SyntaxKind5["OutKeyword"] = 145] = "OutKeyword"; - SyntaxKind5[SyntaxKind5["ReadonlyKeyword"] = 146] = "ReadonlyKeyword"; - SyntaxKind5[SyntaxKind5["RequireKeyword"] = 147] = "RequireKeyword"; - SyntaxKind5[SyntaxKind5["NumberKeyword"] = 148] = "NumberKeyword"; - SyntaxKind5[SyntaxKind5["ObjectKeyword"] = 149] = "ObjectKeyword"; - SyntaxKind5[SyntaxKind5["SatisfiesKeyword"] = 150] = "SatisfiesKeyword"; - SyntaxKind5[SyntaxKind5["SetKeyword"] = 151] = "SetKeyword"; - SyntaxKind5[SyntaxKind5["StringKeyword"] = 152] = "StringKeyword"; - SyntaxKind5[SyntaxKind5["SymbolKeyword"] = 153] = "SymbolKeyword"; - SyntaxKind5[SyntaxKind5["TypeKeyword"] = 154] = "TypeKeyword"; - SyntaxKind5[SyntaxKind5["UndefinedKeyword"] = 155] = "UndefinedKeyword"; - SyntaxKind5[SyntaxKind5["UniqueKeyword"] = 156] = "UniqueKeyword"; - SyntaxKind5[SyntaxKind5["UnknownKeyword"] = 157] = "UnknownKeyword"; - SyntaxKind5[SyntaxKind5["FromKeyword"] = 158] = "FromKeyword"; - SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 159] = "GlobalKeyword"; - SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 160] = "BigIntKeyword"; - SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 161] = "OverrideKeyword"; - SyntaxKind5[SyntaxKind5["OfKeyword"] = 162] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 163] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 164] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 165] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 166] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 167] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 168] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 169] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 170] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 171] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 172] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 173] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 174] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 175] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 176] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 177] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 178] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 179] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 180] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 181] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 182] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 183] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 184] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 185] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 186] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 187] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 188] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 189] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 190] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 191] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 192] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 193] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 194] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 195] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 196] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 197] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 198] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 199] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 200] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 201] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 202] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 203] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 204] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 205] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 206] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 207] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 208] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 209] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 210] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 211] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 212] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 213] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 214] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 215] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 216] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 217] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 218] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 219] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 220] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 221] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 222] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 223] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 224] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 225] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 226] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 227] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 228] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 229] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 230] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 231] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 232] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 233] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 234] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 235] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 236] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 237] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 238] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 239] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 240] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 241] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 242] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 243] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 244] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 245] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 246] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 247] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 248] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 249] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 250] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 251] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 252] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 253] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 254] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 255] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 256] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 257] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 258] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 259] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 260] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 261] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 262] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 263] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 264] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 265] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 266] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 267] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 268] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 269] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 270] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 271] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 272] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 273] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 274] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 275] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 276] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 277] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 278] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 279] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 280] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 281] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 282] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 283] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 284] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 285] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 286] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 287] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 288] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 289] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 290] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 291] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 292] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 293] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 294] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 295] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 296] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 297] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 298] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 299] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 300] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 301] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 302] = "EnumMember"; - SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 303] = "UnparsedPrologue"; - SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 304] = "UnparsedPrepend"; - SyntaxKind5[SyntaxKind5["UnparsedText"] = 305] = "UnparsedText"; - SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 306] = "UnparsedInternalText"; - SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 307] = "UnparsedSyntheticReference"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 308] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 309] = "Bundle"; - SyntaxKind5[SyntaxKind5["UnparsedSource"] = 310] = "UnparsedSource"; - SyntaxKind5[SyntaxKind5["InputFiles"] = 311] = "InputFiles"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 312] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 313] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 314] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 315] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 316] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 317] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 318] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 319] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 320] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 321] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 322] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 323] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 323 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 324] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 325] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 326] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 327] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 328] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 329] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 330] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 331] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 332] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 333] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 334] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 335] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 336] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 337] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 338] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 339] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 340] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 341] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 342] = "JSDocOverloadTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 343] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 344] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 345] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 346] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 347] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 348] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 349] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 350] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 351] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 352] = "JSDocThrowsTag"; - SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 354] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 355] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 357] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker"; - SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 361] = "Count"; + SyntaxKind5[SyntaxKind5["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken"; + SyntaxKind5[SyntaxKind5["BreakKeyword"] = 82] = "BreakKeyword"; + SyntaxKind5[SyntaxKind5["CaseKeyword"] = 83] = "CaseKeyword"; + SyntaxKind5[SyntaxKind5["CatchKeyword"] = 84] = "CatchKeyword"; + SyntaxKind5[SyntaxKind5["ClassKeyword"] = 85] = "ClassKeyword"; + SyntaxKind5[SyntaxKind5["ConstKeyword"] = 86] = "ConstKeyword"; + SyntaxKind5[SyntaxKind5["ContinueKeyword"] = 87] = "ContinueKeyword"; + SyntaxKind5[SyntaxKind5["DebuggerKeyword"] = 88] = "DebuggerKeyword"; + SyntaxKind5[SyntaxKind5["DefaultKeyword"] = 89] = "DefaultKeyword"; + SyntaxKind5[SyntaxKind5["DeleteKeyword"] = 90] = "DeleteKeyword"; + SyntaxKind5[SyntaxKind5["DoKeyword"] = 91] = "DoKeyword"; + SyntaxKind5[SyntaxKind5["ElseKeyword"] = 92] = "ElseKeyword"; + SyntaxKind5[SyntaxKind5["EnumKeyword"] = 93] = "EnumKeyword"; + SyntaxKind5[SyntaxKind5["ExportKeyword"] = 94] = "ExportKeyword"; + SyntaxKind5[SyntaxKind5["ExtendsKeyword"] = 95] = "ExtendsKeyword"; + SyntaxKind5[SyntaxKind5["FalseKeyword"] = 96] = "FalseKeyword"; + SyntaxKind5[SyntaxKind5["FinallyKeyword"] = 97] = "FinallyKeyword"; + SyntaxKind5[SyntaxKind5["ForKeyword"] = 98] = "ForKeyword"; + SyntaxKind5[SyntaxKind5["FunctionKeyword"] = 99] = "FunctionKeyword"; + SyntaxKind5[SyntaxKind5["IfKeyword"] = 100] = "IfKeyword"; + SyntaxKind5[SyntaxKind5["ImportKeyword"] = 101] = "ImportKeyword"; + SyntaxKind5[SyntaxKind5["InKeyword"] = 102] = "InKeyword"; + SyntaxKind5[SyntaxKind5["InstanceOfKeyword"] = 103] = "InstanceOfKeyword"; + SyntaxKind5[SyntaxKind5["NewKeyword"] = 104] = "NewKeyword"; + SyntaxKind5[SyntaxKind5["NullKeyword"] = 105] = "NullKeyword"; + SyntaxKind5[SyntaxKind5["ReturnKeyword"] = 106] = "ReturnKeyword"; + SyntaxKind5[SyntaxKind5["SuperKeyword"] = 107] = "SuperKeyword"; + SyntaxKind5[SyntaxKind5["SwitchKeyword"] = 108] = "SwitchKeyword"; + SyntaxKind5[SyntaxKind5["ThisKeyword"] = 109] = "ThisKeyword"; + SyntaxKind5[SyntaxKind5["ThrowKeyword"] = 110] = "ThrowKeyword"; + SyntaxKind5[SyntaxKind5["TrueKeyword"] = 111] = "TrueKeyword"; + SyntaxKind5[SyntaxKind5["TryKeyword"] = 112] = "TryKeyword"; + SyntaxKind5[SyntaxKind5["TypeOfKeyword"] = 113] = "TypeOfKeyword"; + SyntaxKind5[SyntaxKind5["VarKeyword"] = 114] = "VarKeyword"; + SyntaxKind5[SyntaxKind5["VoidKeyword"] = 115] = "VoidKeyword"; + SyntaxKind5[SyntaxKind5["WhileKeyword"] = 116] = "WhileKeyword"; + SyntaxKind5[SyntaxKind5["WithKeyword"] = 117] = "WithKeyword"; + SyntaxKind5[SyntaxKind5["ImplementsKeyword"] = 118] = "ImplementsKeyword"; + SyntaxKind5[SyntaxKind5["InterfaceKeyword"] = 119] = "InterfaceKeyword"; + SyntaxKind5[SyntaxKind5["LetKeyword"] = 120] = "LetKeyword"; + SyntaxKind5[SyntaxKind5["PackageKeyword"] = 121] = "PackageKeyword"; + SyntaxKind5[SyntaxKind5["PrivateKeyword"] = 122] = "PrivateKeyword"; + SyntaxKind5[SyntaxKind5["ProtectedKeyword"] = 123] = "ProtectedKeyword"; + SyntaxKind5[SyntaxKind5["PublicKeyword"] = 124] = "PublicKeyword"; + SyntaxKind5[SyntaxKind5["StaticKeyword"] = 125] = "StaticKeyword"; + SyntaxKind5[SyntaxKind5["YieldKeyword"] = 126] = "YieldKeyword"; + SyntaxKind5[SyntaxKind5["AbstractKeyword"] = 127] = "AbstractKeyword"; + SyntaxKind5[SyntaxKind5["AccessorKeyword"] = 128] = "AccessorKeyword"; + SyntaxKind5[SyntaxKind5["AsKeyword"] = 129] = "AsKeyword"; + SyntaxKind5[SyntaxKind5["AssertsKeyword"] = 130] = "AssertsKeyword"; + SyntaxKind5[SyntaxKind5["AssertKeyword"] = 131] = "AssertKeyword"; + SyntaxKind5[SyntaxKind5["AnyKeyword"] = 132] = "AnyKeyword"; + SyntaxKind5[SyntaxKind5["AsyncKeyword"] = 133] = "AsyncKeyword"; + SyntaxKind5[SyntaxKind5["AwaitKeyword"] = 134] = "AwaitKeyword"; + SyntaxKind5[SyntaxKind5["BooleanKeyword"] = 135] = "BooleanKeyword"; + SyntaxKind5[SyntaxKind5["ConstructorKeyword"] = 136] = "ConstructorKeyword"; + SyntaxKind5[SyntaxKind5["DeclareKeyword"] = 137] = "DeclareKeyword"; + SyntaxKind5[SyntaxKind5["GetKeyword"] = 138] = "GetKeyword"; + SyntaxKind5[SyntaxKind5["InferKeyword"] = 139] = "InferKeyword"; + SyntaxKind5[SyntaxKind5["IntrinsicKeyword"] = 140] = "IntrinsicKeyword"; + SyntaxKind5[SyntaxKind5["IsKeyword"] = 141] = "IsKeyword"; + SyntaxKind5[SyntaxKind5["KeyOfKeyword"] = 142] = "KeyOfKeyword"; + SyntaxKind5[SyntaxKind5["ModuleKeyword"] = 143] = "ModuleKeyword"; + SyntaxKind5[SyntaxKind5["NamespaceKeyword"] = 144] = "NamespaceKeyword"; + SyntaxKind5[SyntaxKind5["NeverKeyword"] = 145] = "NeverKeyword"; + SyntaxKind5[SyntaxKind5["OutKeyword"] = 146] = "OutKeyword"; + SyntaxKind5[SyntaxKind5["ReadonlyKeyword"] = 147] = "ReadonlyKeyword"; + SyntaxKind5[SyntaxKind5["RequireKeyword"] = 148] = "RequireKeyword"; + SyntaxKind5[SyntaxKind5["NumberKeyword"] = 149] = "NumberKeyword"; + SyntaxKind5[SyntaxKind5["ObjectKeyword"] = 150] = "ObjectKeyword"; + SyntaxKind5[SyntaxKind5["SatisfiesKeyword"] = 151] = "SatisfiesKeyword"; + SyntaxKind5[SyntaxKind5["SetKeyword"] = 152] = "SetKeyword"; + SyntaxKind5[SyntaxKind5["StringKeyword"] = 153] = "StringKeyword"; + SyntaxKind5[SyntaxKind5["SymbolKeyword"] = 154] = "SymbolKeyword"; + SyntaxKind5[SyntaxKind5["TypeKeyword"] = 155] = "TypeKeyword"; + SyntaxKind5[SyntaxKind5["UndefinedKeyword"] = 156] = "UndefinedKeyword"; + SyntaxKind5[SyntaxKind5["UniqueKeyword"] = 157] = "UniqueKeyword"; + SyntaxKind5[SyntaxKind5["UnknownKeyword"] = 158] = "UnknownKeyword"; + SyntaxKind5[SyntaxKind5["FromKeyword"] = 159] = "FromKeyword"; + SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 160] = "GlobalKeyword"; + SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 161] = "BigIntKeyword"; + SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 162] = "OverrideKeyword"; + SyntaxKind5[SyntaxKind5["OfKeyword"] = 163] = "OfKeyword"; + SyntaxKind5[SyntaxKind5["QualifiedName"] = 164] = "QualifiedName"; + SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 165] = "ComputedPropertyName"; + SyntaxKind5[SyntaxKind5["TypeParameter"] = 166] = "TypeParameter"; + SyntaxKind5[SyntaxKind5["Parameter"] = 167] = "Parameter"; + SyntaxKind5[SyntaxKind5["Decorator"] = 168] = "Decorator"; + SyntaxKind5[SyntaxKind5["PropertySignature"] = 169] = "PropertySignature"; + SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 170] = "PropertyDeclaration"; + SyntaxKind5[SyntaxKind5["MethodSignature"] = 171] = "MethodSignature"; + SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 172] = "MethodDeclaration"; + SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 173] = "ClassStaticBlockDeclaration"; + SyntaxKind5[SyntaxKind5["Constructor"] = 174] = "Constructor"; + SyntaxKind5[SyntaxKind5["GetAccessor"] = 175] = "GetAccessor"; + SyntaxKind5[SyntaxKind5["SetAccessor"] = 176] = "SetAccessor"; + SyntaxKind5[SyntaxKind5["CallSignature"] = 177] = "CallSignature"; + SyntaxKind5[SyntaxKind5["ConstructSignature"] = 178] = "ConstructSignature"; + SyntaxKind5[SyntaxKind5["IndexSignature"] = 179] = "IndexSignature"; + SyntaxKind5[SyntaxKind5["TypePredicate"] = 180] = "TypePredicate"; + SyntaxKind5[SyntaxKind5["TypeReference"] = 181] = "TypeReference"; + SyntaxKind5[SyntaxKind5["FunctionType"] = 182] = "FunctionType"; + SyntaxKind5[SyntaxKind5["ConstructorType"] = 183] = "ConstructorType"; + SyntaxKind5[SyntaxKind5["TypeQuery"] = 184] = "TypeQuery"; + SyntaxKind5[SyntaxKind5["TypeLiteral"] = 185] = "TypeLiteral"; + SyntaxKind5[SyntaxKind5["ArrayType"] = 186] = "ArrayType"; + SyntaxKind5[SyntaxKind5["TupleType"] = 187] = "TupleType"; + SyntaxKind5[SyntaxKind5["OptionalType"] = 188] = "OptionalType"; + SyntaxKind5[SyntaxKind5["RestType"] = 189] = "RestType"; + SyntaxKind5[SyntaxKind5["UnionType"] = 190] = "UnionType"; + SyntaxKind5[SyntaxKind5["IntersectionType"] = 191] = "IntersectionType"; + SyntaxKind5[SyntaxKind5["ConditionalType"] = 192] = "ConditionalType"; + SyntaxKind5[SyntaxKind5["InferType"] = 193] = "InferType"; + SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 194] = "ParenthesizedType"; + SyntaxKind5[SyntaxKind5["ThisType"] = 195] = "ThisType"; + SyntaxKind5[SyntaxKind5["TypeOperator"] = 196] = "TypeOperator"; + SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 197] = "IndexedAccessType"; + SyntaxKind5[SyntaxKind5["MappedType"] = 198] = "MappedType"; + SyntaxKind5[SyntaxKind5["LiteralType"] = 199] = "LiteralType"; + SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 200] = "NamedTupleMember"; + SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 201] = "TemplateLiteralType"; + SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 202] = "TemplateLiteralTypeSpan"; + SyntaxKind5[SyntaxKind5["ImportType"] = 203] = "ImportType"; + SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 204] = "ObjectBindingPattern"; + SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 205] = "ArrayBindingPattern"; + SyntaxKind5[SyntaxKind5["BindingElement"] = 206] = "BindingElement"; + SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 207] = "ArrayLiteralExpression"; + SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 208] = "ObjectLiteralExpression"; + SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 209] = "PropertyAccessExpression"; + SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 210] = "ElementAccessExpression"; + SyntaxKind5[SyntaxKind5["CallExpression"] = 211] = "CallExpression"; + SyntaxKind5[SyntaxKind5["NewExpression"] = 212] = "NewExpression"; + SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 213] = "TaggedTemplateExpression"; + SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 214] = "TypeAssertionExpression"; + SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 215] = "ParenthesizedExpression"; + SyntaxKind5[SyntaxKind5["FunctionExpression"] = 216] = "FunctionExpression"; + SyntaxKind5[SyntaxKind5["ArrowFunction"] = 217] = "ArrowFunction"; + SyntaxKind5[SyntaxKind5["DeleteExpression"] = 218] = "DeleteExpression"; + SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 219] = "TypeOfExpression"; + SyntaxKind5[SyntaxKind5["VoidExpression"] = 220] = "VoidExpression"; + SyntaxKind5[SyntaxKind5["AwaitExpression"] = 221] = "AwaitExpression"; + SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 222] = "PrefixUnaryExpression"; + SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 223] = "PostfixUnaryExpression"; + SyntaxKind5[SyntaxKind5["BinaryExpression"] = 224] = "BinaryExpression"; + SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 225] = "ConditionalExpression"; + SyntaxKind5[SyntaxKind5["TemplateExpression"] = 226] = "TemplateExpression"; + SyntaxKind5[SyntaxKind5["YieldExpression"] = 227] = "YieldExpression"; + SyntaxKind5[SyntaxKind5["SpreadElement"] = 228] = "SpreadElement"; + SyntaxKind5[SyntaxKind5["ClassExpression"] = 229] = "ClassExpression"; + SyntaxKind5[SyntaxKind5["OmittedExpression"] = 230] = "OmittedExpression"; + SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 231] = "ExpressionWithTypeArguments"; + SyntaxKind5[SyntaxKind5["AsExpression"] = 232] = "AsExpression"; + SyntaxKind5[SyntaxKind5["NonNullExpression"] = 233] = "NonNullExpression"; + SyntaxKind5[SyntaxKind5["MetaProperty"] = 234] = "MetaProperty"; + SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 235] = "SyntheticExpression"; + SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 236] = "SatisfiesExpression"; + SyntaxKind5[SyntaxKind5["TemplateSpan"] = 237] = "TemplateSpan"; + SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 238] = "SemicolonClassElement"; + SyntaxKind5[SyntaxKind5["Block"] = 239] = "Block"; + SyntaxKind5[SyntaxKind5["EmptyStatement"] = 240] = "EmptyStatement"; + SyntaxKind5[SyntaxKind5["VariableStatement"] = 241] = "VariableStatement"; + SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 242] = "ExpressionStatement"; + SyntaxKind5[SyntaxKind5["IfStatement"] = 243] = "IfStatement"; + SyntaxKind5[SyntaxKind5["DoStatement"] = 244] = "DoStatement"; + SyntaxKind5[SyntaxKind5["WhileStatement"] = 245] = "WhileStatement"; + SyntaxKind5[SyntaxKind5["ForStatement"] = 246] = "ForStatement"; + SyntaxKind5[SyntaxKind5["ForInStatement"] = 247] = "ForInStatement"; + SyntaxKind5[SyntaxKind5["ForOfStatement"] = 248] = "ForOfStatement"; + SyntaxKind5[SyntaxKind5["ContinueStatement"] = 249] = "ContinueStatement"; + SyntaxKind5[SyntaxKind5["BreakStatement"] = 250] = "BreakStatement"; + SyntaxKind5[SyntaxKind5["ReturnStatement"] = 251] = "ReturnStatement"; + SyntaxKind5[SyntaxKind5["WithStatement"] = 252] = "WithStatement"; + SyntaxKind5[SyntaxKind5["SwitchStatement"] = 253] = "SwitchStatement"; + SyntaxKind5[SyntaxKind5["LabeledStatement"] = 254] = "LabeledStatement"; + SyntaxKind5[SyntaxKind5["ThrowStatement"] = 255] = "ThrowStatement"; + SyntaxKind5[SyntaxKind5["TryStatement"] = 256] = "TryStatement"; + SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 257] = "DebuggerStatement"; + SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 258] = "VariableDeclaration"; + SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 259] = "VariableDeclarationList"; + SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 260] = "FunctionDeclaration"; + SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 261] = "ClassDeclaration"; + SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 262] = "InterfaceDeclaration"; + SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 263] = "TypeAliasDeclaration"; + SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 264] = "EnumDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 265] = "ModuleDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleBlock"] = 266] = "ModuleBlock"; + SyntaxKind5[SyntaxKind5["CaseBlock"] = 267] = "CaseBlock"; + SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 268] = "NamespaceExportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 269] = "ImportEqualsDeclaration"; + SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 270] = "ImportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportClause"] = 271] = "ImportClause"; + SyntaxKind5[SyntaxKind5["NamespaceImport"] = 272] = "NamespaceImport"; + SyntaxKind5[SyntaxKind5["NamedImports"] = 273] = "NamedImports"; + SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 274] = "ImportSpecifier"; + SyntaxKind5[SyntaxKind5["ExportAssignment"] = 275] = "ExportAssignment"; + SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 276] = "ExportDeclaration"; + SyntaxKind5[SyntaxKind5["NamedExports"] = 277] = "NamedExports"; + SyntaxKind5[SyntaxKind5["NamespaceExport"] = 278] = "NamespaceExport"; + SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 279] = "ExportSpecifier"; + SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 280] = "MissingDeclaration"; + SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 281] = "ExternalModuleReference"; + SyntaxKind5[SyntaxKind5["JsxElement"] = 282] = "JsxElement"; + SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 283] = "JsxSelfClosingElement"; + SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 284] = "JsxOpeningElement"; + SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 285] = "JsxClosingElement"; + SyntaxKind5[SyntaxKind5["JsxFragment"] = 286] = "JsxFragment"; + SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 287] = "JsxOpeningFragment"; + SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 288] = "JsxClosingFragment"; + SyntaxKind5[SyntaxKind5["JsxAttribute"] = 289] = "JsxAttribute"; + SyntaxKind5[SyntaxKind5["JsxAttributes"] = 290] = "JsxAttributes"; + SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 291] = "JsxSpreadAttribute"; + SyntaxKind5[SyntaxKind5["JsxExpression"] = 292] = "JsxExpression"; + SyntaxKind5[SyntaxKind5["CaseClause"] = 293] = "CaseClause"; + SyntaxKind5[SyntaxKind5["DefaultClause"] = 294] = "DefaultClause"; + SyntaxKind5[SyntaxKind5["HeritageClause"] = 295] = "HeritageClause"; + SyntaxKind5[SyntaxKind5["CatchClause"] = 296] = "CatchClause"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 297] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 298] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 299] = "ImportTypeAssertionContainer"; + SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 300] = "PropertyAssignment"; + SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 301] = "ShorthandPropertyAssignment"; + SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 302] = "SpreadAssignment"; + SyntaxKind5[SyntaxKind5["EnumMember"] = 303] = "EnumMember"; + SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 304] = "UnparsedPrologue"; + SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 305] = "UnparsedPrepend"; + SyntaxKind5[SyntaxKind5["UnparsedText"] = 306] = "UnparsedText"; + SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 307] = "UnparsedInternalText"; + SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 308] = "UnparsedSyntheticReference"; + SyntaxKind5[SyntaxKind5["SourceFile"] = 309] = "SourceFile"; + SyntaxKind5[SyntaxKind5["Bundle"] = 310] = "Bundle"; + SyntaxKind5[SyntaxKind5["UnparsedSource"] = 311] = "UnparsedSource"; + SyntaxKind5[SyntaxKind5["InputFiles"] = 312] = "InputFiles"; + SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 313] = "JSDocTypeExpression"; + SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 314] = "JSDocNameReference"; + SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 315] = "JSDocMemberName"; + SyntaxKind5[SyntaxKind5["JSDocAllType"] = 316] = "JSDocAllType"; + SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 317] = "JSDocUnknownType"; + SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 318] = "JSDocNullableType"; + SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 319] = "JSDocNonNullableType"; + SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 320] = "JSDocOptionalType"; + SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 321] = "JSDocFunctionType"; + SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 322] = "JSDocVariadicType"; + SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 323] = "JSDocNamepathType"; + SyntaxKind5[SyntaxKind5["JSDoc"] = 324] = "JSDoc"; + SyntaxKind5[SyntaxKind5["JSDocComment"] = 324 /* JSDoc */] = "JSDocComment"; + SyntaxKind5[SyntaxKind5["JSDocText"] = 325] = "JSDocText"; + SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 326] = "JSDocTypeLiteral"; + SyntaxKind5[SyntaxKind5["JSDocSignature"] = 327] = "JSDocSignature"; + SyntaxKind5[SyntaxKind5["JSDocLink"] = 328] = "JSDocLink"; + SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 329] = "JSDocLinkCode"; + SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 330] = "JSDocLinkPlain"; + SyntaxKind5[SyntaxKind5["JSDocTag"] = 331] = "JSDocTag"; + SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 332] = "JSDocAugmentsTag"; + SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 333] = "JSDocImplementsTag"; + SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 334] = "JSDocAuthorTag"; + SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 335] = "JSDocDeprecatedTag"; + SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 336] = "JSDocClassTag"; + SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 337] = "JSDocPublicTag"; + SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 338] = "JSDocPrivateTag"; + SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 339] = "JSDocProtectedTag"; + SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 340] = "JSDocReadonlyTag"; + SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 341] = "JSDocOverrideTag"; + SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 342] = "JSDocCallbackTag"; + SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 343] = "JSDocOverloadTag"; + SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 344] = "JSDocEnumTag"; + SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 345] = "JSDocParameterTag"; + SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 346] = "JSDocReturnTag"; + SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 347] = "JSDocThisTag"; + SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 348] = "JSDocTypeTag"; + SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 349] = "JSDocTemplateTag"; + SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 350] = "JSDocTypedefTag"; + SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 351] = "JSDocSeeTag"; + SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 352] = "JSDocPropertyTag"; + SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 353] = "JSDocThrowsTag"; + SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 354] = "JSDocSatisfiesTag"; + SyntaxKind5[SyntaxKind5["SyntaxList"] = 355] = "SyntaxList"; + SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 356] = "NotEmittedStatement"; + SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 357] = "PartiallyEmittedExpression"; + SyntaxKind5[SyntaxKind5["CommaListExpression"] = 358] = "CommaListExpression"; + SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 359] = "MergeDeclarationMarker"; + SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 360] = "EndOfDeclarationMarker"; + SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression"; + SyntaxKind5[SyntaxKind5["Count"] = 362] = "Count"; SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment"; SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment"; SyntaxKind5[SyntaxKind5["LastCompoundAssignment"] = 78 /* CaretEqualsToken */] = "LastCompoundAssignment"; - SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 81 /* BreakKeyword */] = "FirstReservedWord"; - SyntaxKind5[SyntaxKind5["LastReservedWord"] = 116 /* WithKeyword */] = "LastReservedWord"; - SyntaxKind5[SyntaxKind5["FirstKeyword"] = 81 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 162 /* OfKeyword */] = "LastKeyword"; - SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 117 /* ImplementsKeyword */] = "FirstFutureReservedWord"; - SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 125 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 179 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 202 /* ImportType */] = "LastTypeNode"; + SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 82 /* BreakKeyword */] = "FirstReservedWord"; + SyntaxKind5[SyntaxKind5["LastReservedWord"] = 117 /* WithKeyword */] = "LastReservedWord"; + SyntaxKind5[SyntaxKind5["FirstKeyword"] = 82 /* BreakKeyword */] = "FirstKeyword"; + SyntaxKind5[SyntaxKind5["LastKeyword"] = 163 /* OfKeyword */] = "LastKeyword"; + SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 118 /* ImplementsKeyword */] = "FirstFutureReservedWord"; + SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 126 /* YieldKeyword */] = "LastFutureReservedWord"; + SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 180 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind5[SyntaxKind5["LastTypeNode"] = 203 /* ImportType */] = "LastTypeNode"; SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 18 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind5[SyntaxKind5["LastPunctuation"] = 78 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 162 /* LastKeyword */] = "LastToken"; + SyntaxKind5[SyntaxKind5["LastToken"] = 163 /* LastKeyword */] = "LastToken"; SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 8 /* NumericLiteral */] = "FirstLiteralToken"; @@ -6130,15 +6130,15 @@ SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 17 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 29 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 78 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 240 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 163 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; - SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind5[SyntaxKind5["FirstStatement"] = 241 /* VariableStatement */] = "FirstStatement"; + SyntaxKind5[SyntaxKind5["LastStatement"] = 257 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind5[SyntaxKind5["FirstNode"] = 164 /* QualifiedName */] = "FirstNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 313 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 354 /* JSDocSatisfiesTag */] = "LastJSDocNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 331 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 354 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; + SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 127 /* AbstractKeyword */] = "FirstContextualKeyword"; + SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 163 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind5; })(SyntaxKind || {}); var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { @@ -6637,7 +6637,6 @@ TypeFlags2[TypeFlags2["DefinitelyFalsy"] = 117632] = "DefinitelyFalsy"; TypeFlags2[TypeFlags2["PossiblyFalsy"] = 117724] = "PossiblyFalsy"; TypeFlags2[TypeFlags2["Intrinsic"] = 67359327] = "Intrinsic"; - TypeFlags2[TypeFlags2["Primitive"] = 134348796] = "Primitive"; TypeFlags2[TypeFlags2["StringLike"] = 402653316] = "StringLike"; TypeFlags2[TypeFlags2["NumberLike"] = 296] = "NumberLike"; TypeFlags2[TypeFlags2["BigIntLike"] = 2112] = "BigIntLike"; @@ -6645,6 +6644,7 @@ TypeFlags2[TypeFlags2["EnumLike"] = 1056] = "EnumLike"; TypeFlags2[TypeFlags2["ESSymbolLike"] = 12288] = "ESSymbolLike"; TypeFlags2[TypeFlags2["VoidLike"] = 49152] = "VoidLike"; + TypeFlags2[TypeFlags2["Primitive"] = 402784252] = "Primitive"; TypeFlags2[TypeFlags2["DefinitelyNonNullable"] = 470302716] = "DefinitelyNonNullable"; TypeFlags2[TypeFlags2["DisjointDomains"] = 469892092] = "DisjointDomains"; TypeFlags2[TypeFlags2["UnionOrIntersection"] = 3145728] = "UnionOrIntersection"; @@ -6658,7 +6658,7 @@ TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable"; TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton"; TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable"; - TypeFlags2[TypeFlags2["IncludesMask"] = 205258751] = "IncludesMask"; + TypeFlags2[TypeFlags2["IncludesMask"] = 473694207] = "IncludesMask"; TypeFlags2[TypeFlags2["IncludesMissingType"] = 262144 /* TypeParameter */] = "IncludesMissingType"; TypeFlags2[TypeFlags2["IncludesNonWideningType"] = 4194304 /* Index */] = "IncludesNonWideningType"; TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard"; @@ -6843,6 +6843,7 @@ } var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind3) => { ModuleResolutionKind3[ModuleResolutionKind3["Classic"] = 1] = "Classic"; + ModuleResolutionKind3[ModuleResolutionKind3["NodeJs"] = 2] = "NodeJs"; ModuleResolutionKind3[ModuleResolutionKind3["Node10"] = 2] = "Node10"; ModuleResolutionKind3[ModuleResolutionKind3["Node16"] = 3] = "Node16"; ModuleResolutionKind3[ModuleResolutionKind3["NodeNext"] = 99] = "NodeNext"; @@ -7407,12 +7408,6 @@ kind: 4 /* MultiLine */ } }; -var DeprecationVersion = /* @__PURE__ */ ((DeprecationVersion2) => { - DeprecationVersion2["v5_0"] = "5.0"; - DeprecationVersion2["v5_5"] = "5.5"; - DeprecationVersion2["v6_0"] = "6.0"; - return DeprecationVersion2; -})(DeprecationVersion || {}); // src/compiler/sys.ts function generateDjb2Hash(data) { @@ -10316,12 +10311,14 @@ Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."), An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."), Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."), - Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecat_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), - Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."), + Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), + Option_0_has_been_removed_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."), Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."), Option_0_is_redundant_and_cannot_be_specified_with_option_1: diag(5104, 1 /* Error */, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."), Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: diag(5105, 1 /* Error */, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."), Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), + Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), + Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -11261,88 +11258,88 @@ return token === 31 /* GreaterThanToken */ || tokenIsIdentifierOrKeyword(token); } var textToKeywordObj = { - abstract: 126 /* AbstractKeyword */, - accessor: 127 /* AccessorKeyword */, - any: 131 /* AnyKeyword */, - as: 128 /* AsKeyword */, - asserts: 129 /* AssertsKeyword */, - assert: 130 /* AssertKeyword */, - bigint: 160 /* BigIntKeyword */, - boolean: 134 /* BooleanKeyword */, - break: 81 /* BreakKeyword */, - case: 82 /* CaseKeyword */, - catch: 83 /* CatchKeyword */, - class: 84 /* ClassKeyword */, - continue: 86 /* ContinueKeyword */, - const: 85 /* ConstKeyword */, - ["constructor"]: 135 /* ConstructorKeyword */, - debugger: 87 /* DebuggerKeyword */, - declare: 136 /* DeclareKeyword */, - default: 88 /* DefaultKeyword */, - delete: 89 /* DeleteKeyword */, - do: 90 /* DoKeyword */, - else: 91 /* ElseKeyword */, - enum: 92 /* EnumKeyword */, - export: 93 /* ExportKeyword */, - extends: 94 /* ExtendsKeyword */, - false: 95 /* FalseKeyword */, - finally: 96 /* FinallyKeyword */, - for: 97 /* ForKeyword */, - from: 158 /* FromKeyword */, - function: 98 /* FunctionKeyword */, - get: 137 /* GetKeyword */, - if: 99 /* IfKeyword */, - implements: 117 /* ImplementsKeyword */, - import: 100 /* ImportKeyword */, - in: 101 /* InKeyword */, - infer: 138 /* InferKeyword */, - instanceof: 102 /* InstanceOfKeyword */, - interface: 118 /* InterfaceKeyword */, - intrinsic: 139 /* IntrinsicKeyword */, - is: 140 /* IsKeyword */, - keyof: 141 /* KeyOfKeyword */, - let: 119 /* LetKeyword */, - module: 142 /* ModuleKeyword */, - namespace: 143 /* NamespaceKeyword */, - never: 144 /* NeverKeyword */, - new: 103 /* NewKeyword */, - null: 104 /* NullKeyword */, - number: 148 /* NumberKeyword */, - object: 149 /* ObjectKeyword */, - package: 120 /* PackageKeyword */, - private: 121 /* PrivateKeyword */, - protected: 122 /* ProtectedKeyword */, - public: 123 /* PublicKeyword */, - override: 161 /* OverrideKeyword */, - out: 145 /* OutKeyword */, - readonly: 146 /* ReadonlyKeyword */, - require: 147 /* RequireKeyword */, - global: 159 /* GlobalKeyword */, - return: 105 /* ReturnKeyword */, - satisfies: 150 /* SatisfiesKeyword */, - set: 151 /* SetKeyword */, - static: 124 /* StaticKeyword */, - string: 152 /* StringKeyword */, - super: 106 /* SuperKeyword */, - switch: 107 /* SwitchKeyword */, - symbol: 153 /* SymbolKeyword */, - this: 108 /* ThisKeyword */, - throw: 109 /* ThrowKeyword */, - true: 110 /* TrueKeyword */, - try: 111 /* TryKeyword */, - type: 154 /* TypeKeyword */, - typeof: 112 /* TypeOfKeyword */, - undefined: 155 /* UndefinedKeyword */, - unique: 156 /* UniqueKeyword */, - unknown: 157 /* UnknownKeyword */, - var: 113 /* VarKeyword */, - void: 114 /* VoidKeyword */, - while: 115 /* WhileKeyword */, - with: 116 /* WithKeyword */, - yield: 125 /* YieldKeyword */, - async: 132 /* AsyncKeyword */, - await: 133 /* AwaitKeyword */, - of: 162 /* OfKeyword */ + abstract: 127 /* AbstractKeyword */, + accessor: 128 /* AccessorKeyword */, + any: 132 /* AnyKeyword */, + as: 129 /* AsKeyword */, + asserts: 130 /* AssertsKeyword */, + assert: 131 /* AssertKeyword */, + bigint: 161 /* BigIntKeyword */, + boolean: 135 /* BooleanKeyword */, + break: 82 /* BreakKeyword */, + case: 83 /* CaseKeyword */, + catch: 84 /* CatchKeyword */, + class: 85 /* ClassKeyword */, + continue: 87 /* ContinueKeyword */, + const: 86 /* ConstKeyword */, + ["constructor"]: 136 /* ConstructorKeyword */, + debugger: 88 /* DebuggerKeyword */, + declare: 137 /* DeclareKeyword */, + default: 89 /* DefaultKeyword */, + delete: 90 /* DeleteKeyword */, + do: 91 /* DoKeyword */, + else: 92 /* ElseKeyword */, + enum: 93 /* EnumKeyword */, + export: 94 /* ExportKeyword */, + extends: 95 /* ExtendsKeyword */, + false: 96 /* FalseKeyword */, + finally: 97 /* FinallyKeyword */, + for: 98 /* ForKeyword */, + from: 159 /* FromKeyword */, + function: 99 /* FunctionKeyword */, + get: 138 /* GetKeyword */, + if: 100 /* IfKeyword */, + implements: 118 /* ImplementsKeyword */, + import: 101 /* ImportKeyword */, + in: 102 /* InKeyword */, + infer: 139 /* InferKeyword */, + instanceof: 103 /* InstanceOfKeyword */, + interface: 119 /* InterfaceKeyword */, + intrinsic: 140 /* IntrinsicKeyword */, + is: 141 /* IsKeyword */, + keyof: 142 /* KeyOfKeyword */, + let: 120 /* LetKeyword */, + module: 143 /* ModuleKeyword */, + namespace: 144 /* NamespaceKeyword */, + never: 145 /* NeverKeyword */, + new: 104 /* NewKeyword */, + null: 105 /* NullKeyword */, + number: 149 /* NumberKeyword */, + object: 150 /* ObjectKeyword */, + package: 121 /* PackageKeyword */, + private: 122 /* PrivateKeyword */, + protected: 123 /* ProtectedKeyword */, + public: 124 /* PublicKeyword */, + override: 162 /* OverrideKeyword */, + out: 146 /* OutKeyword */, + readonly: 147 /* ReadonlyKeyword */, + require: 148 /* RequireKeyword */, + global: 160 /* GlobalKeyword */, + return: 106 /* ReturnKeyword */, + satisfies: 151 /* SatisfiesKeyword */, + set: 152 /* SetKeyword */, + static: 125 /* StaticKeyword */, + string: 153 /* StringKeyword */, + super: 107 /* SuperKeyword */, + switch: 108 /* SwitchKeyword */, + symbol: 154 /* SymbolKeyword */, + this: 109 /* ThisKeyword */, + throw: 110 /* ThrowKeyword */, + true: 111 /* TrueKeyword */, + try: 112 /* TryKeyword */, + type: 155 /* TypeKeyword */, + typeof: 113 /* TypeOfKeyword */, + undefined: 156 /* UndefinedKeyword */, + unique: 157 /* UniqueKeyword */, + unknown: 158 /* UnknownKeyword */, + var: 114 /* VarKeyword */, + void: 115 /* VoidKeyword */, + while: 116 /* WhileKeyword */, + with: 117 /* WithKeyword */, + yield: 126 /* YieldKeyword */, + async: 133 /* AsyncKeyword */, + await: 134 /* AwaitKeyword */, + of: 163 /* OfKeyword */ }; var textToKeyword = new Map(Object.entries(textToKeywordObj)); var textToToken = new Map(Object.entries({ @@ -11916,8 +11913,8 @@ var text = textInitial; var pos; var end; - var startPos; - var tokenPos; + var fullStartPos; + var tokenStart; var token; var tokenValue; var tokenFlags; @@ -11925,18 +11922,21 @@ var inJSDocType = 0; setText(text, start2, length2); var scanner2 = { - getStartPos: () => startPos, + getTokenFullStart: () => fullStartPos, + getStartPos: () => fullStartPos, + getTokenEnd: () => pos, getTextPos: () => pos, getToken: () => token, - getTokenPos: () => tokenPos, - getTokenText: () => text.substring(tokenPos, pos), + getTokenStart: () => tokenStart, + getTokenPos: () => tokenStart, + getTokenText: () => text.substring(tokenStart, pos), getTokenValue: () => tokenValue, hasUnicodeEscape: () => (tokenFlags & 1024 /* UnicodeEscape */) !== 0, hasExtendedUnicodeEscape: () => (tokenFlags & 8 /* ExtendedUnicodeEscape */) !== 0, hasPrecedingLineBreak: () => (tokenFlags & 1 /* PrecedingLineBreak */) !== 0, hasPrecedingJSDocComment: () => (tokenFlags & 2 /* PrecedingJSDocComment */) !== 0, - isIdentifier: () => token === 79 /* Identifier */ || token > 116 /* LastReservedWord */, - isReservedWord: () => token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */, + isIdentifier: () => token === 79 /* Identifier */ || token > 117 /* LastReservedWord */, + isReservedWord: () => token >= 82 /* FirstReservedWord */ && token <= 117 /* LastReservedWord */, isUnterminated: () => (tokenFlags & 4 /* Unterminated */) !== 0, getCommentDirectives: () => commentDirectives, getNumericLiteralFlags: () => tokenFlags & 1008 /* NumericLiteralFlags */, @@ -11956,6 +11956,7 @@ reScanInvalidIdentifier, scanJsxToken, scanJsDocToken, + scanJSDocCommentTextToken, scan, getText, clearCommentDirectives, @@ -11963,7 +11964,8 @@ setScriptTarget, setLanguageVariant, setOnError, - setTextPos, + resetTokenState, + setTextPos: resetTokenState, setInJSDocType, tryScan, lookAhead, @@ -11973,7 +11975,7 @@ Object.defineProperty(scanner2, "__debugShowCurrentPositionInText", { get: () => { const text2 = scanner2.getText(); - return text2.slice(0, scanner2.getStartPos()) + "\u2551" + text2.slice(scanner2.getStartPos()); + return text2.slice(0, scanner2.getTokenFullStart()) + "\u2551" + text2.slice(scanner2.getTokenFullStart()); } }); } @@ -12496,11 +12498,11 @@ } } function scan() { - startPos = pos; + fullStartPos = pos; tokenFlags = 0 /* None */; let asteriskSeen = false; while (true) { - tokenPos = pos; + tokenStart = pos; if (pos >= end) { return token = 1 /* EndOfFileToken */; } @@ -12659,9 +12661,9 @@ } commentDirectives = appendIfCommentDirective( commentDirectives, - text.slice(tokenPos, pos), + text.slice(tokenStart, pos), commentDirectiveRegExSingleLine, - tokenPos + tokenStart ); if (skipTrivia2) { continue; @@ -12675,7 +12677,7 @@ tokenFlags |= 2 /* PrecedingJSDocComment */; } let commentClosed = false; - let lastLineStart = tokenPos; + let lastLineStart = tokenStart; while (pos < end) { const ch2 = text.charCodeAt(pos); if (ch2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { @@ -12953,7 +12955,7 @@ } function reScanInvalidIdentifier() { Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."); - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; tokenFlags = 0; const ch = codePointAt(text, pos); const identifierKind = scanIdentifier(ch, 99 /* ESNext */); @@ -12969,7 +12971,7 @@ pos += charSize(ch); while (pos < end && isIdentifierPart(ch = codePointAt(text, pos), languageVersion2)) pos += charSize(ch); - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } @@ -13000,12 +13002,12 @@ } function reScanAsteriskEqualsToken() { Debug.assert(token === 66 /* AsteriskEqualsToken */, "'reScanAsteriskEqualsToken' should only be called on a '*='"); - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 63 /* EqualsToken */; } function reScanSlashToken() { if (token === 43 /* SlashToken */ || token === 68 /* SlashEqualsToken */) { - let p = tokenPos + 1; + let p = tokenStart + 1; let inEscape = false; let inCharacterClass = false; while (true) { @@ -13038,7 +13040,7 @@ p++; } pos = p; - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); token = 13 /* RegularExpressionLiteral */; } return token; @@ -13071,41 +13073,41 @@ } function reScanTemplateToken(isTaggedTemplate) { Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); - pos = tokenPos; + pos = tokenStart; return token = scanTemplateAndSetTokenValue(isTaggedTemplate); } function reScanTemplateHeadOrNoSubstitutionTemplate() { - pos = tokenPos; + pos = tokenStart; return token = scanTemplateAndSetTokenValue( /* isTaggedTemplate */ true ); } function reScanJsxToken(allowMultilineJsxText = true) { - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; return token = scanJsxToken(allowMultilineJsxText); } function reScanLessThanToken() { if (token === 47 /* LessThanLessThanToken */) { - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 29 /* LessThanToken */; } return token; } function reScanHashToken() { if (token === 80 /* PrivateIdentifier */) { - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 62 /* HashToken */; } return token; } function reScanQuestionToken() { Debug.assert(token === 60 /* QuestionQuestionToken */, "'reScanQuestionToken' should only be called on a '??'"); - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 57 /* QuestionToken */; } function scanJsxToken(allowMultilineJsxText = true) { - startPos = tokenPos = pos; + fullStartPos = tokenStart = pos; if (pos >= end) { return token = 1 /* EndOfFileToken */; } @@ -13150,7 +13152,7 @@ } pos++; } - tokenValue = text.substring(startPos, pos); + tokenValue = text.substring(fullStartPos, pos); return firstNonWhitespace === -1 ? 12 /* JsxTextAllWhiteSpaces */ : 11 /* JsxText */; } function scanJsxIdentifier() { @@ -13184,7 +13186,7 @@ return token; } function scanJsxAttributeValue() { - startPos = pos; + fullStartPos = pos; switch (text.charCodeAt(pos)) { case 34 /* doubleQuote */: case 39 /* singleQuote */: @@ -13198,11 +13200,32 @@ } } function reScanJsxAttributeValue() { - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; return scanJsxAttributeValue(); } + function scanJSDocCommentTextToken(inBackticks) { + fullStartPos = tokenStart = pos; + tokenFlags = 0 /* None */; + if (pos >= end) { + return token = 1 /* EndOfFileToken */; + } + for (let ch = text.charCodeAt(pos); pos < end && (!isLineBreak(ch) && ch !== 96 /* backtick */); ch = codePointAt(text, ++pos)) { + if (!inBackticks) { + if (ch === 123 /* openBrace */) { + break; + } else if (ch === 64 /* at */ && pos - 1 >= 0 && isWhiteSpaceSingleLine(text.charCodeAt(pos - 1)) && !(pos + 1 < end && isWhiteSpaceLike(text.charCodeAt(pos + 1)))) { + break; + } + } + } + if (pos === tokenStart) { + return scanJsDocToken(); + } + tokenValue = text.substring(tokenStart, pos); + return token = 81 /* JSDocCommentTextToken */; + } function scanJsDocToken() { - startPos = tokenPos = pos; + fullStartPos = tokenStart = pos; tokenFlags = 0 /* None */; if (pos >= end) { return token = 1 /* EndOfFileToken */; @@ -13274,7 +13297,7 @@ let char = ch; while (pos < end && isIdentifierPart(char = codePointAt(text, pos), languageVersion) || text.charCodeAt(pos) === 45 /* minus */) pos += charSize(char); - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); if (char === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } @@ -13285,16 +13308,16 @@ } function speculationHelper(callback, isLookahead) { const savePos = pos; - const saveStartPos = startPos; - const saveTokenPos = tokenPos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; const saveToken = token; const saveTokenValue = tokenValue; const saveTokenFlags = tokenFlags; const result = callback(); if (!result || isLookahead) { pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; token = saveToken; tokenValue = saveTokenValue; tokenFlags = saveTokenFlags; @@ -13304,8 +13327,8 @@ function scanRange(start3, length3, callback) { const saveEnd = end; const savePos = pos; - const saveStartPos = startPos; - const saveTokenPos = tokenPos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; const saveToken = token; const saveTokenValue = tokenValue; const saveTokenFlags = tokenFlags; @@ -13314,8 +13337,8 @@ const result = callback(); end = saveEnd; pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; token = saveToken; tokenValue = saveTokenValue; tokenFlags = saveTokenFlags; @@ -13345,7 +13368,7 @@ function setText(newText, start3, length3) { text = newText || ""; end = length3 === void 0 ? text.length : start3 + length3; - setTextPos(start3 || 0); + resetTokenState(start3 || 0); } function setOnError(errorCallback) { onError = errorCallback; @@ -13356,11 +13379,11 @@ function setLanguageVariant(variant) { languageVariant = variant; } - function setTextPos(textPos) { - Debug.assert(textPos >= 0); - pos = textPos; - startPos = textPos; - tokenPos = textPos; + function resetTokenState(position) { + Debug.assert(position >= 0); + pos = position; + fullStartPos = position; + tokenStart = position; token = 0 /* Unknown */; tokenValue = void 0; tokenFlags = 0 /* None */; @@ -13530,16 +13553,16 @@ ); } function getTypeParameterOwner(d) { - if (d && d.kind === 165 /* TypeParameter */) { + if (d && d.kind === 166 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 261 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 262 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent2) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 173 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 174 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -13565,14 +13588,14 @@ node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 257 /* VariableDeclaration */) { + if (node.kind === 258 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 258 /* VariableDeclarationList */) { + if (node && node.kind === 259 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 240 /* VariableStatement */) { + if (node && node.kind === 241 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -13705,30 +13728,30 @@ return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 223 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { + if (expr.kind === 224 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return expr.name; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 214 /* ParenthesizedExpression */: { + case 215 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 253 /* LabeledStatement */: { + case 254 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -13759,16 +13782,16 @@ switch (declaration.kind) { case 79 /* Identifier */: return declaration; - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: { + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 163 /* QualifiedName */) { + if (name.kind === 164 /* QualifiedName */) { return name.right; } break; } - case 210 /* CallExpression */: - case 223 /* BinaryExpression */: { + case 211 /* CallExpression */: + case 224 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -13784,15 +13807,15 @@ return void 0; } } - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 343 /* JSDocEnumTag */: + case 344 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -14039,10 +14062,10 @@ return getJSDocTags(node).filter((doc) => doc.kind === kind); } function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 324 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 325 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 327 /* JSDocLink */ ? "link" : link.kind === 328 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 328 /* JSDocLink */ ? "link" : link.kind === 329 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -14058,7 +14081,7 @@ return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 323 /* JSDoc */); + Debug.assert(node.parent.kind === 324 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -14086,7 +14109,7 @@ return node.kind === 79 /* Identifier */ || node.kind === 80 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 175 /* SetAccessor */ || node.kind === 174 /* GetAccessor */; + return node.kind === 176 /* SetAccessor */ || node.kind === 175 /* GetAccessor */; } function isPropertyAccessChain(node) { return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); @@ -14099,7 +14122,7 @@ } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */ || kind === 210 /* CallExpression */ || kind === 232 /* NonNullExpression */); + return !!(node.flags & 32 /* OptionalChain */) && (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */ || kind === 211 /* CallExpression */ || kind === 233 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -14111,7 +14134,7 @@ return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + return node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -14123,34 +14146,34 @@ return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 249 /* BreakStatement */ || node.kind === 248 /* ContinueStatement */; + return node.kind === 250 /* BreakStatement */ || node.kind === 249 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 277 /* NamespaceExport */ || node.kind === 276 /* NamedExports */; + return node.kind === 278 /* NamespaceExport */ || node.kind === 277 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 305 /* UnparsedText */: - case 306 /* UnparsedInternalText */: + case 306 /* UnparsedText */: + case 307 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 303 /* UnparsedPrologue */ || node.kind === 307 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 304 /* UnparsedPrologue */ || node.kind === 308 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 351 /* JSDocPropertyTag */ || node.kind === 344 /* JSDocParameterTag */; + return node.kind === 352 /* JSDocPropertyTag */ || node.kind === 345 /* JSDocParameterTag */; } function isNode(node) { return isNodeKind(node.kind); } function isNodeKind(kind) { - return kind >= 163 /* FirstNode */; + return kind >= 164 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 162 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 163 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -14166,11 +14189,11 @@ } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: case 13 /* RegularExpressionLiteral */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: return true; } return false; @@ -14190,23 +14213,23 @@ } function isTypeOnlyImportDeclaration(node) { switch (node.kind) { - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.isTypeOnly; - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: return node.isTypeOnly; } return false; } function isTypeOnlyExportDeclaration(node) { switch (node.kind) { - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause; - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return node.parent.isTypeOnly; } return false; @@ -14236,21 +14259,21 @@ } function isModifierKind(token) { switch (token) { - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 132 /* AsyncKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 88 /* DefaultKeyword */: - case 93 /* ExportKeyword */: - case 101 /* InKeyword */: - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 124 /* StaticKeyword */: - case 145 /* OutKeyword */: - case 161 /* OverrideKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 133 /* AsyncKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 89 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 102 /* InKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 125 /* StaticKeyword */: + case 146 /* OutKeyword */: + case 162 /* OverrideKeyword */: return true; } return false; @@ -14259,22 +14282,22 @@ return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 124 /* StaticKeyword */ || idToken === 161 /* OverrideKeyword */ || idToken === 127 /* AccessorKeyword */; + return isParameterPropertyModifier(idToken) || idToken === 125 /* StaticKeyword */ || idToken === 162 /* OverrideKeyword */ || idToken === 128 /* AccessorKeyword */; } function isModifier(node) { return isModifierKind(node.kind); } function isEntityName(node) { const kind = node.kind; - return kind === 163 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 164 /* QualifiedName */ || kind === 79 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 164 /* ComputedPropertyName */; + return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 165 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 203 /* ObjectBindingPattern */ || kind === 204 /* ArrayBindingPattern */; + return kind === 79 /* Identifier */ || kind === 204 /* ObjectBindingPattern */ || kind === 205 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -14286,17 +14309,17 @@ return node && isFunctionLikeDeclarationKind(node.kind); } function isBooleanLiteral(node) { - return node.kind === 110 /* TrueKeyword */ || node.kind === 95 /* FalseKeyword */; + return node.kind === 111 /* TrueKeyword */ || node.kind === 96 /* FalseKeyword */; } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: return false; @@ -14304,14 +14327,14 @@ } function isFunctionLikeKind(kind) { switch (kind) { - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 181 /* FunctionType */: - case 320 /* JSDocFunctionType */: - case 182 /* ConstructorType */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 182 /* FunctionType */: + case 321 /* JSDocFunctionType */: + case 183 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -14322,22 +14345,22 @@ } function isClassElement(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 169 /* PropertyDeclaration */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 178 /* IndexSignature */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 237 /* SemicolonClassElement */; + return kind === 174 /* Constructor */ || kind === 170 /* PropertyDeclaration */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 179 /* IndexSignature */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 238 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */); + return node && (node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */); } function isAccessor(node) { - return node && (node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */); + return node && (node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -14345,10 +14368,10 @@ } function isNamedClassElement(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: return true; default: return false; @@ -14359,22 +14382,22 @@ } function isTypeElement(node) { const kind = node.kind; - return kind === 177 /* ConstructSignature */ || kind === 176 /* CallSignature */ || kind === 168 /* PropertySignature */ || kind === 170 /* MethodSignature */ || kind === 178 /* IndexSignature */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 178 /* ConstructSignature */ || kind === 177 /* CallSignature */ || kind === 169 /* PropertySignature */ || kind === 171 /* MethodSignature */ || kind === 179 /* IndexSignature */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 301 /* SpreadAssignment */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 302 /* SpreadAssignment */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return true; } return false; @@ -14382,23 +14405,23 @@ function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 204 /* ArrayBindingPattern */ || kind === 203 /* ObjectBindingPattern */; + return kind === 205 /* ArrayBindingPattern */ || kind === 204 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 206 /* ArrayLiteralExpression */ || kind === 207 /* ObjectLiteralExpression */; + return kind === 207 /* ArrayLiteralExpression */ || kind === 208 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 205 /* BindingElement */ || kind === 229 /* OmittedExpression */; + return kind === 206 /* BindingElement */ || kind === 230 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: return true; } return false; @@ -14411,40 +14434,40 @@ } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 203 /* ObjectBindingPattern */: - case 207 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 208 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return true; } return false; } function isArrayBindingOrAssignmentElement(node) { switch (node.kind) { - case 205 /* BindingElement */: - case 229 /* OmittedExpression */: - case 227 /* SpreadElement */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: + case 206 /* BindingElement */: + case 230 /* OmittedExpression */: + case 228 /* SpreadElement */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return true; } return isAssignmentExpression( @@ -14455,50 +14478,50 @@ } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */; + return kind === 209 /* PropertyAccessExpression */ || kind === 164 /* QualifiedName */ || kind === 203 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */; + return kind === 209 /* PropertyAccessExpression */ || kind === 164 /* QualifiedName */; } function isCallLikeExpression(node) { switch (node.kind) { - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 167 /* Decorator */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 168 /* Decorator */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 210 /* CallExpression */ || node.kind === 211 /* NewExpression */; + return node.kind === 211 /* CallExpression */ || node.kind === 212 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 225 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; + return kind === 226 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 211 /* NewExpression */: - case 210 /* CallExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: - case 212 /* TaggedTemplateExpression */: - case 206 /* ArrayLiteralExpression */: - case 214 /* ParenthesizedExpression */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 212 /* NewExpression */: + case 211 /* CallExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: + case 213 /* TaggedTemplateExpression */: + case 207 /* ArrayLiteralExpression */: + case 215 /* ParenthesizedExpression */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 13 /* RegularExpressionLiteral */: @@ -14506,17 +14529,17 @@ case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: - case 108 /* ThisKeyword */: - case 110 /* TrueKeyword */: - case 106 /* SuperKeyword */: - case 232 /* NonNullExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 233 /* MetaProperty */: - case 100 /* ImportKeyword */: - case 279 /* MissingDeclaration */: + case 226 /* TemplateExpression */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 109 /* ThisKeyword */: + case 111 /* TrueKeyword */: + case 107 /* SuperKeyword */: + case 233 /* NonNullExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 234 /* MetaProperty */: + case 101 /* ImportKeyword */: + case 280 /* MissingDeclaration */: return true; default: return false; @@ -14527,13 +14550,13 @@ } function isUnaryExpressionKind(kind) { switch (kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: - case 217 /* DeleteExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 220 /* AwaitExpression */: - case 213 /* TypeAssertionExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 218 /* DeleteExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 221 /* AwaitExpression */: + case 214 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -14541,9 +14564,9 @@ } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return true; - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; default: return false; @@ -14551,10 +14574,10 @@ } function isLiteralTypeLiteral(node) { switch (node.kind) { - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 221 /* PrefixUnaryExpression */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 222 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -14565,16 +14588,16 @@ } function isExpressionKind(kind) { switch (kind) { - case 224 /* ConditionalExpression */: - case 226 /* YieldExpression */: - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 227 /* SpreadElement */: - case 231 /* AsExpression */: - case 229 /* OmittedExpression */: - case 357 /* CommaListExpression */: - case 356 /* PartiallyEmittedExpression */: - case 235 /* SatisfiesExpression */: + case 225 /* ConditionalExpression */: + case 227 /* YieldExpression */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 228 /* SpreadElement */: + case 232 /* AsExpression */: + case 230 /* OmittedExpression */: + case 358 /* CommaListExpression */: + case 357 /* PartiallyEmittedExpression */: + case 236 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -14582,20 +14605,20 @@ } function isAssertionExpression(node) { const kind = node.kind; - return kind === 213 /* TypeAssertionExpression */ || kind === 231 /* AsExpression */; + return kind === 214 /* TypeAssertionExpression */ || kind === 232 /* AsExpression */; } function isNotEmittedOrPartiallyEmittedNode(node) { return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return true; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -14613,7 +14636,7 @@ return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); } function isForInOrOfStatement(node) { - return node.kind === 246 /* ForInStatement */ || node.kind === 247 /* ForOfStatement */; + return node.kind === 247 /* ForInStatement */ || node.kind === 248 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -14626,89 +14649,89 @@ } function isModuleBody(node) { const kind = node.kind; - return kind === 265 /* ModuleBlock */ || kind === 264 /* ModuleDeclaration */ || kind === 79 /* Identifier */; + return kind === 266 /* ModuleBlock */ || kind === 265 /* ModuleDeclaration */ || kind === 79 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 265 /* ModuleBlock */ || kind === 264 /* ModuleDeclaration */; + return kind === 266 /* ModuleBlock */ || kind === 265 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 264 /* ModuleDeclaration */; + return kind === 79 /* Identifier */ || kind === 265 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 272 /* NamedImports */ || kind === 271 /* NamespaceImport */; + return kind === 273 /* NamedImports */ || kind === 272 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */ || node.kind === 263 /* EnumDeclaration */; + return node.kind === 265 /* ModuleDeclaration */ || node.kind === 264 /* EnumDeclaration */; } function canHaveSymbol(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 205 /* BindingElement */: - case 210 /* CallExpression */: - case 176 /* CallSignature */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 172 /* ClassStaticBlockDeclaration */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 209 /* ElementAccessExpression */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: - case 278 /* ExportSpecifier */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 206 /* BindingElement */: + case 211 /* CallExpression */: + case 177 /* CallSignature */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 173 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 210 /* ElementAccessExpression */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: + case 279 /* ExportSpecifier */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: case 79 /* Identifier */: - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: - case 320 /* JSDocFunctionType */: - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: - case 326 /* JSDocSignature */: - case 349 /* JSDocTypedefTag */: - case 325 /* JSDocTypeLiteral */: - case 288 /* JsxAttribute */: - case 289 /* JsxAttributes */: - case 290 /* JsxSpreadAttribute */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 199 /* NamedTupleMember */: - case 277 /* NamespaceExport */: - case 267 /* NamespaceExportDeclaration */: - case 271 /* NamespaceImport */: - case 211 /* NewExpression */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: + case 321 /* JSDocFunctionType */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 327 /* JSDocSignature */: + case 350 /* JSDocTypedefTag */: + case 326 /* JSDocTypeLiteral */: + case 289 /* JsxAttribute */: + case 290 /* JsxAttributes */: + case 291 /* JsxSpreadAttribute */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 200 /* NamedTupleMember */: + case 278 /* NamespaceExport */: + case 268 /* NamespaceExportDeclaration */: + case 272 /* NamespaceImport */: + case 212 /* NewExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - case 207 /* ObjectLiteralExpression */: - case 166 /* Parameter */: - case 208 /* PropertyAccessExpression */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 308 /* SourceFile */: - case 301 /* SpreadAssignment */: + case 208 /* ObjectLiteralExpression */: + case 167 /* Parameter */: + case 209 /* PropertyAccessExpression */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 309 /* SourceFile */: + case 302 /* SpreadAssignment */: case 10 /* StringLiteral */: - case 262 /* TypeAliasDeclaration */: - case 184 /* TypeLiteral */: - case 165 /* TypeParameter */: - case 257 /* VariableDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 185 /* TypeLiteral */: + case 166 /* TypeParameter */: + case 258 /* VariableDeclaration */: return true; default: return false; @@ -14716,53 +14739,53 @@ } function canHaveLocals(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 238 /* Block */: - case 176 /* CallSignature */: - case 266 /* CaseBlock */: - case 295 /* CatchClause */: - case 172 /* ClassStaticBlockDeclaration */: - case 191 /* ConditionalType */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: - case 178 /* IndexSignature */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 349 /* JSDocTypedefTag */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 175 /* SetAccessor */: - case 308 /* SourceFile */: - case 262 /* TypeAliasDeclaration */: + case 217 /* ArrowFunction */: + case 239 /* Block */: + case 177 /* CallSignature */: + case 267 /* CaseBlock */: + case 296 /* CatchClause */: + case 173 /* ClassStaticBlockDeclaration */: + case 192 /* ConditionalType */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: + case 179 /* IndexSignature */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 350 /* JSDocTypedefTag */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 176 /* SetAccessor */: + case 309 /* SourceFile */: + case 263 /* TypeAliasDeclaration */: return true; default: return false; } } function isDeclarationKind(kind) { - return kind === 216 /* ArrowFunction */ || kind === 205 /* BindingElement */ || kind === 260 /* ClassDeclaration */ || kind === 228 /* ClassExpression */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 173 /* Constructor */ || kind === 263 /* EnumDeclaration */ || kind === 302 /* EnumMember */ || kind === 278 /* ExportSpecifier */ || kind === 259 /* FunctionDeclaration */ || kind === 215 /* FunctionExpression */ || kind === 174 /* GetAccessor */ || kind === 270 /* ImportClause */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 273 /* ImportSpecifier */ || kind === 261 /* InterfaceDeclaration */ || kind === 288 /* JsxAttribute */ || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 264 /* ModuleDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 271 /* NamespaceImport */ || kind === 277 /* NamespaceExport */ || kind === 166 /* Parameter */ || kind === 299 /* PropertyAssignment */ || kind === 169 /* PropertyDeclaration */ || kind === 168 /* PropertySignature */ || kind === 175 /* SetAccessor */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 262 /* TypeAliasDeclaration */ || kind === 165 /* TypeParameter */ || kind === 257 /* VariableDeclaration */ || kind === 349 /* JSDocTypedefTag */ || kind === 341 /* JSDocCallbackTag */ || kind === 351 /* JSDocPropertyTag */; + return kind === 217 /* ArrowFunction */ || kind === 206 /* BindingElement */ || kind === 261 /* ClassDeclaration */ || kind === 229 /* ClassExpression */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 174 /* Constructor */ || kind === 264 /* EnumDeclaration */ || kind === 303 /* EnumMember */ || kind === 279 /* ExportSpecifier */ || kind === 260 /* FunctionDeclaration */ || kind === 216 /* FunctionExpression */ || kind === 175 /* GetAccessor */ || kind === 271 /* ImportClause */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 274 /* ImportSpecifier */ || kind === 262 /* InterfaceDeclaration */ || kind === 289 /* JsxAttribute */ || kind === 172 /* MethodDeclaration */ || kind === 171 /* MethodSignature */ || kind === 265 /* ModuleDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 272 /* NamespaceImport */ || kind === 278 /* NamespaceExport */ || kind === 167 /* Parameter */ || kind === 300 /* PropertyAssignment */ || kind === 170 /* PropertyDeclaration */ || kind === 169 /* PropertySignature */ || kind === 176 /* SetAccessor */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 263 /* TypeAliasDeclaration */ || kind === 166 /* TypeParameter */ || kind === 258 /* VariableDeclaration */ || kind === 350 /* JSDocTypedefTag */ || kind === 342 /* JSDocCallbackTag */ || kind === 352 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 259 /* FunctionDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 267 /* NamespaceExportDeclaration */; + return kind === 260 /* FunctionDeclaration */ || kind === 280 /* MissingDeclaration */ || kind === 261 /* ClassDeclaration */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 275 /* ExportAssignment */ || kind === 268 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 355 /* NotEmittedStatement */ || kind === 359 /* EndOfDeclarationMarker */ || kind === 358 /* MergeDeclarationMarker */; + return kind === 250 /* BreakStatement */ || kind === 249 /* ContinueStatement */ || kind === 257 /* DebuggerStatement */ || kind === 244 /* DoStatement */ || kind === 242 /* ExpressionStatement */ || kind === 240 /* EmptyStatement */ || kind === 247 /* ForInStatement */ || kind === 248 /* ForOfStatement */ || kind === 246 /* ForStatement */ || kind === 243 /* IfStatement */ || kind === 254 /* LabeledStatement */ || kind === 251 /* ReturnStatement */ || kind === 253 /* SwitchStatement */ || kind === 255 /* ThrowStatement */ || kind === 256 /* TryStatement */ || kind === 241 /* VariableStatement */ || kind === 245 /* WhileStatement */ || kind === 252 /* WithStatement */ || kind === 356 /* NotEmittedStatement */ || kind === 360 /* EndOfDeclarationMarker */ || kind === 359 /* MergeDeclarationMarker */; } function isDeclaration(node) { - if (node.kind === 165 /* TypeParameter */) { - return node.parent && node.parent.kind !== 348 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 166 /* TypeParameter */) { + return node.parent && node.parent.kind !== 349 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -14777,10 +14800,10 @@ return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 238 /* Block */) + if (node.kind !== 239 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 255 /* TryStatement */ || node.parent.kind === 295 /* CatchClause */) { + if (node.parent.kind === 256 /* TryStatement */ || node.parent.kind === 296 /* CatchClause */) { return false; } } @@ -14788,50 +14811,50 @@ } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 238 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 239 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 280 /* ExternalModuleReference */ || kind === 163 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 281 /* ExternalModuleReference */ || kind === 164 /* QualifiedName */ || kind === 79 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 108 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 208 /* PropertyAccessExpression */; + return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 209 /* PropertyAccessExpression */; } function isJsxChild(node) { const kind = node.kind; - return kind === 281 /* JsxElement */ || kind === 291 /* JsxExpression */ || kind === 282 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 285 /* JsxFragment */; + return kind === 282 /* JsxElement */ || kind === 292 /* JsxExpression */ || kind === 283 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 286 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 288 /* JsxAttribute */ || kind === 290 /* JsxSpreadAttribute */; + return kind === 289 /* JsxAttribute */ || kind === 291 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 10 /* StringLiteral */ || kind === 291 /* JsxExpression */; + return kind === 10 /* StringLiteral */ || kind === 292 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 283 /* JsxOpeningElement */ || kind === 282 /* JsxSelfClosingElement */; + return kind === 284 /* JsxOpeningElement */ || kind === 283 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */; + return kind === 293 /* CaseClause */ || kind === 294 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */; + return node.kind >= 313 /* FirstJSDocNode */ && node.kind <= 354 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 323 /* JSDoc */ || node.kind === 322 /* JSDocNamepathType */ || node.kind === 324 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 324 /* JSDoc */ || node.kind === 323 /* JSDocNamepathType */ || node.kind === 325 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */; + return node.kind >= 331 /* FirstJSDocTagNode */ && node.kind <= 354 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 175 /* SetAccessor */; + return node.kind === 176 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 174 /* GetAccessor */; + return node.kind === 175 /* GetAccessor */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) @@ -14847,22 +14870,22 @@ } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: - case 299 /* PropertyAssignment */: - case 302 /* EnumMember */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: + case 300 /* PropertyAssignment */: + case 303 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 288 /* JsxAttribute */ || node.kind === 290 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 289 /* JsxAttribute */ || node.kind === 291 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 180 /* TypeReference */ || node.kind === 230 /* ExpressionWithTypeArguments */; + return node.kind === 181 /* TypeReference */ || node.kind === 231 /* ExpressionWithTypeArguments */; } var MAX_SMI_X86 = 1073741823; function guessIndentation(lines) { @@ -14890,7 +14913,7 @@ return node.kind === 10 /* StringLiteral */ || node.kind === 14 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 327 /* JSDocLink */ || node.kind === 328 /* JSDocLinkCode */ || node.kind === 329 /* JSDocLinkPlain */; + return node.kind === 328 /* JSDocLink */ || node.kind === 329 /* JSDocLinkCode */ || node.kind === 330 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -14898,7 +14921,7 @@ } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 321 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 322 /* JSDocVariadicType */; } // src/compiler/utilities.ts @@ -15095,7 +15118,7 @@ } } function getSourceFileOfNode(node) { - while (node && node.kind !== 308 /* SourceFile */) { + while (node && node.kind !== 309 /* SourceFile */) { node = node.parent; } return node; @@ -15108,11 +15131,11 @@ } function isStatementWithLocals(node) { switch (node.kind) { - case 238 /* Block */: - case 266 /* CaseBlock */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return true; } return false; @@ -15271,7 +15294,7 @@ if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 355 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return skipTrivia( @@ -15794,7 +15817,7 @@ } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 257 /* VariableDeclaration */ && node.parent.kind === 295 /* CatchClause */; + return node.kind === 258 /* VariableDeclaration */ && node.parent.kind === 296 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 10 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -15812,10 +15835,10 @@ return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 264 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 265 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 308 /* SourceFile */ || node.kind === 264 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 309 /* SourceFile */ || node.kind === 265 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { return !!(module2.flags & 1024 /* GlobalAugmentation */); @@ -15825,9 +15848,9 @@ } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return isExternalModule(node.parent); - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -15874,24 +15897,24 @@ } function isBlockScope(node, parentNode) { switch (node.kind) { - case 308 /* SourceFile */: - case 266 /* CaseBlock */: - case 295 /* CatchClause */: - case 264 /* ModuleDeclaration */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 169 /* PropertyDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: + case 309 /* SourceFile */: + case 267 /* CaseBlock */: + case 296 /* CatchClause */: + case 265 /* ModuleDeclaration */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 170 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return true; - case 238 /* Block */: + case 239 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; @@ -15899,9 +15922,9 @@ function isDeclarationWithTypeParameters(node) { Debug.type(node); switch (node.kind) { - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: - case 326 /* JSDocSignature */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 327 /* JSDocSignature */: return true; default: assertType(node); @@ -15911,25 +15934,25 @@ function isDeclarationWithTypeParameterChildren(node) { Debug.type(node); switch (node.kind) { - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 320 /* JSDocFunctionType */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 348 /* JSDocTemplateTag */: - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 321 /* JSDocFunctionType */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 349 /* JSDocTemplateTag */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: assertType(node); @@ -15938,8 +15961,8 @@ } function isAnyImportSyntax(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: return true; default: return false; @@ -15950,15 +15973,15 @@ } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 240 /* VariableStatement */: - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 241 /* VariableStatement */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: return true; default: return false; @@ -15987,7 +16010,7 @@ return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 164 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 165 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a2; @@ -15999,7 +16022,7 @@ case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; @@ -16012,20 +16035,20 @@ } function entityNameToString(name) { switch (name.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return "this"; case 80 /* PrivateIdentifier */: case 79 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 314 /* JSDocMemberName */: + case 315 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); default: return Debug.assertNever(name); @@ -16112,8 +16135,8 @@ pos ); scanner2.scan(); - const start2 = scanner2.getTokenPos(); - return createTextSpanFromBounds(start2, scanner2.getTextPos()); + const start2 = scanner2.getTokenStart(); + return createTextSpanFromBounds(start2, scanner2.getTokenEnd()); } function scanTokenAtPosition(sourceFile, pos) { const scanner2 = createScanner( @@ -16131,7 +16154,7 @@ } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 238 /* Block */) { + if (node.body && node.body.kind === 239 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -16143,7 +16166,7 @@ function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 308 /* SourceFile */: { + case 309 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -16155,35 +16178,35 @@ } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 262 /* TypeAliasDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 271 /* NamespaceImport */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 263 /* TypeAliasDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 272 /* NamespaceImport */: errorNode = node.name; break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: { + case 293 /* CaseClause */: + case 294 /* DefaultClause */: { const start2 = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start2, end); } - case 250 /* ReturnStatement */: - case 226 /* YieldExpression */: { + case 251 /* ReturnStatement */: + case 227 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } @@ -16222,19 +16245,19 @@ return !!(getCombinedNodeFlags(node) & 1 /* Let */); } function isSuperCall(n) { - return n.kind === 210 /* CallExpression */ && n.expression.kind === 106 /* SuperKeyword */; + return n.kind === 211 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 210 /* CallExpression */ && n.expression.kind === 100 /* ImportKeyword */; + return n.kind === 211 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; } function isImportMeta(n) { - return isMetaProperty(n) && n.keywordToken === 100 /* ImportKeyword */ && n.name.escapedText === "meta"; + return isMetaProperty(n) && n.keywordToken === 101 /* ImportKeyword */ && n.name.escapedText === "meta"; } function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 241 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; + return node.kind === 242 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -16252,7 +16275,7 @@ return node.kind !== 11 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 166 /* Parameter */ || node.kind === 165 /* TypeParameter */ || node.kind === 215 /* FunctionExpression */ || node.kind === 216 /* ArrowFunction */ || node.kind === 214 /* ParenthesizedExpression */ || node.kind === 257 /* VariableDeclaration */ || node.kind === 278 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 167 /* Parameter */ || node.kind === 166 /* TypeParameter */ || node.kind === 216 /* FunctionExpression */ || node.kind === 217 /* ArrowFunction */ || node.kind === 215 /* ParenthesizedExpression */ || node.kind === 258 /* VariableDeclaration */ || node.kind === 279 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } var fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; @@ -16260,81 +16283,82 @@ var fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; var defaultLibReferenceRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (179 /* FirstTypeNode */ <= node.kind && node.kind <= 202 /* LastTypeNode */) { + if (180 /* FirstTypeNode */ <= node.kind && node.kind <= 203 /* LastTypeNode */) { return true; } switch (node.kind) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 152 /* StringKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 149 /* ObjectKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 153 /* StringKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 150 /* ObjectKeyword */: + case 156 /* UndefinedKeyword */: + case 105 /* NullKeyword */: + case 145 /* NeverKeyword */: return true; - case 114 /* VoidKeyword */: - return node.parent.kind !== 219 /* VoidExpression */; - case 230 /* ExpressionWithTypeArguments */: + case 115 /* VoidKeyword */: + return node.parent.kind !== 220 /* VoidExpression */; + case 231 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 165 /* TypeParameter */: - return node.parent.kind === 197 /* MappedType */ || node.parent.kind === 192 /* InferType */; + case 166 /* TypeParameter */: + return node.parent.kind === 198 /* MappedType */ || node.parent.kind === 193 /* InferType */; case 79 /* Identifier */: - if (node.parent.kind === 163 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 164 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 79 /* Identifier */ || node.kind === 163 /* QualifiedName */ || node.kind === 208 /* PropertyAccessExpression */, + node.kind === 79 /* Identifier */ || node.kind === 164 /* QualifiedName */ || node.kind === 209 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 163 /* QualifiedName */: - case 208 /* PropertyAccessExpression */: - case 108 /* ThisKeyword */: { + case 164 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 109 /* ThisKeyword */: { const { parent: parent2 } = node; - if (parent2.kind === 183 /* TypeQuery */) { + if (parent2.kind === 184 /* TypeQuery */) { return false; } - if (parent2.kind === 202 /* ImportType */) { + if (parent2.kind === 203 /* ImportType */) { return !parent2.isTypeOf; } - if (179 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 202 /* LastTypeNode */) { + if (180 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 203 /* LastTypeNode */) { return true; } switch (parent2.kind) { - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isHeritageClause(parent2.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent2); - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return node === parent2.constraint; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return node === parent2.constraint; - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 166 /* Parameter */: - case 257 /* VariableDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 167 /* Parameter */: + case 258 /* VariableDeclaration */: return node === parent2.type; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return node === parent2.type; - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return node === parent2.type; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return node === parent2.type; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return contains(parent2.typeArguments, node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return false; } } @@ -16354,23 +16378,23 @@ return traverse(body); function traverse(node) { switch (node.kind) { - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitor(node); - case 266 /* CaseBlock */: - case 238 /* Block */: - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 251 /* WithStatement */: - case 252 /* SwitchStatement */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 253 /* LabeledStatement */: - case 255 /* TryStatement */: - case 295 /* CatchClause */: + case 267 /* CaseBlock */: + case 239 /* Block */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 252 /* WithStatement */: + case 253 /* SwitchStatement */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 254 /* LabeledStatement */: + case 256 /* TryStatement */: + case 296 /* CatchClause */: return forEachChild(node, traverse); } } @@ -16379,21 +16403,21 @@ return traverse(body); function traverse(node) { switch (node.kind) { - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 263 /* EnumDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 165 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -16404,9 +16428,9 @@ } } function getRestParameterElementType(node) { - if (node && node.kind === 185 /* ArrayType */) { + if (node && node.kind === 186 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 180 /* TypeReference */) { + } else if (node && node.kind === 181 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -16414,26 +16438,26 @@ } function getMembersOfDeclaration(node) { switch (node.kind) { - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 184 /* TypeLiteral */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 185 /* TypeLiteral */: return node.members; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 205 /* BindingElement */: - case 302 /* EnumMember */: - case 166 /* Parameter */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 300 /* ShorthandPropertyAssignment */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 303 /* EnumMember */: + case 167 /* Parameter */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 301 /* ShorthandPropertyAssignment */: + case 258 /* VariableDeclaration */: return true; } } @@ -16443,7 +16467,7 @@ return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 258 /* VariableDeclarationList */ && node.parent.parent.kind === 240 /* VariableStatement */; + return node.parent.kind === 259 /* VariableDeclarationList */ && node.parent.parent.kind === 241 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -16460,13 +16484,13 @@ } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return true; } return false; @@ -16476,20 +16500,20 @@ if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 253 /* LabeledStatement */) { + if (node.statement.kind !== 254 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 238 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 239 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 171 /* MethodDeclaration */ && node.parent.kind === 207 /* ObjectLiteralExpression */; + return node && node.kind === 172 /* MethodDeclaration */ && node.parent.kind === 208 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 171 /* MethodDeclaration */ || node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */) && (node.parent.kind === 207 /* ObjectLiteralExpression */ || node.parent.kind === 228 /* ClassExpression */); + return (node.kind === 172 /* MethodDeclaration */ || node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */) && (node.parent.kind === 208 /* ObjectLiteralExpression */ || node.parent.kind === 229 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -16499,7 +16523,7 @@ } function getPropertyAssignment(objectLiteral, key, key2) { return objectLiteral.properties.filter((property) => { - if (property.kind === 299 /* PropertyAssignment */) { + if (property.kind === 300 /* PropertyAssignment */) { const propName = tryGetTextOfPropertyName(property.name); return key === propName || !!key2 && key2 === propName; } @@ -16543,63 +16567,63 @@ return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration); } function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) { - Debug.assert(node.kind !== 308 /* SourceFile */); + Debug.assert(node.kind !== 309 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) { return node; } node = node.parent.parent; break; - case 167 /* Decorator */: - if (node.parent.kind === 166 /* Parameter */ && isClassElement(node.parent.parent)) { + case 168 /* Decorator */: + if (node.parent.kind === 167 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 264 /* ModuleDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 263 /* EnumDeclaration */: - case 308 /* SourceFile */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 265 /* ModuleDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 264 /* EnumDeclaration */: + case 309 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 169 /* PropertyDeclaration */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 170 /* PropertyDeclaration */: return true; - case 238 /* Block */: + case 239 /* Block */: switch (node.parent.kind) { - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -16631,9 +16655,9 @@ ); if (container) { switch (container.kind) { - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return container; } } @@ -16646,26 +16670,26 @@ return void 0; } switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: node = node.parent; break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: return node; - case 167 /* Decorator */: - if (node.parent.kind === 166 /* Parameter */ && isClassElement(node.parent.parent)) { + case 168 /* Decorator */: + if (node.parent.kind === 167 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -16675,54 +16699,54 @@ } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 215 /* FunctionExpression */ || func.kind === 216 /* ArrowFunction */) { + if (func.kind === 216 /* FunctionExpression */ || func.kind === 217 /* ArrowFunction */) { let prev = func; let parent2 = func.parent; - while (parent2.kind === 214 /* ParenthesizedExpression */) { + while (parent2.kind === 215 /* ParenthesizedExpression */) { prev = parent2; parent2 = parent2.parent; } - if (parent2.kind === 210 /* CallExpression */ && parent2.expression === prev) { + if (parent2.kind === 211 /* CallExpression */ && parent2.expression === prev) { return parent2; } } } function isSuperOrSuperProperty(node) { - return node.kind === 106 /* SuperKeyword */ || isSuperProperty(node); + return node.kind === 107 /* SuperKeyword */ || isSuperProperty(node); } function isSuperProperty(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && node.expression.kind === 106 /* SuperKeyword */; + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && node.expression.kind === 108 /* ThisKeyword */; + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a2; - return !!node && isVariableDeclaration(node) && ((_a2 = node.initializer) == null ? void 0 : _a2.kind) === 108 /* ThisKeyword */; + return !!node && isVariableDeclaration(node) && ((_a2 = node.initializer) == null ? void 0 : _a2.kind) === 109 /* ThisKeyword */; } function isThisInitializedObjectBindingExpression(node) { - return !!node && (isShorthandPropertyAssignment(node) || isPropertyAssignment(node)) && isBinaryExpression(node.parent.parent) && node.parent.parent.operatorToken.kind === 63 /* EqualsToken */ && node.parent.parent.right.kind === 108 /* ThisKeyword */; + return !!node && (isShorthandPropertyAssignment(node) || isPropertyAssignment(node)) && isBinaryExpression(node.parent.parent) && node.parent.parent.operatorToken.kind === 63 /* EqualsToken */ && node.parent.parent.right.kind === 109 /* ThisKeyword */; } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 79 /* Identifier */: - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return node.tag; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -16733,20 +16757,20 @@ return false; } switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return true; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return !useLegacyDecorators; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2)); - case 166 /* Parameter */: + case 167 /* Parameter */: if (!useLegacyDecorators) return false; - return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 173 /* Constructor */ || parent2.kind === 171 /* MethodDeclaration */ || parent2.kind === 175 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 260 /* ClassDeclaration */; + return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 174 /* Constructor */ || parent2.kind === 172 /* MethodDeclaration */ || parent2.kind === 176 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 261 /* ClassDeclaration */; } return false; } @@ -16758,13 +16782,13 @@ } function childIsDecorated(useLegacyDecorators, node, parent2) { switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent2)); default: return false; @@ -16815,73 +16839,73 @@ } function isJSXTagName(node) { const { parent: parent2 } = node; - if (parent2.kind === 283 /* JsxOpeningElement */ || parent2.kind === 282 /* JsxSelfClosingElement */ || parent2.kind === 284 /* JsxClosingElement */) { + if (parent2.kind === 284 /* JsxOpeningElement */ || parent2.kind === 283 /* JsxSelfClosingElement */ || parent2.kind === 285 /* JsxClosingElement */) { return parent2.tagName === node; } return false; } function isExpressionNode(node) { switch (node.kind) { - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 13 /* RegularExpressionLiteral */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 231 /* AsExpression */: - case 213 /* TypeAssertionExpression */: - case 235 /* SatisfiesExpression */: - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 218 /* TypeOfExpression */: - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: - case 223 /* BinaryExpression */: - case 224 /* ConditionalExpression */: - case 227 /* SpreadElement */: - case 225 /* TemplateExpression */: - case 229 /* OmittedExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: - case 226 /* YieldExpression */: - case 220 /* AwaitExpression */: - case 233 /* MetaProperty */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 232 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 236 /* SatisfiesExpression */: + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 219 /* TypeOfExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 224 /* BinaryExpression */: + case 225 /* ConditionalExpression */: + case 228 /* SpreadElement */: + case 226 /* TemplateExpression */: + case 230 /* OmittedExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: + case 227 /* YieldExpression */: + case 221 /* AwaitExpression */: + case 234 /* MetaProperty */: return true; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); - case 163 /* QualifiedName */: - while (node.parent.kind === 163 /* QualifiedName */) { + case 164 /* QualifiedName */: + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 314 /* JSDocMemberName */: + return node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 315 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); case 80 /* PrivateIdentifier */: - return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 101 /* InKeyword */; + return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 102 /* InKeyword */; case 79 /* Identifier */: - if (node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return isInExpressionContext(node); default: return false; @@ -16890,64 +16914,64 @@ function isInExpressionContext(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 302 /* EnumMember */: - case 299 /* PropertyAssignment */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 303 /* EnumMember */: + case 300 /* PropertyAssignment */: + case 206 /* BindingElement */: return parent2.initializer === node; - case 241 /* ExpressionStatement */: - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 250 /* ReturnStatement */: - case 251 /* WithStatement */: - case 252 /* SwitchStatement */: - case 292 /* CaseClause */: - case 254 /* ThrowStatement */: + case 242 /* ExpressionStatement */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 251 /* ReturnStatement */: + case 252 /* WithStatement */: + case 253 /* SwitchStatement */: + case 293 /* CaseClause */: + case 255 /* ThrowStatement */: return parent2.expression === node; - case 245 /* ForStatement */: + case 246 /* ForStatement */: const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 258 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 259 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 258 /* VariableDeclarationList */ || forInStatement.expression === node; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 259 /* VariableDeclarationList */ || forInStatement.expression === node; + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return node === parent2.expression; - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return node === parent2.expression; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return node === parent2.expression; - case 167 /* Decorator */: - case 291 /* JsxExpression */: - case 290 /* JsxSpreadAttribute */: - case 301 /* SpreadAssignment */: + case 168 /* Decorator */: + case 292 /* JsxExpression */: + case 291 /* JsxSpreadAttribute */: + case 302 /* SpreadAssignment */: return true; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return parent2.expression === node && !isPartOfTypeNode(parent2); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return parent2.objectAssignmentInitializer === node; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return node === parent2.expression; default: return isExpressionNode(parent2); } } function isPartOfTypeQuery(node) { - while (node.kind === 163 /* QualifiedName */ || node.kind === 79 /* Identifier */) { + while (node.kind === 164 /* QualifiedName */ || node.kind === 79 /* Identifier */) { node = node.parent; } - return node.kind === 183 /* TypeQuery */; + return node.kind === 184 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 280 /* ExternalModuleReference */; + return node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 281 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -16957,7 +16981,7 @@ return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 280 /* ExternalModuleReference */; + return node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 281 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -16978,10 +17002,10 @@ return !!node && !!(node.flags & 8388608 /* JSDoc */); } function isJSDocIndexSignature(node) { - return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 152 /* StringKeyword */ || node.typeArguments[0].kind === 148 /* NumberKeyword */); + return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 153 /* StringKeyword */ || node.typeArguments[0].kind === 149 /* NumberKeyword */); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 210 /* CallExpression */) { + if (callExpression.kind !== 211 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -17058,9 +17082,9 @@ function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 215 /* FunctionExpression */ || e.kind === 216 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 216 /* FunctionExpression */ || e.kind === 217 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 215 /* FunctionExpression */ || initializer.kind === 228 /* ClassExpression */ || initializer.kind === 216 /* ArrowFunction */) { + if (initializer.kind === 216 /* FunctionExpression */ || initializer.kind === 229 /* ClassExpression */ || initializer.kind === 217 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -17091,7 +17115,7 @@ if (isPropertyNameLiteral(name) && isPropertyNameLiteral(initializer)) { return getTextOfIdentifierOrLiteral(name) === getTextOfIdentifierOrLiteral(initializer); } - if (isMemberName(name) && isLiteralLikeAccess(initializer) && (initializer.expression.kind === 108 /* ThisKeyword */ || isIdentifier(initializer.expression) && (initializer.expression.escapedText === "window" || initializer.expression.escapedText === "self" || initializer.expression.escapedText === "global"))) { + if (isMemberName(name) && isLiteralLikeAccess(initializer) && (initializer.expression.kind === 109 /* ThisKeyword */ || isIdentifier(initializer.expression) && (initializer.expression.escapedText === "window" || initializer.expression.escapedText === "self" || initializer.expression.escapedText === "global"))) { return isSameEntityName(name, getNameOrArgument(initializer)); } if (isLiteralLikeAccess(name) && isLiteralLikeAccess(initializer)) { @@ -17136,14 +17160,14 @@ return isElementAccessExpression(node) && isStringOrNumericLiteralLike(node.argumentExpression); } function isBindableStaticAccessExpression(node, excludeThisKeyword) { - return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 108 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( + return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 109 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( node.expression, /*excludeThisKeyword*/ true )) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 108 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( + return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 109 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( node.expression, /*excludeThisKeyword*/ true @@ -17210,7 +17234,7 @@ return void 0; } function getAssignmentDeclarationPropertyAccessKind(lhs) { - if (lhs.expression.kind === 108 /* ThisKeyword */) { + if (lhs.expression.kind === 109 /* ThisKeyword */) { return 4 /* ThisProperty */; } else if (isModuleExportsAccessExpression(lhs)) { return 2 /* ModuleExports */; @@ -17251,7 +17275,7 @@ return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 241 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 242 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; @@ -17264,29 +17288,29 @@ return false; } const decl = symbol.valueDeclaration; - return decl.kind === 259 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 260 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a2, _b; switch (node.kind) { - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: return (_a2 = findAncestor(node.initializer, (node2) => isRequireCall( node2, /*requireStringLiteralLikeArgument*/ true ))) == null ? void 0 : _a2.arguments[0]; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); - case 270 /* ImportClause */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 278 /* NamespaceExport */: return tryCast(node.parent.moduleSpecifier, isStringLiteralLike); - case 271 /* NamespaceImport */: - case 278 /* ExportSpecifier */: + case 272 /* NamespaceImport */: + case 279 /* ExportSpecifier */: return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); default: Debug.assertNever(node); @@ -17297,18 +17321,18 @@ } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: return node.parent; - case 280 /* ExternalModuleReference */: + case 281 /* ExternalModuleReference */: return node.parent.parent; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return isImportCall(node.parent) || isRequireCall( node.parent, /*checkArg*/ false ) ? node.parent : void 0; - case 198 /* LiteralType */: + case 199 /* LiteralType */: Debug.assert(isStringLiteral(node)); return tryCast(node.parent.parent, isImportTypeNode); default: @@ -17317,16 +17341,16 @@ } function getExternalModuleName(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: return node.moduleSpecifier; - case 268 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 280 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 202 /* ImportType */: + case 269 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 281 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 203 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return node.arguments[0]; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return node.name.kind === 10 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -17334,18 +17358,18 @@ } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return node; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 269 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 270 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -17362,13 +17386,13 @@ function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 166 /* Parameter */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 300 /* ShorthandPropertyAssignment */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 167 /* Parameter */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 301 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -17380,7 +17404,7 @@ return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 349 /* JSDocTypedefTag */ || node.kind === 341 /* JSDocCallbackTag */ || node.kind === 343 /* JSDocEnumTag */; + return node.kind === 350 /* JSDocTypedefTag */ || node.kind === 342 /* JSDocCallbackTag */ || node.kind === 344 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -17393,12 +17417,12 @@ } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return node.initializer; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return node.initializer; } } @@ -17406,26 +17430,26 @@ return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 264 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 265 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveFlowNode(node) { - if (node.kind >= 240 /* FirstStatement */ && node.kind <= 256 /* LastStatement */) { + if (node.kind >= 241 /* FirstStatement */ && node.kind <= 257 /* LastStatement */) { return true; } switch (node.kind) { case 79 /* Identifier */: - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 163 /* QualifiedName */: - case 233 /* MetaProperty */: - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: - case 205 /* BindingElement */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 164 /* QualifiedName */: + case 234 /* MetaProperty */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 206 /* BindingElement */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -17433,71 +17457,71 @@ } function canHaveJSDoc(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 238 /* Block */: - case 249 /* BreakStatement */: - case 176 /* CallSignature */: - case 292 /* CaseClause */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 172 /* ClassStaticBlockDeclaration */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 248 /* ContinueStatement */: - case 256 /* DebuggerStatement */: - case 243 /* DoStatement */: - case 209 /* ElementAccessExpression */: - case 239 /* EmptyStatement */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 239 /* Block */: + case 250 /* BreakStatement */: + case 177 /* CallSignature */: + case 293 /* CaseClause */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 173 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 249 /* ContinueStatement */: + case 257 /* DebuggerStatement */: + case 244 /* DoStatement */: + case 210 /* ElementAccessExpression */: + case 240 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: - case 278 /* ExportSpecifier */: - case 241 /* ExpressionStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: + case 279 /* ExportSpecifier */: + case 242 /* ExpressionStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: case 79 /* Identifier */: - case 242 /* IfStatement */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 253 /* LabeledStatement */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 199 /* NamedTupleMember */: - case 267 /* NamespaceExportDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 166 /* Parameter */: - case 214 /* ParenthesizedExpression */: - case 208 /* PropertyAccessExpression */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 250 /* ReturnStatement */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: - case 252 /* SwitchStatement */: - case 254 /* ThrowStatement */: - case 255 /* TryStatement */: - case 262 /* TypeAliasDeclaration */: - case 165 /* TypeParameter */: - case 257 /* VariableDeclaration */: - case 240 /* VariableStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: + case 243 /* IfStatement */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 254 /* LabeledStatement */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 200 /* NamedTupleMember */: + case 268 /* NamespaceExportDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 167 /* Parameter */: + case 215 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 251 /* ReturnStatement */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: + case 253 /* SwitchStatement */: + case 255 /* ThrowStatement */: + case 256 /* TryStatement */: + case 263 /* TypeAliasDeclaration */: + case 166 /* TypeParameter */: + case 258 /* VariableDeclaration */: + case 241 /* VariableStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: return true; default: return false; @@ -17513,11 +17537,11 @@ if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 166 /* Parameter */) { + if (node.kind === 167 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 165 /* TypeParameter */) { + if (node.kind === 166 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -17537,7 +17561,7 @@ } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 299 /* PropertyAssignment */ || parent2.kind === 274 /* ExportAssignment */ || parent2.kind === 169 /* PropertyDeclaration */ || parent2.kind === 241 /* ExpressionStatement */ && node.kind === 208 /* PropertyAccessExpression */ || parent2.kind === 250 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 300 /* PropertyAssignment */ || parent2.kind === 275 /* ExportAssignment */ || parent2.kind === 170 /* PropertyDeclaration */ || parent2.kind === 242 /* ExpressionStatement */ && node.kind === 209 /* PropertyAccessExpression */ || parent2.kind === 251 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { return parent2; } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isBinaryExpression(parent2) && parent2.operatorToken.kind === 63 /* EqualsToken */)) { return parent2.parent; @@ -17613,32 +17637,32 @@ let parent2 = node.parent; while (true) { switch (parent2.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const binaryOperator = parent2.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 63 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: const unaryOperator = parent2.operator; return unaryOperator === 45 /* PlusPlusToken */ || unaryOperator === 46 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 214 /* ParenthesizedExpression */: - case 206 /* ArrayLiteralExpression */: - case 227 /* SpreadElement */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 207 /* ArrayLiteralExpression */: + case 228 /* SpreadElement */: + case 233 /* NonNullExpression */: node = parent2; break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: node = parent2.parent; break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { return 0 /* None */; } node = parent2.parent; break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (parent2.name === node) { return 0 /* None */; } @@ -17655,22 +17679,22 @@ } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 238 /* Block */: - case 240 /* VariableStatement */: - case 251 /* WithStatement */: - case 242 /* IfStatement */: - case 252 /* SwitchStatement */: - case 266 /* CaseBlock */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 253 /* LabeledStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 255 /* TryStatement */: - case 295 /* CatchClause */: + case 239 /* Block */: + case 241 /* VariableStatement */: + case 252 /* WithStatement */: + case 243 /* IfStatement */: + case 253 /* SwitchStatement */: + case 267 /* CaseBlock */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 254 /* LabeledStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 256 /* TryStatement */: + case 296 /* CatchClause */: return true; } return false; @@ -17685,14 +17709,14 @@ return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 193 /* ParenthesizedType */); + return walkUp(node, 194 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 214 /* ParenthesizedExpression */); + return walkUp(node, 215 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 193 /* ParenthesizedType */) { + while (node && node.kind === 194 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -17708,11 +17732,11 @@ return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 208 /* PropertyAccessExpression */ && node.kind !== 209 /* ElementAccessExpression */) { + if (node.kind !== 209 /* PropertyAccessExpression */ && node.kind !== 210 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 217 /* DeleteExpression */; + return node && node.kind === 218 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -17750,55 +17774,55 @@ } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 164 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 165 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent2 = node.parent; switch (parent2.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 302 /* EnumMember */: - case 299 /* PropertyAssignment */: - case 208 /* PropertyAccessExpression */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 303 /* EnumMember */: + case 300 /* PropertyAssignment */: + case 209 /* PropertyAccessExpression */: return parent2.name === node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return parent2.right === node; - case 205 /* BindingElement */: - case 273 /* ImportSpecifier */: + case 206 /* BindingElement */: + case 274 /* ImportSpecifier */: return parent2.propertyName === node; - case 278 /* ExportSpecifier */: - case 288 /* JsxAttribute */: - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: + case 279 /* ExportSpecifier */: + case 289 /* JsxAttribute */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: return true; } return false; } function isAliasSymbolDeclaration(node) { - if (node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 267 /* NamespaceExportDeclaration */ || node.kind === 270 /* ImportClause */ && !!node.name || node.kind === 271 /* NamespaceImport */ || node.kind === 277 /* NamespaceExport */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 278 /* ExportSpecifier */ || node.kind === 274 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { + if (node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 268 /* NamespaceExportDeclaration */ || node.kind === 271 /* ImportClause */ && !!node.name || node.kind === 272 /* NamespaceImport */ || node.kind === 278 /* NamespaceExport */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 279 /* ExportSpecifier */ || node.kind === 275 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { return true; } return isInJSFile(node) && (isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isPropertyAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableExpression(node.parent.right)); } function getAliasDeclarationFromName(node) { switch (node.parent.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 271 /* NamespaceImport */: - case 278 /* ExportSpecifier */: - case 274 /* ExportAssignment */: - case 268 /* ImportEqualsDeclaration */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 272 /* NamespaceImport */: + case 279 /* ExportSpecifier */: + case 275 /* ExportAssignment */: + case 269 /* ImportEqualsDeclaration */: + case 278 /* NamespaceExport */: return node.parent; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 163 /* QualifiedName */); + } while (node.parent.kind === 164 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -17813,7 +17837,7 @@ return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 300 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 299 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 301 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 300 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -17826,14 +17850,14 @@ return baseType; } function getClassExtendsHeritageElement(node) { - const heritageClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : void 0; } function getEffectiveImplementsTypeNodes(node) { if (isInJSFile(node)) { return getJSDocImplementsTags(node).map((n) => n.class); } else { - const heritageClause = getHeritageClause(node.heritageClauses, 117 /* ImplementsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 118 /* ImplementsKeyword */); return heritageClause == null ? void 0 : heritageClause.types; } } @@ -17841,7 +17865,7 @@ return isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || emptyArray : isClassLike(node) ? concatenate(singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || emptyArray : emptyArray; } function getInterfaceBaseTypeNodes(node) { - const heritageClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); return heritageClause ? heritageClause.types : void 0; } function getHeritageClause(clauses, kind) { @@ -17864,16 +17888,16 @@ return void 0; } function isKeyword(token) { - return 81 /* FirstKeyword */ <= token && token <= 162 /* LastKeyword */; + return 82 /* FirstKeyword */ <= token && token <= 163 /* LastKeyword */; } function isContextualKeyword(token) { - return 126 /* FirstContextualKeyword */ <= token && token <= 162 /* LastContextualKeyword */; + return 127 /* FirstContextualKeyword */ <= token && token <= 163 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); } function isFutureReservedKeyword(token) { - return 117 /* FirstFutureReservedWord */ <= token && token <= 125 /* LastFutureReservedWord */; + return 118 /* FirstFutureReservedWord */ <= token && token <= 126 /* LastFutureReservedWord */; } function isStringANonContextualKeyword(name) { const token = stringToToken(name); @@ -17904,13 +17928,13 @@ } let flags = 0 /* Normal */; switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -17923,10 +17947,10 @@ } function isAsyncFunction(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -17942,7 +17966,7 @@ return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 164 /* ComputedPropertyName */ || name.kind === 209 /* ElementAccessExpression */)) { + if (!(name.kind === 165 /* ComputedPropertyName */ || name.kind === 210 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -17956,7 +17980,7 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -18009,13 +18033,13 @@ function isAnonymousFunctionDefinition(node, cb) { node = skipOuterExpressions(node); switch (node.kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: if (node.name) { return false; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: break; default: return false; @@ -18024,19 +18048,19 @@ } function isNamedEvaluationSource(node) { switch (node.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return !isProtoSetter(node.name); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return !!node.objectAssignmentInitializer; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return isIdentifier(node.name) && !!node.initializer; - case 166 /* Parameter */: + case 167 /* Parameter */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return !!node.initializer; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 76 /* AmpersandAmpersandEqualsToken */: @@ -18045,7 +18069,7 @@ return isIdentifier(node.left); } break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return true; } return false; @@ -18054,18 +18078,18 @@ if (!isNamedEvaluationSource(node)) return false; switch (node.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb); - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isAnonymousFunctionDefinition(node.right, cb); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return isAnonymousFunctionDefinition(node.expression, cb); } } @@ -18074,17 +18098,17 @@ } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 166 /* Parameter */; + return root.kind === 167 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 205 /* BindingElement */) { + while (node.kind === 206 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 215 /* FunctionExpression */ || kind === 259 /* FunctionDeclaration */ || kind === 216 /* ArrowFunction */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 264 /* ModuleDeclaration */ || kind === 308 /* SourceFile */; + return kind === 174 /* Constructor */ || kind === 216 /* FunctionExpression */ || kind === 260 /* FunctionDeclaration */ || kind === 217 /* ArrowFunction */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 265 /* ModuleDeclaration */ || kind === 309 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); @@ -18099,22 +18123,22 @@ })(Associativity || {}); function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 211 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 212 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 211 /* NewExpression */: + case 212 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 221 /* PrefixUnaryExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 220 /* AwaitExpression */: - case 224 /* ConditionalExpression */: - case 226 /* YieldExpression */: + case 222 /* PrefixUnaryExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 221 /* AwaitExpression */: + case 225 /* ConditionalExpression */: + case 227 /* YieldExpression */: return 1 /* Right */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (operator) { case 42 /* AsteriskAsteriskToken */: case 63 /* EqualsToken */: @@ -18140,13 +18164,13 @@ } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 211 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 212 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 223 /* BinaryExpression */) { + if (expression.kind === 224 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 221 /* PrefixUnaryExpression */ || expression.kind === 222 /* PostfixUnaryExpression */) { + } else if (expression.kind === 222 /* PrefixUnaryExpression */ || expression.kind === 223 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -18182,15 +18206,15 @@ })(OperatorPrecedence || {}); function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return 0 /* Comma */; - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return 1 /* Spread */; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return 2 /* Yield */; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return 4 /* Conditional */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (operatorKind) { case 27 /* CommaToken */: return 0 /* Comma */; @@ -18214,51 +18238,51 @@ default: return getBinaryOperatorPrecedence(operatorKind); } - case 213 /* TypeAssertionExpression */: - case 232 /* NonNullExpression */: - case 221 /* PrefixUnaryExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 220 /* AwaitExpression */: + case 214 /* TypeAssertionExpression */: + case 233 /* NonNullExpression */: + case 222 /* PrefixUnaryExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 221 /* AwaitExpression */: return 16 /* Unary */; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return 17 /* Update */; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return 18 /* LeftHandSide */; - case 211 /* NewExpression */: + case 212 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 212 /* TaggedTemplateExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 233 /* MetaProperty */: + case 213 /* TaggedTemplateExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 234 /* MetaProperty */: return 19 /* Member */; - case 231 /* AsExpression */: - case 235 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 236 /* SatisfiesExpression */: return 11 /* Relational */; - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 228 /* ClassExpression */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 229 /* ClassExpression */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 214 /* ParenthesizedExpression */: - case 229 /* OmittedExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: + case 226 /* TemplateExpression */: + case 215 /* ParenthesizedExpression */: + case 230 /* OmittedExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -18287,10 +18311,10 @@ case 31 /* GreaterThanToken */: case 32 /* LessThanEqualsToken */: case 33 /* GreaterThanEqualsToken */: - case 102 /* InstanceOfKeyword */: - case 101 /* InKeyword */: - case 128 /* AsKeyword */: - case 150 /* SatisfiesKeyword */: + case 103 /* InstanceOfKeyword */: + case 102 /* InKeyword */: + case 129 /* AsKeyword */: + case 151 /* SatisfiesKeyword */: return 11 /* Relational */; case 47 /* LessThanLessThanToken */: case 48 /* GreaterThanGreaterThanToken */: @@ -18311,7 +18335,7 @@ function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return !!i.expression; case 11 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -18819,7 +18843,7 @@ while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */; + return node.parent.kind === 184 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.escapedText === "this"; @@ -18831,9 +18855,9 @@ let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 174 /* GetAccessor */) { + if (accessor.kind === 175 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 175 /* SetAccessor */) { + } else if (accessor.kind === 176 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -18849,10 +18873,10 @@ } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 174 /* GetAccessor */ && !getAccessor) { + if (member.kind === 175 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 175 /* SetAccessor */ && !setAccessor) { + if (member.kind === 176 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -18884,7 +18908,7 @@ return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 323 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 324 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -19074,7 +19098,7 @@ return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 162 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 163 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -19149,37 +19173,37 @@ } function modifierToFlag(token) { switch (token) { - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: return 32 /* Static */; - case 123 /* PublicKeyword */: + case 124 /* PublicKeyword */: return 4 /* Public */; - case 122 /* ProtectedKeyword */: + case 123 /* ProtectedKeyword */: return 16 /* Protected */; - case 121 /* PrivateKeyword */: + case 122 /* PrivateKeyword */: return 8 /* Private */; - case 126 /* AbstractKeyword */: + case 127 /* AbstractKeyword */: return 256 /* Abstract */; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return 128 /* Accessor */; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return 1 /* Export */; - case 136 /* DeclareKeyword */: + case 137 /* DeclareKeyword */: return 2 /* Ambient */; - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: return 2048 /* Const */; - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return 1024 /* Default */; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return 512 /* Async */; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: return 64 /* Readonly */; - case 161 /* OverrideKeyword */: + case 162 /* OverrideKeyword */: return 16384 /* Override */; - case 101 /* InKeyword */: + case 102 /* InKeyword */: return 32768 /* In */; - case 145 /* OutKeyword */: + case 146 /* OutKeyword */: return 65536 /* Out */; - case 167 /* Decorator */: + case 168 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -19212,7 +19236,7 @@ function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node) { if (isExpressionWithTypeArguments(node)) { if (isHeritageClause(node.parent) && isClassLike(node.parent.parent)) { - return { class: node.parent.parent, isImplements: node.parent.token === 117 /* ImplementsKeyword */ }; + return { class: node.parent.parent, isImplements: node.parent.token === 118 /* ImplementsKeyword */ }; } if (isJSDocAugmentsTag(node.parent)) { const host = getEffectiveJSDocHost(node.parent); @@ -19236,7 +19260,7 @@ true )) { const kind = node.left.kind; - return kind === 207 /* ObjectLiteralExpression */ || kind === 206 /* ArrayLiteralExpression */; + return kind === 208 /* ObjectLiteralExpression */ || kind === 207 /* ArrayLiteralExpression */; } return false; } @@ -19250,12 +19274,12 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 79 /* Identifier */); @@ -19263,7 +19287,7 @@ } } function isDottedName(node) { - return node.kind === 79 /* Identifier */ || node.kind === 108 /* ThisKeyword */ || node.kind === 106 /* SuperKeyword */ || node.kind === 233 /* MetaProperty */ || node.kind === 208 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 214 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 234 /* MetaProperty */ || node.kind === 209 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 215 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -19288,7 +19312,7 @@ return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 163 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 164 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; @@ -19297,10 +19321,10 @@ return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } function isEmptyObjectLiteral(expression) { - return expression.kind === 207 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 208 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 206 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 207 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -19569,8 +19593,8 @@ const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 263 /* EnumDeclaration */: - case 264 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -19622,34 +19646,29 @@ } function accessKind(node) { const { parent: parent2 } = node; - if (!parent2) - return 0 /* Read */; - switch (parent2.kind) { - case 214 /* ParenthesizedExpression */: + switch (parent2 == null ? void 0 : parent2.kind) { + case 215 /* ParenthesizedExpression */: return accessKind(parent2); - case 222 /* PostfixUnaryExpression */: - case 221 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const { operator } = parent2; - return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? writeOrReadWrite() : 0 /* Read */; - case 223 /* BinaryExpression */: + return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */; + case 224 /* BinaryExpression */: const { left, operatorToken } = parent2; - return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : writeOrReadWrite() : 0 /* Read */; - case 208 /* PropertyAccessExpression */: + return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */; + case 209 /* PropertyAccessExpression */: return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 299 /* PropertyAssignment */: { + case 300 /* PropertyAssignment */: { const parentAccess = accessKind(parent2.parent); return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return accessKind(parent2); default: return 0 /* Read */; } - function writeOrReadWrite() { - return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 241 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; - } } function reverseAccessKind(a) { switch (a) { @@ -19758,16 +19777,16 @@ return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 139 /* IntrinsicKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */; + return kind >= 180 /* FirstTypeNode */ && kind <= 203 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 158 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 161 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 156 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 140 /* IntrinsicKeyword */ || kind === 231 /* ExpressionWithTypeArguments */ || kind === 316 /* JSDocAllType */ || kind === 317 /* JSDocUnknownType */ || kind === 318 /* JSDocNullableType */ || kind === 319 /* JSDocNonNullableType */ || kind === 320 /* JSDocOptionalType */ || kind === 321 /* JSDocFunctionType */ || kind === 322 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */; + return node.kind === 209 /* PropertyAccessExpression */ || node.kind === 210 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 208 /* PropertyAccessExpression */) { + if (node.kind === 209 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 209 /* ElementAccessExpression */); + Debug.assert(node.kind === 210 /* ElementAccessExpression */); return node.argumentExpression; } function isBundleFileTextLike(section) { @@ -19780,7 +19799,7 @@ } } function isNamedImportsOrExports(node) { - return node.kind === 272 /* NamedImports */ || node.kind === 276 /* NamedExports */; + return node.kind === 273 /* NamedImports */ || node.kind === 277 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -19793,12 +19812,12 @@ return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 208 /* PropertyAccessExpression */) { + if (access.kind === 209 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 209 /* ElementAccessExpression */) { + } else if (access.kind === 210 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -19820,28 +19839,28 @@ function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: node = node.operand; continue; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: node = node.left; continue; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: node = node.condition; continue; - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: node = node.tag; continue; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 231 /* AsExpression */: - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: - case 232 /* NonNullExpression */: - case 356 /* PartiallyEmittedExpression */: - case 235 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 233 /* NonNullExpression */: + case 357 /* PartiallyEmittedExpression */: + case 236 /* SatisfiesExpression */: node = node.expression; continue; } @@ -20984,7 +21003,7 @@ result = scanner2.scan(); } const flags = scanner2.getTokenFlags(); - return success && result === 9 /* BigIntLiteral */ && scanner2.getTextPos() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); + return success && result === 9 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); } function isValidTypeOnlyAliasUseSite(useSite) { return !!(useSite.flags & 16777216 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); @@ -20993,33 +21012,33 @@ return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 79 /* Identifier */ || node.kind === 208 /* PropertyAccessExpression */) { + while (node.kind === 79 /* Identifier */ || node.kind === 209 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 164 /* ComputedPropertyName */) { + if (node.kind !== 165 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 261 /* InterfaceDeclaration */ || containerKind === 184 /* TypeLiteral */; + return containerKind === 262 /* InterfaceDeclaration */ || containerKind === 185 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 79 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent2) => { switch (parent2.kind) { - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return true; - case 208 /* PropertyAccessExpression */: - case 230 /* ExpressionWithTypeArguments */: + case 209 /* PropertyAccessExpression */: + case 231 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 117 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 261 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 262 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -21131,20 +21150,20 @@ if (!node.parent) return void 0; switch (node.kind) { - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: const { parent: parent3 } = node; - return parent3.kind === 192 /* InferType */ ? void 0 : parent3.typeParameters; - case 166 /* Parameter */: + return parent3.kind === 193 /* InferType */ ? void 0 : parent3.typeParameters; + case 167 /* Parameter */: return node.parent.parameters; - case 201 /* TemplateLiteralTypeSpan */: + case 202 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return node.parent.templateSpans; - case 167 /* Decorator */: { + case 168 /* Decorator */: { const { parent: parent4 } = node; return canHaveDecorators(parent4) ? parent4.modifiers : void 0; } - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return node.parent.heritageClauses; } const { parent: parent2 } = node; @@ -21152,43 +21171,43 @@ return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent2.kind) { - case 184 /* TypeLiteral */: - case 261 /* InterfaceDeclaration */: + case 185 /* TypeLiteral */: + case 262 /* InterfaceDeclaration */: return isTypeElement(node) ? parent2.members : void 0; - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return parent2.types; - case 186 /* TupleType */: - case 206 /* ArrayLiteralExpression */: - case 357 /* CommaListExpression */: - case 272 /* NamedImports */: - case 276 /* NamedExports */: + case 187 /* TupleType */: + case 207 /* ArrayLiteralExpression */: + case 358 /* CommaListExpression */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: return parent2.elements; - case 207 /* ObjectLiteralExpression */: - case 289 /* JsxAttributes */: + case 208 /* ObjectLiteralExpression */: + case 290 /* JsxAttributes */: return parent2.properties; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 281 /* JsxElement */: - case 285 /* JsxFragment */: + case 282 /* JsxElement */: + case 286 /* JsxFragment */: return isJsxChild(node) ? parent2.children : void 0; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent2.typeArguments : void 0; - case 238 /* Block */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 266 /* ModuleBlock */: return parent2.statements; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return parent2.clauses; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return isClassElement(node) ? parent2.members : void 0; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return isEnumMember(node) ? parent2.members : void 0; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return parent2.statements; } } @@ -21197,7 +21216,7 @@ if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 216 /* ArrowFunction */) { + if (node.kind !== 217 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -21210,14 +21229,14 @@ return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 257 /* VariableDeclaration */ && node.parent.kind === 295 /* CatchClause */; + return node.kind === 258 /* VariableDeclaration */ && node.parent.kind === 296 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 215 /* FunctionExpression */ || node.kind === 216 /* ArrowFunction */; + return node.kind === 216 /* FunctionExpression */ || node.kind === 217 /* ArrowFunction */; } function escapeSnippetText(text) { return text.replace(/\$/gm, () => "\\$"); @@ -21280,23 +21299,23 @@ } function getParameterTypeNode(parameter) { var _a2; - return parameter.kind === 344 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; + return parameter.kind === 345 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; } function isTypeDeclaration(node) { switch (node.kind) { - case 165 /* TypeParameter */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 166 /* TypeParameter */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return true; - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.isTypeOnly; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -21310,7 +21329,7 @@ return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 320 /* JSDocOptionalType */; } function canUsePropertyAccess(name, languageVersion) { if (name.length === 0) { @@ -21325,17 +21344,17 @@ } function isJSDocOptionalParameter(node) { return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType - (node.type && node.type.kind === 319 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */)); + (node.type && node.type.kind === 320 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 320 /* JSDocOptionalType */)); } function isOptionalDeclaration(declaration) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return !!declaration.questionToken; - case 166 /* Parameter */: + case 167 /* Parameter */: return !!declaration.questionToken || isJSDocOptionalParameter(declaration); - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: return isOptionalJSDocPropertyLikeTag(declaration); default: return false; @@ -21343,7 +21362,7 @@ } function isNonNullAccess(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression); + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && isNonNullExpression(node.expression); } function isJSDocSatisfiesExpression(node) { return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); @@ -21477,16 +21496,16 @@ return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(223 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(223 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(224 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(224 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 216 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 217 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 226 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 227 /* YieldExpression */) { return false; } return true; @@ -21520,7 +21539,7 @@ if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { + if (node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -21533,7 +21552,7 @@ } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 214 /* ParenthesizedExpression */) { + if (skipped.kind === 215 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -21559,7 +21578,7 @@ return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(224 /* ConditionalExpression */, 57 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(225 /* ConditionalExpression */, 57 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -21580,8 +21599,8 @@ /*stopAtCallExpression*/ false ).kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: needsParens = true; } } @@ -21594,16 +21613,16 @@ true ); switch (leftmostExpr.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 211 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 212 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -21621,7 +21640,7 @@ function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(223 /* BinaryExpression */, 27 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(224 /* BinaryExpression */, 27 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -21629,7 +21648,7 @@ if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 215 /* FunctionExpression */ || kind === 216 /* ArrowFunction */) { + if (kind === 216 /* FunctionExpression */ || kind === 217 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -21644,7 +21663,7 @@ /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 207 /* ObjectLiteralExpression */ || leftmostExpressionKind === 215 /* FunctionExpression */) { + if (leftmostExpressionKind === 208 /* ObjectLiteralExpression */ || leftmostExpressionKind === 216 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -21654,31 +21673,31 @@ body, /*stopAtCallExpressions*/ false - ).kind === 207 /* ObjectLiteralExpression */)) { + ).kind === 208 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 191 /* ConditionalType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 192 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -21688,8 +21707,8 @@ } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -21699,23 +21718,23 @@ } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 192 /* InferType */: - case 195 /* TypeOperator */: - case 183 /* TypeQuery */: + case 193 /* InferType */: + case 196 /* TypeOperator */: + case 184 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -21873,11 +21892,11 @@ } function convertToAssignmentPattern(node) { switch (node.kind) { - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 203 /* ObjectBindingPattern */: - case 207 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 208 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -22235,40 +22254,40 @@ updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(315 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(316 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(316 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(317 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(318 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(319 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(318 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(319 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(317 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(318 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(317 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(318 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(319 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(320 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(319 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(320 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(321 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(322 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(321 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(322 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(322 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(323 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(322 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(323 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -22308,82 +22327,82 @@ updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(347 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(348 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(347 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(345 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(346 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(345 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(346 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(346 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(347 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(346 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(347 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(333 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(334 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(333 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(334 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(335 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(336 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(335 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(336 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(339 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(339 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(340 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(340 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(341 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(341 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(334 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(335 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(334 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(335 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(352 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(353 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(354 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(354 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -22846,50 +22865,50 @@ return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 162 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 163 /* LastToken */, "Invalid token"); Debug.assert(token <= 14 /* FirstTemplateToken */ || token >= 17 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 8 /* FirstLiteralToken */ || token >= 14 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 79 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); const node = createBaseToken(token); let transformFlags = 0 /* None */; switch (token) { - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; break; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 126 /* AbstractKeyword */: - case 136 /* DeclareKeyword */: - case 85 /* ConstKeyword */: - case 131 /* AnyKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 144 /* NeverKeyword */: - case 149 /* ObjectKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - case 161 /* OverrideKeyword */: - case 152 /* StringKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 114 /* VoidKeyword */: - case 157 /* UnknownKeyword */: - case 155 /* UndefinedKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 127 /* AbstractKeyword */: + case 137 /* DeclareKeyword */: + case 86 /* ConstKeyword */: + case 132 /* AnyKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 145 /* NeverKeyword */: + case 150 /* ObjectKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + case 162 /* OverrideKeyword */: + case 153 /* StringKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 115 /* VoidKeyword */: + case 158 /* UnknownKeyword */: + case 156 /* UndefinedKeyword */: transformFlags = 1 /* ContainsTypeScript */; break; - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: transformFlags = 1024 /* ContainsES2015 */ | 134217728 /* ContainsLexicalSuper */; node.flowNode = void 0; break; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: transformFlags = 1024 /* ContainsES2015 */; break; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: transformFlags = 16777216 /* ContainsClassFields */; break; - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: transformFlags = 16384 /* ContainsLexicalThis */; node.flowNode = void 0; break; @@ -22900,19 +22919,19 @@ return node; } function createSuper() { - return createToken(106 /* SuperKeyword */); + return createToken(107 /* SuperKeyword */); } function createThis() { - return createToken(108 /* ThisKeyword */); + return createToken(109 /* ThisKeyword */); } function createNull() { - return createToken(104 /* NullKeyword */); + return createToken(105 /* NullKeyword */); } function createTrue() { - return createToken(110 /* TrueKeyword */); + return createToken(111 /* TrueKeyword */); } function createFalse() { - return createToken(95 /* FalseKeyword */); + return createToken(96 /* FalseKeyword */); } function createModifier(kind) { return createToken(kind); @@ -22920,39 +22939,39 @@ function createModifiersFromModifierFlags(flags2) { const result = []; if (flags2 & 1 /* Export */) - result.push(createModifier(93 /* ExportKeyword */)); + result.push(createModifier(94 /* ExportKeyword */)); if (flags2 & 2 /* Ambient */) - result.push(createModifier(136 /* DeclareKeyword */)); + result.push(createModifier(137 /* DeclareKeyword */)); if (flags2 & 1024 /* Default */) - result.push(createModifier(88 /* DefaultKeyword */)); + result.push(createModifier(89 /* DefaultKeyword */)); if (flags2 & 2048 /* Const */) - result.push(createModifier(85 /* ConstKeyword */)); + result.push(createModifier(86 /* ConstKeyword */)); if (flags2 & 4 /* Public */) - result.push(createModifier(123 /* PublicKeyword */)); + result.push(createModifier(124 /* PublicKeyword */)); if (flags2 & 8 /* Private */) - result.push(createModifier(121 /* PrivateKeyword */)); + result.push(createModifier(122 /* PrivateKeyword */)); if (flags2 & 16 /* Protected */) - result.push(createModifier(122 /* ProtectedKeyword */)); + result.push(createModifier(123 /* ProtectedKeyword */)); if (flags2 & 256 /* Abstract */) - result.push(createModifier(126 /* AbstractKeyword */)); + result.push(createModifier(127 /* AbstractKeyword */)); if (flags2 & 32 /* Static */) - result.push(createModifier(124 /* StaticKeyword */)); + result.push(createModifier(125 /* StaticKeyword */)); if (flags2 & 16384 /* Override */) - result.push(createModifier(161 /* OverrideKeyword */)); + result.push(createModifier(162 /* OverrideKeyword */)); if (flags2 & 64 /* Readonly */) - result.push(createModifier(146 /* ReadonlyKeyword */)); + result.push(createModifier(147 /* ReadonlyKeyword */)); if (flags2 & 128 /* Accessor */) - result.push(createModifier(127 /* AccessorKeyword */)); + result.push(createModifier(128 /* AccessorKeyword */)); if (flags2 & 512 /* Async */) - result.push(createModifier(132 /* AsyncKeyword */)); + result.push(createModifier(133 /* AsyncKeyword */)); if (flags2 & 32768 /* In */) - result.push(createModifier(101 /* InKeyword */)); + result.push(createModifier(102 /* InKeyword */)); if (flags2 & 65536 /* Out */) - result.push(createModifier(145 /* OutKeyword */)); + result.push(createModifier(146 /* OutKeyword */)); return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(163 /* QualifiedName */); + const node = createBaseNode(164 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -22963,7 +22982,7 @@ return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(164 /* ComputedPropertyName */); + const node = createBaseNode(165 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -22972,7 +22991,7 @@ return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(165 /* TypeParameter */); + const node = createBaseDeclaration(166 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -22987,7 +23006,7 @@ } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { var _a2, _b; - const node = createBaseDeclaration(166 /* Parameter */); + const node = createBaseDeclaration(167 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -23006,7 +23025,7 @@ return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(167 /* Decorator */); + const node = createBaseNode(168 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -23019,7 +23038,7 @@ return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(168 /* PropertySignature */); + const node = createBaseDeclaration(169 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -23039,7 +23058,7 @@ return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(169 /* PropertyDeclaration */); + const node = createBaseDeclaration(170 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; @@ -23055,7 +23074,7 @@ return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(170 /* MethodSignature */); + const node = createBaseDeclaration(171 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -23073,7 +23092,7 @@ return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(171 /* MethodDeclaration */); + const node = createBaseDeclaration(172 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -23110,7 +23129,7 @@ return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(172 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(173 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -23131,7 +23150,7 @@ return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(173 /* Constructor */); + const node = createBaseDeclaration(174 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; @@ -23157,7 +23176,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(174 /* GetAccessor */); + const node = createBaseDeclaration(175 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -23188,7 +23207,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(175 /* SetAccessor */); + const node = createBaseDeclaration(176 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -23220,7 +23239,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(176 /* CallSignature */); + const node = createBaseDeclaration(177 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -23235,7 +23254,7 @@ return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(177 /* ConstructSignature */); + const node = createBaseDeclaration(178 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -23250,7 +23269,7 @@ return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(178 /* IndexSignature */); + const node = createBaseDeclaration(179 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -23265,7 +23284,7 @@ return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(201 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(202 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -23278,7 +23297,7 @@ return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(179 /* TypePredicate */); + const node = createBaseNode(180 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -23289,7 +23308,7 @@ return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(180 /* TypeReference */); + const node = createBaseNode(181 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -23299,7 +23318,7 @@ return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(181 /* FunctionType */); + const node = createBaseDeclaration(182 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -23324,7 +23343,7 @@ return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(182 /* ConstructorType */); + const node = createBaseDeclaration(183 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -23355,7 +23374,7 @@ return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(183 /* TypeQuery */); + const node = createBaseNode(184 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -23365,7 +23384,7 @@ return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(184 /* TypeLiteral */); + const node = createBaseDeclaration(185 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23374,7 +23393,7 @@ return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(185 /* ArrayType */); + const node = createBaseNode(186 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23383,7 +23402,7 @@ return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(186 /* TupleType */); + const node = createBaseNode(187 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23392,7 +23411,7 @@ return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(199 /* NamedTupleMember */); + const node = createBaseDeclaration(200 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -23405,7 +23424,7 @@ return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(187 /* OptionalType */); + const node = createBaseNode(188 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23414,7 +23433,7 @@ return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(188 /* RestType */); + const node = createBaseNode(189 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23432,19 +23451,19 @@ return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(189 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(190 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(190 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(191 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(191 /* ConditionalType */); + const node = createBaseNode(192 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -23458,7 +23477,7 @@ return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(192 /* InferType */); + const node = createBaseNode(193 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23467,7 +23486,7 @@ return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(200 /* TemplateLiteralType */); + const node = createBaseNode(201 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -23477,7 +23496,7 @@ return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(202 /* ImportType */); + const node = createBaseNode(203 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -23490,7 +23509,7 @@ return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(193 /* ParenthesizedType */); + const node = createBaseNode(194 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23499,14 +23518,14 @@ return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(194 /* ThisType */); + const node = createBaseNode(195 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(195 /* TypeOperator */); + const node = createBaseNode(196 /* TypeOperator */); node.operator = operator; - node.type = operator === 146 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); + node.type = operator === 147 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; } @@ -23514,7 +23533,7 @@ return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(196 /* IndexedAccessType */); + const node = createBaseNode(197 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -23524,7 +23543,7 @@ return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(197 /* MappedType */); + const node = createBaseDeclaration(198 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -23540,7 +23559,7 @@ return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(198 /* LiteralType */); + const node = createBaseNode(199 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23549,7 +23568,7 @@ return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(203 /* ObjectBindingPattern */); + const node = createBaseNode(204 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -23561,7 +23580,7 @@ return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(204 /* ArrayBindingPattern */); + const node = createBaseNode(205 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -23570,7 +23589,7 @@ return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(205 /* BindingElement */); + const node = createBaseDeclaration(206 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -23583,7 +23602,7 @@ return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(206 /* ArrayLiteralExpression */); + const node = createBaseNode(207 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -23595,7 +23614,7 @@ return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(207 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(208 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -23606,7 +23625,7 @@ return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(208 /* PropertyAccessExpression */); + const node = createBaseDeclaration(209 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -23656,7 +23675,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(209 /* ElementAccessExpression */); + const node = createBaseDeclaration(210 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -23706,7 +23725,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(210 /* CallExpression */); + const node = createBaseDeclaration(211 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -23763,7 +23782,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(211 /* NewExpression */); + const node = createBaseDeclaration(212 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -23777,7 +23796,7 @@ return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(212 /* TaggedTemplateExpression */); + const node = createBaseNode(213 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -23798,7 +23817,7 @@ return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(213 /* TypeAssertionExpression */); + const node = createBaseNode(214 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23808,7 +23827,7 @@ return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(214 /* ParenthesizedExpression */); + const node = createBaseNode(215 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -23818,7 +23837,7 @@ return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(215 /* FunctionExpression */); + const node = createBaseDeclaration(216 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -23843,7 +23862,7 @@ return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(216 /* ArrowFunction */); + const node = createBaseDeclaration(217 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -23865,7 +23884,7 @@ return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(217 /* DeleteExpression */); + const node = createBaseNode(218 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23874,7 +23893,7 @@ return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(218 /* TypeOfExpression */); + const node = createBaseNode(219 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23883,7 +23902,7 @@ return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(219 /* VoidExpression */); + const node = createBaseNode(220 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23892,7 +23911,7 @@ return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(220 /* AwaitExpression */); + const node = createBaseNode(221 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -23901,7 +23920,7 @@ return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(221 /* PrefixUnaryExpression */); + const node = createBaseNode(222 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -23914,7 +23933,7 @@ return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(222 /* PostfixUnaryExpression */); + const node = createBaseNode(223 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -23927,7 +23946,7 @@ return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(223 /* BinaryExpression */); + const node = createBaseDeclaration(224 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -23947,7 +23966,7 @@ } else if (isLogicalOrCoalescingAssignmentOperator(operatorKind)) { node.transformFlags |= 16 /* ContainsES2021 */; } - if (operatorKind === 101 /* InKeyword */ && isPrivateIdentifier(node.left)) { + if (operatorKind === 102 /* InKeyword */ && isPrivateIdentifier(node.left)) { node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */; } node.jsDoc = void 0; @@ -23960,7 +23979,7 @@ return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(224 /* ConditionalExpression */); + const node = createBaseNode(225 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken != null ? questionToken : createToken(57 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -23973,7 +23992,7 @@ return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(225 /* TemplateExpression */); + const node = createBaseNode(226 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -24048,7 +24067,7 @@ } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(226 /* YieldExpression */); + const node = createBaseNode(227 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -24058,7 +24077,7 @@ return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(227 /* SpreadElement */); + const node = createBaseNode(228 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -24067,7 +24086,7 @@ return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(228 /* ClassExpression */); + const node = createBaseDeclaration(229 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -24081,10 +24100,10 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(229 /* OmittedExpression */); + return createBaseNode(230 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(230 /* ExpressionWithTypeArguments */); + const node = createBaseNode(231 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -24098,7 +24117,7 @@ return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(231 /* AsExpression */); + const node = createBaseNode(232 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -24108,7 +24127,7 @@ return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(232 /* NonNullExpression */); + const node = createBaseNode(233 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -24124,7 +24143,7 @@ return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(235 /* SatisfiesExpression */); + const node = createBaseNode(236 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -24134,7 +24153,7 @@ return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(232 /* NonNullExpression */); + const node = createBaseNode(233 /* NonNullExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, @@ -24149,15 +24168,15 @@ return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(233 /* MetaProperty */); + const node = createBaseNode(234 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); switch (keywordToken) { - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: node.transformFlags |= 1024 /* ContainsES2015 */; break; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: node.transformFlags |= 4 /* ContainsESNext */; break; default: @@ -24170,7 +24189,7 @@ return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(236 /* TemplateSpan */); + const node = createBaseNode(237 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -24180,12 +24199,12 @@ return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(237 /* SemicolonClassElement */); + const node = createBaseNode(238 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(238 /* Block */); + const node = createBaseNode(239 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -24198,7 +24217,7 @@ return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(240 /* VariableStatement */); + const node = createBaseNode(241 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -24213,12 +24232,12 @@ return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(239 /* EmptyStatement */); + const node = createBaseNode(240 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(241 /* ExpressionStatement */); + const node = createBaseNode(242 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -24229,7 +24248,7 @@ return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(242 /* IfStatement */); + const node = createBaseNode(243 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -24242,7 +24261,7 @@ return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(243 /* DoStatement */); + const node = createBaseNode(244 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -24254,7 +24273,7 @@ return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(244 /* WhileStatement */); + const node = createBaseNode(245 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -24266,7 +24285,7 @@ return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(245 /* ForStatement */); + const node = createBaseNode(246 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -24282,7 +24301,7 @@ return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(246 /* ForInStatement */); + const node = createBaseNode(247 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -24297,7 +24316,7 @@ return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(247 /* ForOfStatement */); + const node = createBaseNode(248 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -24315,7 +24334,7 @@ return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(248 /* ContinueStatement */); + const node = createBaseNode(249 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -24326,7 +24345,7 @@ return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(249 /* BreakStatement */); + const node = createBaseNode(250 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -24337,7 +24356,7 @@ return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(250 /* ReturnStatement */); + const node = createBaseNode(251 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -24348,7 +24367,7 @@ return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(251 /* WithStatement */); + const node = createBaseNode(252 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -24360,7 +24379,7 @@ return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(252 /* SwitchStatement */); + const node = createBaseNode(253 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -24373,7 +24392,7 @@ return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(253 /* LabeledStatement */); + const node = createBaseNode(254 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -24385,7 +24404,7 @@ return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(254 /* ThrowStatement */); + const node = createBaseNode(255 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -24396,7 +24415,7 @@ return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(255 /* TryStatement */); + const node = createBaseNode(256 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -24409,14 +24428,14 @@ return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(256 /* DebuggerStatement */); + const node = createBaseNode(257 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { var _a2; - const node = createBaseDeclaration(257 /* VariableDeclaration */); + const node = createBaseDeclaration(258 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -24429,7 +24448,7 @@ return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(258 /* VariableDeclarationList */); + const node = createBaseNode(259 /* VariableDeclarationList */); node.flags |= flags2 & 3 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -24442,7 +24461,7 @@ return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(259 /* FunctionDeclaration */); + const node = createBaseDeclaration(260 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -24478,7 +24497,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(260 /* ClassDeclaration */); + const node = createBaseDeclaration(261 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -24499,7 +24518,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(261 /* InterfaceDeclaration */); + const node = createBaseDeclaration(262 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -24513,7 +24532,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(262 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(263 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -24528,7 +24547,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(263 /* EnumDeclaration */); + const node = createBaseDeclaration(264 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -24541,7 +24560,7 @@ return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(264 /* ModuleDeclaration */); + const node = createBaseDeclaration(265 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); node.name = name; @@ -24561,7 +24580,7 @@ return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(265 /* ModuleBlock */); + const node = createBaseNode(266 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -24571,7 +24590,7 @@ return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(266 /* CaseBlock */); + const node = createBaseNode(267 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -24582,7 +24601,7 @@ return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(267 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(268 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -24599,7 +24618,7 @@ return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(268 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(269 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -24616,7 +24635,7 @@ return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(269 /* ImportDeclaration */); + const node = createBaseNode(270 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -24630,7 +24649,7 @@ return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(270 /* ImportClause */); + const node = createBaseDeclaration(271 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -24645,7 +24664,7 @@ return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(296 /* AssertClause */); + const node = createBaseNode(297 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -24655,7 +24674,7 @@ return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(297 /* AssertEntry */); + const node = createBaseNode(298 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -24665,7 +24684,7 @@ return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(298 /* ImportTypeAssertionContainer */); + const node = createBaseNode(299 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -24674,7 +24693,7 @@ return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(271 /* NamespaceImport */); + const node = createBaseDeclaration(272 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24684,7 +24703,7 @@ return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(277 /* NamespaceExport */); + const node = createBaseDeclaration(278 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24694,7 +24713,7 @@ return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(272 /* NamedImports */); + const node = createBaseNode(273 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24704,7 +24723,7 @@ return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(273 /* ImportSpecifier */); + const node = createBaseDeclaration(274 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -24716,7 +24735,7 @@ return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment2(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(274 /* ExportAssignment */); + const node = createBaseDeclaration(275 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -24734,7 +24753,7 @@ return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(275 /* ExportDeclaration */); + const node = createBaseDeclaration(276 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -24757,7 +24776,7 @@ return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(276 /* NamedExports */); + const node = createBaseNode(277 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24767,7 +24786,7 @@ return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(278 /* ExportSpecifier */); + const node = createBaseNode(279 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -24780,12 +24799,12 @@ return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(279 /* MissingDeclaration */); + const node = createBaseDeclaration(280 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(280 /* ExternalModuleReference */); + const node = createBaseNode(281 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24817,7 +24836,7 @@ return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(320 /* JSDocFunctionType */); + const node = createBaseDeclaration(321 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -24831,7 +24850,7 @@ return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(325 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(326 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -24840,7 +24859,7 @@ return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(312 /* JSDocTypeExpression */); + const node = createBaseNode(313 /* JSDocTypeExpression */); node.type = type; return node; } @@ -24848,7 +24867,7 @@ return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(326 /* JSDocSignature */); + const node = createBaseDeclaration(327 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -24877,7 +24896,7 @@ return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(348 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); + const node = createBaseJSDocTag(349 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -24886,7 +24905,7 @@ return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(349 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(350 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -24898,7 +24917,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(344 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(345 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -24909,7 +24928,7 @@ return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(351 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(352 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -24920,7 +24939,7 @@ return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(341 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(342 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -24932,7 +24951,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(342 /* JSDocOverloadTag */, tagName != null ? tagName : createIdentifier("overload"), comment); + const node = createBaseJSDocTag(343 /* JSDocOverloadTag */, tagName != null ? tagName : createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -24940,7 +24959,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(331 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); + const node = createBaseJSDocTag(332 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); node.class = className; return node; } @@ -24948,12 +24967,12 @@ return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(332 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); + const node = createBaseJSDocTag(333 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(350 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); + const node = createBaseJSDocTag(351 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); node.name = name; return node; } @@ -24961,7 +24980,7 @@ return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(313 /* JSDocNameReference */); + const node = createBaseNode(314 /* JSDocNameReference */); node.name = name; return node; } @@ -24969,7 +24988,7 @@ return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(314 /* JSDocMemberName */); + const node = createBaseNode(315 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -24979,7 +24998,7 @@ return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(327 /* JSDocLink */); + const node = createBaseNode(328 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -24988,7 +25007,7 @@ return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(328 /* JSDocLinkCode */); + const node = createBaseNode(329 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -24997,7 +25016,7 @@ return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(329 /* JSDocLinkPlain */); + const node = createBaseNode(330 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -25024,14 +25043,14 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(330 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(331 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(343 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(343 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(344 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(344 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -25041,7 +25060,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(324 /* JSDocText */); + const node = createBaseNode(325 /* JSDocText */); node.text = text; return node; } @@ -25049,7 +25068,7 @@ return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(323 /* JSDoc */); + const node = createBaseNode(324 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -25058,7 +25077,7 @@ return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(281 /* JsxElement */); + const node = createBaseNode(282 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -25069,7 +25088,7 @@ return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(282 /* JsxSelfClosingElement */); + const node = createBaseNode(283 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -25083,7 +25102,7 @@ return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(283 /* JsxOpeningElement */); + const node = createBaseNode(284 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -25097,7 +25116,7 @@ return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(284 /* JsxClosingElement */); + const node = createBaseNode(285 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -25106,7 +25125,7 @@ return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(285 /* JsxFragment */); + const node = createBaseNode(286 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -25127,17 +25146,17 @@ return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(286 /* JsxOpeningFragment */); + const node = createBaseNode(287 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(287 /* JsxClosingFragment */); + const node = createBaseNode(288 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(288 /* JsxAttribute */); + const node = createBaseDeclaration(289 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -25147,7 +25166,7 @@ return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(289 /* JsxAttributes */); + const node = createBaseDeclaration(290 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -25156,7 +25175,7 @@ return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(290 /* JsxSpreadAttribute */); + const node = createBaseNode(291 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -25165,7 +25184,7 @@ return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(291 /* JsxExpression */); + const node = createBaseNode(292 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -25175,7 +25194,7 @@ return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(292 /* CaseClause */); + const node = createBaseNode(293 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -25186,7 +25205,7 @@ return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(293 /* DefaultClause */); + const node = createBaseNode(294 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -25195,15 +25214,15 @@ return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(294 /* HeritageClause */); + const node = createBaseNode(295 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); switch (token) { - case 94 /* ExtendsKeyword */: + case 95 /* ExtendsKeyword */: node.transformFlags |= 1024 /* ContainsES2015 */; break; - case 117 /* ImplementsKeyword */: + case 118 /* ImplementsKeyword */: node.transformFlags |= 1 /* ContainsTypeScript */; break; default: @@ -25215,7 +25234,7 @@ return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(295 /* CatchClause */); + const node = createBaseNode(296 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -25227,7 +25246,7 @@ return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(299 /* PropertyAssignment */); + const node = createBaseDeclaration(300 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -25249,7 +25268,7 @@ return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(300 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(301 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -25273,7 +25292,7 @@ return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(301 /* SpreadAssignment */); + const node = createBaseDeclaration(302 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -25283,7 +25302,7 @@ return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(302 /* EnumMember */); + const node = createBaseDeclaration(303 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -25294,7 +25313,7 @@ return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(309 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -25375,7 +25394,7 @@ return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(309 /* SourceFile */); node.flags |= source.flags & ~8 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { @@ -25409,7 +25428,7 @@ return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(309 /* Bundle */); + const node = createBaseNode(310 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; @@ -25422,7 +25441,7 @@ return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(310 /* UnparsedSource */); + const node = createBaseNode(311 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -25439,48 +25458,48 @@ return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(303 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(304 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(304 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(305 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 306 /* UnparsedInternalText */ : 305 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 307 /* UnparsedInternalText */ : 306 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(307 /* UnparsedSyntheticReference */); + const node = createBaseNode(308 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(311 /* InputFiles */); + const node = createBaseNode(312 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(234 /* SyntheticExpression */); + const node = createBaseNode(235 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList3(children) { - const node = createBaseNode(354 /* SyntaxList */); + const node = createBaseNode(355 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(355 /* NotEmittedStatement */); + const node = createBaseNode(356 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(356 /* PartiallyEmittedExpression */); + const node = createBaseNode(357 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -25502,7 +25521,7 @@ return node; } function createCommaListExpression(elements) { - const node = createBaseNode(357 /* CommaListExpression */); + const node = createBaseNode(358 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -25511,19 +25530,19 @@ return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createEndOfDeclarationMarker(original) { - const node = createBaseNode(359 /* EndOfDeclarationMarker */); + const node = createBaseNode(360 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createMergeDeclarationMarker(original) { - const node = createBaseNode(358 /* MergeDeclarationMarker */); + const node = createBaseNode(359 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(360 /* SyntheticReferenceExpression */); + const node = createBaseNode(361 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -25756,17 +25775,17 @@ } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 231 /* AsExpression */: + case 232 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -25801,18 +25820,18 @@ switch (target.kind) { case 79 /* Identifier */: return cacheIdentifiers; - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: return false; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -26124,43 +26143,43 @@ } function getDefaultTagNameForKind(kind) { switch (kind) { - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return "type"; - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: return "returns"; - case 346 /* JSDocThisTag */: + case 347 /* JSDocThisTag */: return "this"; - case 343 /* JSDocEnumTag */: + case 344 /* JSDocEnumTag */: return "enum"; - case 333 /* JSDocAuthorTag */: + case 334 /* JSDocAuthorTag */: return "author"; - case 335 /* JSDocClassTag */: + case 336 /* JSDocClassTag */: return "class"; - case 336 /* JSDocPublicTag */: + case 337 /* JSDocPublicTag */: return "public"; - case 337 /* JSDocPrivateTag */: + case 338 /* JSDocPrivateTag */: return "private"; - case 338 /* JSDocProtectedTag */: + case 339 /* JSDocProtectedTag */: return "protected"; - case 339 /* JSDocReadonlyTag */: + case 340 /* JSDocReadonlyTag */: return "readonly"; - case 340 /* JSDocOverrideTag */: + case 341 /* JSDocOverrideTag */: return "override"; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return "template"; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return "typedef"; - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return "param"; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return "prop"; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: return "callback"; - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return "overload"; - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return "augments"; - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -26244,70 +26263,70 @@ children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */) { + if (kind >= 180 /* FirstTypeNode */ && kind <= 203 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 206 /* ArrayLiteralExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 207 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 166 /* Parameter */: + case 167 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 173 /* Constructor */: + case 174 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; - case 131 /* AnyKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 144 /* NeverKeyword */: - case 152 /* StringKeyword */: - case 149 /* ObjectKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 114 /* VoidKeyword */: - case 165 /* TypeParameter */: - case 168 /* PropertySignature */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 132 /* AnyKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 145 /* NeverKeyword */: + case 153 /* StringKeyword */: + case 150 /* ObjectKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 115 /* VoidKeyword */: + case 166 /* TypeParameter */: + case 169 /* PropertySignature */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 295 /* CatchClause */: + case 296 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 213 /* TypeAssertionExpression */: - case 235 /* SatisfiesExpression */: - case 231 /* AsExpression */: - case 356 /* PartiallyEmittedExpression */: - case 214 /* ParenthesizedExpression */: - case 106 /* SuperKeyword */: + case 214 /* TypeAssertionExpression */: + case 236 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 357 /* PartiallyEmittedExpression */: + case 215 /* ParenthesizedExpression */: + case 107 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -26639,7 +26658,7 @@ var _a2; if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = (_a2 = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node)))) != null ? _a2 : Debug.fail("Could not determine parsed source file."); @@ -27048,7 +27067,7 @@ void 0, factory2.createBinaryExpression( propertyName, - 101 /* InKeyword */, + 102 /* InKeyword */, factory2.createIdentifier("obj") ) ) @@ -27942,619 +27961,619 @@ return node.kind === 80 /* PrivateIdentifier */; } function isExportModifier(node) { - return node.kind === 93 /* ExportKeyword */; + return node.kind === 94 /* ExportKeyword */; } function isDefaultModifier(node) { - return node.kind === 88 /* DefaultKeyword */; + return node.kind === 89 /* DefaultKeyword */; } function isAsyncModifier(node) { - return node.kind === 132 /* AsyncKeyword */; + return node.kind === 133 /* AsyncKeyword */; } function isAssertsKeyword(node) { - return node.kind === 129 /* AssertsKeyword */; + return node.kind === 130 /* AssertsKeyword */; } function isAwaitKeyword(node) { - return node.kind === 133 /* AwaitKeyword */; + return node.kind === 134 /* AwaitKeyword */; } function isReadonlyKeyword(node) { - return node.kind === 146 /* ReadonlyKeyword */; + return node.kind === 147 /* ReadonlyKeyword */; } function isStaticModifier(node) { - return node.kind === 124 /* StaticKeyword */; + return node.kind === 125 /* StaticKeyword */; } function isAbstractModifier(node) { - return node.kind === 126 /* AbstractKeyword */; + return node.kind === 127 /* AbstractKeyword */; } function isOverrideModifier(node) { - return node.kind === 161 /* OverrideKeyword */; + return node.kind === 162 /* OverrideKeyword */; } function isAccessorModifier(node) { - return node.kind === 127 /* AccessorKeyword */; + return node.kind === 128 /* AccessorKeyword */; } function isSuperKeyword(node) { - return node.kind === 106 /* SuperKeyword */; + return node.kind === 107 /* SuperKeyword */; } function isImportKeyword(node) { - return node.kind === 100 /* ImportKeyword */; + return node.kind === 101 /* ImportKeyword */; } function isCaseKeyword(node) { - return node.kind === 82 /* CaseKeyword */; + return node.kind === 83 /* CaseKeyword */; } function isQualifiedName(node) { - return node.kind === 163 /* QualifiedName */; + return node.kind === 164 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 164 /* ComputedPropertyName */; + return node.kind === 165 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 165 /* TypeParameter */; + return node.kind === 166 /* TypeParameter */; } function isParameter(node) { - return node.kind === 166 /* Parameter */; + return node.kind === 167 /* Parameter */; } function isDecorator(node) { - return node.kind === 167 /* Decorator */; + return node.kind === 168 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 168 /* PropertySignature */; + return node.kind === 169 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 169 /* PropertyDeclaration */; + return node.kind === 170 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 170 /* MethodSignature */; + return node.kind === 171 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 171 /* MethodDeclaration */; + return node.kind === 172 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 172 /* ClassStaticBlockDeclaration */; + return node.kind === 173 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 173 /* Constructor */; + return node.kind === 174 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 174 /* GetAccessor */; + return node.kind === 175 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 175 /* SetAccessor */; + return node.kind === 176 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 176 /* CallSignature */; + return node.kind === 177 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 177 /* ConstructSignature */; + return node.kind === 178 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 178 /* IndexSignature */; + return node.kind === 179 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 179 /* TypePredicate */; + return node.kind === 180 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 180 /* TypeReference */; + return node.kind === 181 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 181 /* FunctionType */; + return node.kind === 182 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 182 /* ConstructorType */; + return node.kind === 183 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 183 /* TypeQuery */; + return node.kind === 184 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 184 /* TypeLiteral */; + return node.kind === 185 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 185 /* ArrayType */; + return node.kind === 186 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 186 /* TupleType */; + return node.kind === 187 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 199 /* NamedTupleMember */; + return node.kind === 200 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 187 /* OptionalType */; + return node.kind === 188 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 188 /* RestType */; + return node.kind === 189 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 189 /* UnionType */; + return node.kind === 190 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 190 /* IntersectionType */; + return node.kind === 191 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 191 /* ConditionalType */; + return node.kind === 192 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 192 /* InferType */; + return node.kind === 193 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 193 /* ParenthesizedType */; + return node.kind === 194 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 194 /* ThisType */; + return node.kind === 195 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 195 /* TypeOperator */; + return node.kind === 196 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 196 /* IndexedAccessType */; + return node.kind === 197 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 197 /* MappedType */; + return node.kind === 198 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 198 /* LiteralType */; + return node.kind === 199 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 202 /* ImportType */; + return node.kind === 203 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 201 /* TemplateLiteralTypeSpan */; + return node.kind === 202 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 200 /* TemplateLiteralType */; + return node.kind === 201 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 203 /* ObjectBindingPattern */; + return node.kind === 204 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 204 /* ArrayBindingPattern */; + return node.kind === 205 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 205 /* BindingElement */; + return node.kind === 206 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 206 /* ArrayLiteralExpression */; + return node.kind === 207 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 207 /* ObjectLiteralExpression */; + return node.kind === 208 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 208 /* PropertyAccessExpression */; + return node.kind === 209 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 209 /* ElementAccessExpression */; + return node.kind === 210 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 210 /* CallExpression */; + return node.kind === 211 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 211 /* NewExpression */; + return node.kind === 212 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 212 /* TaggedTemplateExpression */; + return node.kind === 213 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 213 /* TypeAssertionExpression */; + return node.kind === 214 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 214 /* ParenthesizedExpression */; + return node.kind === 215 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 215 /* FunctionExpression */; + return node.kind === 216 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 216 /* ArrowFunction */; + return node.kind === 217 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 217 /* DeleteExpression */; + return node.kind === 218 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 218 /* TypeOfExpression */; + return node.kind === 219 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 219 /* VoidExpression */; + return node.kind === 220 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 220 /* AwaitExpression */; + return node.kind === 221 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 221 /* PrefixUnaryExpression */; + return node.kind === 222 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 222 /* PostfixUnaryExpression */; + return node.kind === 223 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 223 /* BinaryExpression */; + return node.kind === 224 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 224 /* ConditionalExpression */; + return node.kind === 225 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 225 /* TemplateExpression */; + return node.kind === 226 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 226 /* YieldExpression */; + return node.kind === 227 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 227 /* SpreadElement */; + return node.kind === 228 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 228 /* ClassExpression */; + return node.kind === 229 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 229 /* OmittedExpression */; + return node.kind === 230 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 230 /* ExpressionWithTypeArguments */; + return node.kind === 231 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 231 /* AsExpression */; + return node.kind === 232 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 235 /* SatisfiesExpression */; + return node.kind === 236 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 232 /* NonNullExpression */; + return node.kind === 233 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 233 /* MetaProperty */; + return node.kind === 234 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 234 /* SyntheticExpression */; + return node.kind === 235 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 356 /* PartiallyEmittedExpression */; + return node.kind === 357 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 357 /* CommaListExpression */; + return node.kind === 358 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 236 /* TemplateSpan */; + return node.kind === 237 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 237 /* SemicolonClassElement */; + return node.kind === 238 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 238 /* Block */; + return node.kind === 239 /* Block */; } function isVariableStatement(node) { - return node.kind === 240 /* VariableStatement */; + return node.kind === 241 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 239 /* EmptyStatement */; + return node.kind === 240 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 241 /* ExpressionStatement */; + return node.kind === 242 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 242 /* IfStatement */; + return node.kind === 243 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 243 /* DoStatement */; + return node.kind === 244 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 244 /* WhileStatement */; + return node.kind === 245 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 245 /* ForStatement */; + return node.kind === 246 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 246 /* ForInStatement */; + return node.kind === 247 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 247 /* ForOfStatement */; + return node.kind === 248 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 248 /* ContinueStatement */; + return node.kind === 249 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 249 /* BreakStatement */; + return node.kind === 250 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 250 /* ReturnStatement */; + return node.kind === 251 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 251 /* WithStatement */; + return node.kind === 252 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 252 /* SwitchStatement */; + return node.kind === 253 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 253 /* LabeledStatement */; + return node.kind === 254 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 254 /* ThrowStatement */; + return node.kind === 255 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 255 /* TryStatement */; + return node.kind === 256 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 256 /* DebuggerStatement */; + return node.kind === 257 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 257 /* VariableDeclaration */; + return node.kind === 258 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 258 /* VariableDeclarationList */; + return node.kind === 259 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 259 /* FunctionDeclaration */; + return node.kind === 260 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 260 /* ClassDeclaration */; + return node.kind === 261 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 261 /* InterfaceDeclaration */; + return node.kind === 262 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 262 /* TypeAliasDeclaration */; + return node.kind === 263 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 263 /* EnumDeclaration */; + return node.kind === 264 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */; + return node.kind === 265 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 265 /* ModuleBlock */; + return node.kind === 266 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 266 /* CaseBlock */; + return node.kind === 267 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 267 /* NamespaceExportDeclaration */; + return node.kind === 268 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */; + return node.kind === 269 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 269 /* ImportDeclaration */; + return node.kind === 270 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 270 /* ImportClause */; + return node.kind === 271 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 298 /* ImportTypeAssertionContainer */; + return node.kind === 299 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 296 /* AssertClause */; + return node.kind === 297 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 297 /* AssertEntry */; + return node.kind === 298 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 271 /* NamespaceImport */; + return node.kind === 272 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 277 /* NamespaceExport */; + return node.kind === 278 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 272 /* NamedImports */; + return node.kind === 273 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 273 /* ImportSpecifier */; + return node.kind === 274 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 274 /* ExportAssignment */; + return node.kind === 275 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 275 /* ExportDeclaration */; + return node.kind === 276 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 276 /* NamedExports */; + return node.kind === 277 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 278 /* ExportSpecifier */; + return node.kind === 279 /* ExportSpecifier */; } function isMissingDeclaration(node) { - return node.kind === 279 /* MissingDeclaration */; + return node.kind === 280 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 355 /* NotEmittedStatement */; + return node.kind === 356 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 360 /* SyntheticReferenceExpression */; + return node.kind === 361 /* SyntheticReferenceExpression */; } function isMergeDeclarationMarker(node) { - return node.kind === 358 /* MergeDeclarationMarker */; + return node.kind === 359 /* MergeDeclarationMarker */; } function isEndOfDeclarationMarker(node) { - return node.kind === 359 /* EndOfDeclarationMarker */; + return node.kind === 360 /* EndOfDeclarationMarker */; } function isExternalModuleReference(node) { - return node.kind === 280 /* ExternalModuleReference */; + return node.kind === 281 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 281 /* JsxElement */; + return node.kind === 282 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 282 /* JsxSelfClosingElement */; + return node.kind === 283 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 283 /* JsxOpeningElement */; + return node.kind === 284 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 284 /* JsxClosingElement */; + return node.kind === 285 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 285 /* JsxFragment */; + return node.kind === 286 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 286 /* JsxOpeningFragment */; + return node.kind === 287 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 287 /* JsxClosingFragment */; + return node.kind === 288 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 288 /* JsxAttribute */; + return node.kind === 289 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 289 /* JsxAttributes */; + return node.kind === 290 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 290 /* JsxSpreadAttribute */; + return node.kind === 291 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 291 /* JsxExpression */; + return node.kind === 292 /* JsxExpression */; } function isCaseClause(node) { - return node.kind === 292 /* CaseClause */; + return node.kind === 293 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 293 /* DefaultClause */; + return node.kind === 294 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 294 /* HeritageClause */; + return node.kind === 295 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 295 /* CatchClause */; + return node.kind === 296 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 299 /* PropertyAssignment */; + return node.kind === 300 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 300 /* ShorthandPropertyAssignment */; + return node.kind === 301 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 301 /* SpreadAssignment */; + return node.kind === 302 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 302 /* EnumMember */; + return node.kind === 303 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 304 /* UnparsedPrepend */; + return node.kind === 305 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 308 /* SourceFile */; + return node.kind === 309 /* SourceFile */; } function isBundle(node) { - return node.kind === 309 /* Bundle */; + return node.kind === 310 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 310 /* UnparsedSource */; + return node.kind === 311 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 312 /* JSDocTypeExpression */; + return node.kind === 313 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 313 /* JSDocNameReference */; + return node.kind === 314 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 314 /* JSDocMemberName */; + return node.kind === 315 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 327 /* JSDocLink */; + return node.kind === 328 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 328 /* JSDocLinkCode */; + return node.kind === 329 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 329 /* JSDocLinkPlain */; + return node.kind === 330 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 315 /* JSDocAllType */; + return node.kind === 316 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 316 /* JSDocUnknownType */; + return node.kind === 317 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 317 /* JSDocNullableType */; + return node.kind === 318 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 318 /* JSDocNonNullableType */; + return node.kind === 319 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 319 /* JSDocOptionalType */; + return node.kind === 320 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 320 /* JSDocFunctionType */; + return node.kind === 321 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 321 /* JSDocVariadicType */; + return node.kind === 322 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 322 /* JSDocNamepathType */; + return node.kind === 323 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 323 /* JSDoc */; + return node.kind === 324 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 325 /* JSDocTypeLiteral */; + return node.kind === 326 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 326 /* JSDocSignature */; + return node.kind === 327 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 331 /* JSDocAugmentsTag */; + return node.kind === 332 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 333 /* JSDocAuthorTag */; + return node.kind === 334 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 335 /* JSDocClassTag */; + return node.kind === 336 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 341 /* JSDocCallbackTag */; + return node.kind === 342 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 336 /* JSDocPublicTag */; + return node.kind === 337 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 337 /* JSDocPrivateTag */; + return node.kind === 338 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 338 /* JSDocProtectedTag */; + return node.kind === 339 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 339 /* JSDocReadonlyTag */; + return node.kind === 340 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 340 /* JSDocOverrideTag */; + return node.kind === 341 /* JSDocOverrideTag */; } function isJSDocOverloadTag(node) { - return node.kind === 342 /* JSDocOverloadTag */; + return node.kind === 343 /* JSDocOverloadTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 334 /* JSDocDeprecatedTag */; + return node.kind === 335 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 350 /* JSDocSeeTag */; + return node.kind === 351 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 343 /* JSDocEnumTag */; + return node.kind === 344 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 344 /* JSDocParameterTag */; + return node.kind === 345 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 345 /* JSDocReturnTag */; + return node.kind === 346 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 346 /* JSDocThisTag */; + return node.kind === 347 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 347 /* JSDocTypeTag */; + return node.kind === 348 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 348 /* JSDocTemplateTag */; + return node.kind === 349 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 349 /* JSDocTypedefTag */; + return node.kind === 350 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 330 /* JSDocTag */; + return node.kind === 331 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 351 /* JSDocPropertyTag */; + return node.kind === 352 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 332 /* JSDocImplementsTag */; + return node.kind === 333 /* JSDocImplementsTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 353 /* JSDocSatisfiesTag */; + return node.kind === 354 /* JSDocSatisfiesTag */; } function isJSDocThrowsTag(node) { - return node.kind === 352 /* JSDocThrowsTag */; + return node.kind === 353 /* JSDocThrowsTag */; } function isSyntaxList(n) { - return n.kind === 354 /* SyntaxList */; + return n.kind === 355 /* SyntaxList */; } // src/compiler/factory/utilities.ts @@ -28862,14 +28881,14 @@ Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -28922,7 +28941,7 @@ return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaExpression(node) { - return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */; + return node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -28937,19 +28956,19 @@ } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 235 /* SatisfiesExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 236 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -29086,10 +29105,10 @@ const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 269 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 270 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 275 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 276 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -29152,11 +29171,11 @@ } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -29175,11 +29194,11 @@ } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 166 /* Parameter */: - case 205 /* BindingElement */: + case 167 /* Parameter */: + case 206 /* BindingElement */: return bindingElement.dotDotDotToken; - case 227 /* SpreadElement */: - case 301 /* SpreadAssignment */: + case 228 /* SpreadElement */: + case 302 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -29191,7 +29210,7 @@ } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 205 /* BindingElement */: + case 206 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -29200,7 +29219,7 @@ return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -29209,7 +29228,7 @@ return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -29226,11 +29245,11 @@ } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return name.elements; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return name.properties; } } @@ -29247,19 +29266,19 @@ } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 175 /* SetAccessor */; + return kind === 174 /* Constructor */ || kind === 176 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 174 /* Constructor */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 259 /* FunctionDeclaration */ || kind === 173 /* Constructor */ || kind === 178 /* IndexSignature */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 240 /* VariableStatement */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */; + return kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 260 /* FunctionDeclaration */ || kind === 174 /* Constructor */ || kind === 179 /* IndexSignature */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 280 /* MissingDeclaration */ || kind === 241 /* VariableStatement */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 275 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 172 /* ClassStaticBlockDeclaration */ || kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 279 /* MissingDeclaration */ || kind === 267 /* NamespaceExportDeclaration */; + return kind === 173 /* ClassStaticBlockDeclaration */ || kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 280 /* MissingDeclaration */ || kind === 268 /* NamespaceExportDeclaration */; } function isQuestionOrExclamationToken(node) { return isQuestionToken(node) || isExclamationToken(node); @@ -29278,7 +29297,7 @@ } function isLiteralTypeLikeExpression(node) { const kind = node.kind; - return kind === 104 /* NullKeyword */ || kind === 110 /* TrueKeyword */ || kind === 95 /* FalseKeyword */ || isLiteralExpression(node) || isPrefixUnaryExpression(node); + return kind === 105 /* NullKeyword */ || kind === 111 /* TrueKeyword */ || kind === 96 /* FalseKeyword */ || isLiteralExpression(node) || isPrefixUnaryExpression(node); } function isExponentiationOperator(kind) { return kind === 42 /* AsteriskAsteriskToken */; @@ -29302,7 +29321,7 @@ return isShiftOperator(kind) || isAdditiveOperatorOrHigher(kind); } function isRelationalOperator(kind) { - return kind === 29 /* LessThanToken */ || kind === 32 /* LessThanEqualsToken */ || kind === 31 /* GreaterThanToken */ || kind === 33 /* GreaterThanEqualsToken */ || kind === 102 /* InstanceOfKeyword */ || kind === 101 /* InKeyword */; + return kind === 29 /* LessThanToken */ || kind === 32 /* LessThanEqualsToken */ || kind === 31 /* GreaterThanToken */ || kind === 33 /* GreaterThanEqualsToken */ || kind === 103 /* InstanceOfKeyword */ || kind === 102 /* InKeyword */; } function isRelationalOperatorOrHigher(kind) { return isRelationalOperator(kind) || isShiftOperatorOrHigher(kind); @@ -29462,7 +29481,7 @@ } } function isExportOrDefaultKeywordKind(kind) { - return kind === 93 /* ExportKeyword */ || kind === 88 /* DefaultKeyword */; + return kind === 94 /* ExportKeyword */ || kind === 89 /* DefaultKeyword */; } function isExportOrDefaultModifier(node) { const kind = node.kind; @@ -29658,11 +29677,11 @@ } function canHaveModifiers(node) { const kind = node.kind; - return kind === 165 /* TypeParameter */ || kind === 166 /* Parameter */ || kind === 168 /* PropertySignature */ || kind === 169 /* PropertyDeclaration */ || kind === 170 /* MethodSignature */ || kind === 171 /* MethodDeclaration */ || kind === 173 /* Constructor */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 178 /* IndexSignature */ || kind === 182 /* ConstructorType */ || kind === 215 /* FunctionExpression */ || kind === 216 /* ArrowFunction */ || kind === 228 /* ClassExpression */ || kind === 240 /* VariableStatement */ || kind === 259 /* FunctionDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 275 /* ExportDeclaration */; + return kind === 166 /* TypeParameter */ || kind === 167 /* Parameter */ || kind === 169 /* PropertySignature */ || kind === 170 /* PropertyDeclaration */ || kind === 171 /* MethodSignature */ || kind === 172 /* MethodDeclaration */ || kind === 174 /* Constructor */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 179 /* IndexSignature */ || kind === 183 /* ConstructorType */ || kind === 216 /* FunctionExpression */ || kind === 217 /* ArrowFunction */ || kind === 229 /* ClassExpression */ || kind === 241 /* VariableStatement */ || kind === 260 /* FunctionDeclaration */ || kind === 261 /* ClassDeclaration */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 275 /* ExportAssignment */ || kind === 276 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 166 /* Parameter */ || kind === 169 /* PropertyDeclaration */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 228 /* ClassExpression */ || kind === 260 /* ClassDeclaration */; + return kind === 167 /* Parameter */ || kind === 170 /* PropertyDeclaration */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 229 /* ClassExpression */ || kind === 261 /* ClassDeclaration */; } // src/compiler/parser.ts @@ -29702,7 +29721,7 @@ return forEach(sourceFile.statements, isAnExternalModuleIndicatorNode) || getImportMetaIfNecessary(sourceFile); } function isAnExternalModuleIndicatorNode(node) { - return canHaveModifiers(node) && hasModifierOfKind(node, 93 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; + return canHaveModifiers(node) && hasModifierOfKind(node, 94 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { return sourceFile.flags & 4194304 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; @@ -29714,428 +29733,428 @@ return some(node.modifiers, (m) => m.kind === kind); } function isImportMeta2(node) { - return isMetaProperty(node) && node.keywordToken === 100 /* ImportKeyword */ && node.name.escapedText === "meta"; + return isMetaProperty(node) && node.keywordToken === 101 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [163 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [164 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [165 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [166 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [300 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [301 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [301 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [302 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [166 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [167 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [169 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [170 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [168 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [169 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [299 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [300 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [257 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [258 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [205 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [206 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [178 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [179 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [182 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [183 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [181 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [182 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [176 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [177 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [171 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [177 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [178 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [172 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [170 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [171 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [173 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [174 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [174 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [175 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [175 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [176 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [259 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [260 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [215 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [216 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [216 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [217 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [172 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [173 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [180 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [181 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [179 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [180 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [183 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [184 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [184 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [185 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [185 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [186 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [186 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [187 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [189 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [190 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [191 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [190 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [191 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [192 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [192 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [193 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [202 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [203 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [298 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [299 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [193 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [195 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [196 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [194 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [196 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [197 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [197 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [198 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [198 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [199 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [199 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [200 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [203 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [204 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [206 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [204 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [205 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [207 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [207 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [208 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [208 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [209 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [209 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [210 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [210 /* CallExpression */]: forEachChildInCallOrNewExpression, - [211 /* NewExpression */]: forEachChildInCallOrNewExpression, - [212 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [211 /* CallExpression */]: forEachChildInCallOrNewExpression, + [212 /* NewExpression */]: forEachChildInCallOrNewExpression, + [213 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [213 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [214 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [214 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [215 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [217 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [218 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [218 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [219 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [219 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [220 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [222 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [226 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [227 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [220 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [221 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [223 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [223 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [224 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [231 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [232 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [232 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [233 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [235 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [236 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [233 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [234 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [224 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [225 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [227 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [228 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [238 /* Block */]: forEachChildInBlock, - [265 /* ModuleBlock */]: forEachChildInBlock, - [308 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [239 /* Block */]: forEachChildInBlock, + [266 /* ModuleBlock */]: forEachChildInBlock, + [309 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [240 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [241 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [258 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [259 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [241 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [242 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [242 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [243 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [243 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [244 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [244 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [245 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [245 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [246 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [246 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [247 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [247 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [248 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [248 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [249 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [250 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [249 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [250 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [251 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [251 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [252 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [252 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [253 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [266 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [267 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [292 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [293 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [293 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [294 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [253 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [254 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [254 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [255 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [255 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [256 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [295 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [296 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [167 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [168 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [260 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [228 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [261 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [261 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [229 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [262 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [262 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [263 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [263 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [264 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [302 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [303 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [264 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [265 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [268 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [269 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [269 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [270 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [270 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [271 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [296 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [297 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [297 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [298 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [267 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [268 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [271 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [272 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [277 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [278 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [272 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [276 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [275 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [273 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [277 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [276 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [273 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [278 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [274 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [274 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [279 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [275 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [225 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [226 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [236 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [237 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [200 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [201 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [201 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [202 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [164 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [165 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [294 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [295 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [230 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [231 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [280 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [281 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [280 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [358 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [282 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [285 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [286 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [282 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [283 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [289 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [283 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [284 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [290 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [288 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [289 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [290 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [291 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [291 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [292 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [284 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [285 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [187 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [188 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [312 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [317 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [319 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [320 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [188 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [189 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [313 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [319 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [318 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [320 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [322 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [323 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [324 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [350 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [351 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [313 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [314 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [314 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [315 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [344 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [351 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [333 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [345 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [352 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [334 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [332 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [333 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [331 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [332 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [348 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [349 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [349 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 312 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [350 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 313 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [341 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [342 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [345 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [346 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [348 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [347 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [344 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [354 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [353 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [343 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [327 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [327 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [328 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [329 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [325 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [328 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [329 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [330 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [326 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [330 /* JSDocTag */]: forEachChildInJSDocTag, - [335 /* JSDocClassTag */]: forEachChildInJSDocTag, - [336 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [337 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [338 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [340 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [331 /* JSDocTag */]: forEachChildInJSDocTag, + [336 /* JSDocClassTag */]: forEachChildInJSDocTag, + [337 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [338 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [339 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [340 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [335 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [341 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [357 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -30190,7 +30209,7 @@ return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 162 /* LastToken */) { + if (node === void 0 || node.kind <= 163 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -30225,7 +30244,7 @@ continue; return res; } - if (current.kind >= 163 /* FirstNode */) { + if (current.kind >= 164 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -30486,9 +30505,9 @@ case 22 /* OpenBracketToken */: expression2 = parseArrayLiteralExpression(); break; - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: expression2 = parseTokenNode(); break; case 40 /* MinusToken */: @@ -30671,13 +30690,13 @@ speculationHelper(() => { const savedContextFlags = contextFlags; contextFlags |= 32768 /* AwaitContext */; - scanner2.setTextPos(nextStatement.pos); + scanner2.resetTokenState(nextStatement.pos); nextToken(); while (token() !== 1 /* EndOfFileToken */) { - const startPos = scanner2.getStartPos(); + const startPos = scanner2.getTokenFullStart(); const statement = parseListElement(0 /* SourceElements */, parseStatement); statements.push(statement); - if (startPos === scanner2.getStartPos()) { + if (startPos === scanner2.getTokenFullStart()) { nextToken(); } if (pos >= 0) { @@ -30865,7 +30884,7 @@ return inContext(32768 /* AwaitContext */); } function parseErrorAtCurrentToken(message, arg0) { - return parseErrorAt(scanner2.getTokenPos(), scanner2.getTextPos(), message, arg0); + return parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), message, arg0); } function parseErrorAtPosition(start2, length2, message, arg0) { const lastError = lastOrUndefined(parseDiagnostics); @@ -30884,10 +30903,10 @@ parseErrorAt(range.pos, range.end, message, arg0); } function scanError(message, length2) { - parseErrorAtPosition(scanner2.getTextPos(), length2, message); + parseErrorAtPosition(scanner2.getTokenEnd(), length2, message); } function getNodePos() { - return scanner2.getStartPos(); + return scanner2.getTokenFullStart(); } function hasPrecedingJSDocComment() { return scanner2.hasPrecedingJSDocComment(); @@ -30904,13 +30923,16 @@ } function nextToken() { if (isKeyword(currentToken) && (scanner2.hasUnicodeEscape() || scanner2.hasExtendedUnicodeEscape())) { - parseErrorAt(scanner2.getTokenPos(), scanner2.getTextPos(), Diagnostics.Keywords_cannot_contain_escape_characters); + parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), Diagnostics.Keywords_cannot_contain_escape_characters); } return nextTokenWithoutCheck(); } function nextTokenJSDoc() { return currentToken = scanner2.scanJsDocToken(); } + function nextJSDocCommentTextToken(inBackticks) { + return currentToken = scanner2.scanJSDocCommentTextToken(inBackticks); + } function reScanGreaterToken() { return currentToken = scanner2.reScanGreaterToken(); } @@ -30964,19 +30986,19 @@ if (token() === 79 /* Identifier */) { return true; } - return token() > 116 /* LastReservedWord */; + return token() > 117 /* LastReservedWord */; } function isIdentifier2() { if (token() === 79 /* Identifier */) { return true; } - if (token() === 125 /* YieldKeyword */ && inYieldContext()) { + if (token() === 126 /* YieldKeyword */ && inYieldContext()) { return false; } - if (token() === 133 /* AwaitKeyword */ && inAwaitContext()) { + if (token() === 134 /* AwaitKeyword */ && inAwaitContext()) { return false; } - return token() > 116 /* LastReservedWord */; + return token() > 117 /* LastReservedWord */; } function parseExpected(kind, diagnosticMessage, shouldAdvance = true) { if (token() === kind) { @@ -31017,7 +31039,7 @@ parseErrorForInvalidName(Diagnostics.Interface_name_cannot_be_0, Diagnostics.Interface_must_be_given_a_name, 18 /* OpenBraceToken */); return; case "is": - parseErrorAt(pos, scanner2.getTextPos(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + parseErrorAt(pos, scanner2.getTokenStart(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); return; case "module": case "namespace": @@ -31172,11 +31194,11 @@ } function createNodeArray(elements, pos, end, hasTrailingComma) { const array = factoryCreateNodeArray(elements, hasTrailingComma); - setTextRangePosEnd(array, pos, end != null ? end : scanner2.getStartPos()); + setTextRangePosEnd(array, pos, end != null ? end : scanner2.getTokenFullStart()); return array; } function finishNode(node, pos, end) { - setTextRangePosEnd(node, pos, end != null ? end : scanner2.getStartPos()); + setTextRangePosEnd(node, pos, end != null ? end : scanner2.getTokenFullStart()); if (contextFlags) { node.flags |= contextFlags; } @@ -31188,7 +31210,7 @@ } function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, arg0) { if (reportAtCurrentPosition) { - parseErrorAtPosition(scanner2.getStartPos(), 0, diagnosticMessage, arg0); + parseErrorAtPosition(scanner2.getTokenFullStart(), 0, diagnosticMessage, arg0); } else if (diagnosticMessage) { parseErrorAtCurrentToken(diagnosticMessage, arg0); } @@ -31211,7 +31233,7 @@ "", /*isSingleQuote*/ void 0 - ) : kind === 279 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 280 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -31316,22 +31338,22 @@ } function nextTokenCanFollowModifier() { switch (token()) { - case 85 /* ConstKeyword */: - return nextToken() === 92 /* EnumKeyword */; - case 93 /* ExportKeyword */: + case 86 /* ConstKeyword */: + return nextToken() === 93 /* EnumKeyword */; + case 94 /* ExportKeyword */: nextToken(); - if (token() === 88 /* DefaultKeyword */) { + if (token() === 89 /* DefaultKeyword */) { return lookAhead(nextTokenCanFollowDefaultKeyword); } - if (token() === 154 /* TypeKeyword */) { + if (token() === 155 /* TypeKeyword */) { return lookAhead(nextTokenCanFollowExportModifier); } return canFollowExportModifier(); - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); - case 124 /* StaticKeyword */: - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: + case 125 /* StaticKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: nextToken(); return canFollowModifier(); default: @@ -31339,7 +31361,7 @@ } } function canFollowExportModifier() { - return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 128 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier(); + return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 129 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier(); } function nextTokenCanFollowExportModifier() { nextToken(); @@ -31353,7 +31375,7 @@ } function nextTokenCanFollowDefaultKeyword() { nextToken(); - return token() === 84 /* ClassKeyword */ || token() === 98 /* FunctionKeyword */ || token() === 118 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 132 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); + return token() === 85 /* ClassKeyword */ || token() === 99 /* FunctionKeyword */ || token() === 119 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 127 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 133 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); } function isListElement2(parsingContext2, inErrorRecovery) { const node = currentNode(parsingContext2); @@ -31366,7 +31388,7 @@ case 3 /* SwitchClauseStatements */: return !(token() === 26 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); case 2 /* SwitchClauses */: - return token() === 82 /* CaseKeyword */ || token() === 88 /* DefaultKeyword */; + return token() === 83 /* CaseKeyword */ || token() === 89 /* DefaultKeyword */; case 4 /* TypeMembers */: return lookAhead(isTypeMemberStart); case 5 /* ClassMembers */: @@ -31403,7 +31425,7 @@ case 10 /* ArrayBindingElements */: return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern(); case 19 /* TypeParameters */: - return token() === 101 /* InKeyword */ || token() === 85 /* ConstKeyword */ || isIdentifier2(); + return token() === 102 /* InKeyword */ || token() === 86 /* ConstKeyword */ || isIdentifier2(); case 15 /* ArrayLiteralMembers */: switch (token()) { case 27 /* CommaToken */: @@ -31440,7 +31462,7 @@ Debug.assert(token() === 18 /* OpenBraceToken */); if (nextToken() === 19 /* CloseBraceToken */) { const next = nextToken(); - return next === 27 /* CommaToken */ || next === 18 /* OpenBraceToken */ || next === 94 /* ExtendsKeyword */ || next === 117 /* ImplementsKeyword */; + return next === 27 /* CommaToken */ || next === 18 /* OpenBraceToken */ || next === 95 /* ExtendsKeyword */ || next === 118 /* ImplementsKeyword */; } return true; } @@ -31457,7 +31479,7 @@ return tokenIsIdentifierOrKeywordOrGreaterThan(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 117 /* ImplementsKeyword */ || token() === 94 /* ExtendsKeyword */) { + if (token() === 118 /* ImplementsKeyword */ || token() === 95 /* ExtendsKeyword */) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -31486,13 +31508,13 @@ case 24 /* AssertEntries */: return token() === 19 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: - return token() === 19 /* CloseBraceToken */ || token() === 82 /* CaseKeyword */ || token() === 88 /* DefaultKeyword */; + return token() === 19 /* CloseBraceToken */ || token() === 83 /* CaseKeyword */ || token() === 89 /* DefaultKeyword */; case 7 /* HeritageClauseElement */: - return token() === 18 /* OpenBraceToken */ || token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 18 /* OpenBraceToken */ || token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; case 8 /* VariableDeclarations */: return isVariableDeclaratorListTerminator(); case 19 /* TypeParameters */: - return token() === 31 /* GreaterThanToken */ || token() === 20 /* OpenParenToken */ || token() === 18 /* OpenBraceToken */ || token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 31 /* GreaterThanToken */ || token() === 20 /* OpenParenToken */ || token() === 18 /* OpenBraceToken */ || token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; case 11 /* ArgumentExpressions */: return token() === 21 /* CloseParenToken */ || token() === 26 /* SemicolonToken */; case 15 /* ArrayLiteralMembers */: @@ -31574,7 +31596,7 @@ if (!syntaxCursor || !isReusableParsingContext(parsingContext2) || parseErrorBeforeNextFinishedNode) { return void 0; } - const node = syntaxCursor.currentNode(pos != null ? pos : scanner2.getStartPos()); + const node = syntaxCursor.currentNode(pos != null ? pos : scanner2.getTokenFullStart()); if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { return void 0; } @@ -31591,7 +31613,7 @@ return node; } function consumeNode(node) { - scanner2.setTextPos(node.end); + scanner2.resetTokenState(node.end); nextToken(); return node; } @@ -31636,14 +31658,14 @@ function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 173 /* Constructor */: - case 178 /* IndexSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: - case 237 /* SemicolonClassElement */: + case 174 /* Constructor */: + case 179 /* IndexSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 238 /* SemicolonClassElement */: return true; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -31654,8 +31676,8 @@ function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return true; } } @@ -31664,65 +31686,65 @@ function isReusableStatement(node) { if (node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 240 /* VariableStatement */: - case 238 /* Block */: - case 242 /* IfStatement */: - case 241 /* ExpressionStatement */: - case 254 /* ThrowStatement */: - case 250 /* ReturnStatement */: - case 252 /* SwitchStatement */: - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 239 /* EmptyStatement */: - case 255 /* TryStatement */: - case 253 /* LabeledStatement */: - case 243 /* DoStatement */: - case 256 /* DebuggerStatement */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + case 241 /* VariableStatement */: + case 239 /* Block */: + case 243 /* IfStatement */: + case 242 /* ExpressionStatement */: + case 255 /* ThrowStatement */: + case 251 /* ReturnStatement */: + case 253 /* SwitchStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 240 /* EmptyStatement */: + case 256 /* TryStatement */: + case 254 /* LabeledStatement */: + case 244 /* DoStatement */: + case 257 /* DebuggerStatement */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 302 /* EnumMember */; + return node.kind === 303 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 168 /* PropertySignature */: - case 176 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 169 /* PropertySignature */: + case 177 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 257 /* VariableDeclaration */) { + if (node.kind !== 258 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 166 /* Parameter */) { + if (node.kind !== 167 /* Parameter */) { return false; } const parameter = node; @@ -31739,7 +31761,7 @@ function parsingContextErrors(context) { switch (context) { case 0 /* SourceElements */: - return token() === 88 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(93 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); + return token() === 89 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(94 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); case 1 /* BlockStatements */: return parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); case 2 /* SwitchClauses */: @@ -31805,14 +31827,14 @@ /*inErrorRecovery*/ false )) { - const startPos = scanner2.getStartPos(); + const startPos = scanner2.getTokenFullStart(); const result = parseListElement(kind, parseElement); if (!result) { parsingContext = saveParsingContext; return void 0; } list.push(result); - commaStart = scanner2.getTokenPos(); + commaStart = scanner2.getTokenStart(); if (parseOptional(27 /* CommaToken */)) { continue; } @@ -31824,7 +31846,7 @@ if (considerSemicolonAsDelimiter && token() === 26 /* SemicolonToken */ && !scanner2.hasPrecedingLineBreak()) { nextToken(); } - if (startPos === scanner2.getStartPos()) { + if (startPos === scanner2.getTokenFullStart()) { nextToken(); } continue; @@ -32055,14 +32077,14 @@ } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return nodeIsMissing(node.typeName); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: { + case 182 /* FunctionType */: + case 183 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -32131,7 +32153,7 @@ function parseJSDocParameter() { const pos = getNodePos(); let name; - if (token() === 108 /* ThisKeyword */ || token() === 103 /* NewKeyword */) { + if (token() === 109 /* ThisKeyword */ || token() === 104 /* NewKeyword */) { name = parseIdentifierName(); parseExpected(58 /* ColonToken */); } @@ -32155,7 +32177,7 @@ function parseJSDocType() { scanner2.setInJSDocType(true); const pos = getNodePos(); - if (parseOptional(142 /* ModuleKeyword */)) { + if (parseOptional(143 /* ModuleKeyword */)) { const moduleTag = factory2.createJSDocNamepathType( /*type*/ void 0 @@ -32189,7 +32211,7 @@ } function parseTypeQuery() { const pos = getNodePos(); - parseExpected(112 /* TypeOfKeyword */); + parseExpected(113 /* TypeOfKeyword */); const entityName = parseEntityName( /*allowReservedWords*/ true @@ -32208,7 +32230,7 @@ const name = parseIdentifier(); let constraint; let expression; - if (parseOptional(94 /* ExtendsKeyword */)) { + if (parseOptional(95 /* ExtendsKeyword */)) { if (isStartOfType() || !isStartOfExpression()) { constraint = parseType(); } else { @@ -32261,7 +32283,7 @@ /*allowDecorators*/ true )); - if (token() === 108 /* ThisKeyword */) { + if (token() === 109 /* ThisKeyword */) { const node2 = factory2.createParameterDeclaration( modifiers, /*dotDotDotToken*/ @@ -32354,8 +32376,8 @@ function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 177 /* ConstructSignature */) { - parseExpected(103 /* NewKeyword */); + if (kind === 178 /* ConstructSignature */) { + parseExpected(104 /* NewKeyword */); } const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); @@ -32365,7 +32387,7 @@ true ); parseTypeMemberSemicolon(); - const node = kind === 176 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 177 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -32428,7 +32450,7 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function isTypeMemberStart() { - if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 137 /* GetKeyword */ || token() === 151 /* SetKeyword */) { + if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 138 /* GetKeyword */ || token() === 152 /* SetKeyword */) { return true; } let idToken = false; @@ -32450,10 +32472,10 @@ } function parseTypeMember() { if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) { - return parseSignatureMember(176 /* CallSignature */); + return parseSignatureMember(177 /* CallSignature */); } - if (token() === 103 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(177 /* ConstructSignature */); + if (token() === 104 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { + return parseSignatureMember(178 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -32461,11 +32483,11 @@ /*allowDecorators*/ false ); - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 4 /* Type */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 4 /* Type */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 4 /* Type */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -32505,17 +32527,17 @@ function isStartOfMappedType() { nextToken(); if (token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { - return nextToken() === 146 /* ReadonlyKeyword */; + return nextToken() === 147 /* ReadonlyKeyword */; } - if (token() === 146 /* ReadonlyKeyword */) { + if (token() === 147 /* ReadonlyKeyword */) { nextToken(); } - return token() === 22 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 101 /* InKeyword */; + return token() === 22 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 102 /* InKeyword */; } function parseMappedTypeParameter() { const pos = getNodePos(); const name = parseIdentifierName(); - parseExpected(101 /* InKeyword */); + parseExpected(102 /* InKeyword */); const type = parseType(); return finishNode(factory2.createTypeParameterDeclaration( /*modifiers*/ @@ -32530,15 +32552,15 @@ const pos = getNodePos(); parseExpected(18 /* OpenBraceToken */); let readonlyToken; - if (token() === 146 /* ReadonlyKeyword */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { + if (token() === 147 /* ReadonlyKeyword */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { readonlyToken = parseTokenNode(); - if (readonlyToken.kind !== 146 /* ReadonlyKeyword */) { - parseExpected(146 /* ReadonlyKeyword */); + if (readonlyToken.kind !== 147 /* ReadonlyKeyword */) { + parseExpected(147 /* ReadonlyKeyword */); } } parseExpected(22 /* OpenBracketToken */); const typeParameter = parseMappedTypeParameter(); - const nameType = parseOptional(128 /* AsKeyword */) ? parseType() : void 0; + const nameType = parseOptional(129 /* AsKeyword */) ? parseType() : void 0; parseExpected(23 /* CloseBracketToken */); let questionToken; if (token() === 57 /* QuestionToken */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { @@ -32608,10 +32630,10 @@ } function parseModifiersForConstructorType() { let modifiers; - if (token() === 126 /* AbstractKeyword */) { + if (token() === 127 /* AbstractKeyword */) { const pos = getNodePos(); nextToken(); - const modifier = finishNode(factoryCreateToken(126 /* AbstractKeyword */), pos); + const modifier = finishNode(factoryCreateToken(127 /* AbstractKeyword */), pos); modifiers = createNodeArray([modifier], pos); } return modifiers; @@ -32620,7 +32642,7 @@ const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiersForConstructorType(); - const isConstructorType = parseOptional(103 /* NewKeyword */); + const isConstructorType = parseOptional(104 /* NewKeyword */); Debug.assert(!modifiers || isConstructorType, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers."); const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); @@ -32641,7 +32663,7 @@ if (negative) { nextToken(); } - let expression = token() === 110 /* TrueKeyword */ || token() === 95 /* FalseKeyword */ || token() === 104 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); + let expression = token() === 111 /* TrueKeyword */ || token() === 96 /* FalseKeyword */ || token() === 105 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); if (negative) { expression = finishNode(factory2.createPrefixUnaryExpression(40 /* MinusToken */, expression), pos); } @@ -32649,14 +32671,14 @@ } function isStartOfTypeOfImportType() { nextToken(); - return token() === 100 /* ImportKeyword */; + return token() === 101 /* ImportKeyword */; } function parseImportTypeAssertions() { const pos = getNodePos(); - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); parseExpected(18 /* OpenBraceToken */); const multiLine = scanner2.hasPrecedingLineBreak(); - parseExpected(130 /* AssertKeyword */); + parseExpected(131 /* AssertKeyword */); parseExpected(58 /* ColonToken */); const clause = parseAssertClause( /*skipAssertKeyword*/ @@ -32676,8 +32698,8 @@ function parseImportType() { sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); - const isTypeOf = parseOptional(112 /* TypeOfKeyword */); - parseExpected(100 /* ImportKeyword */); + const isTypeOf = parseOptional(113 /* TypeOfKeyword */); + parseExpected(101 /* ImportKeyword */); parseExpected(20 /* OpenParenToken */); const type = parseType(); let assertions; @@ -32695,16 +32717,16 @@ } function parseNonArrayType() { switch (token()) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 153 /* SymbolKeyword */: - case 134 /* BooleanKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: - case 149 /* ObjectKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 154 /* SymbolKeyword */: + case 135 /* BooleanKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: + case 150 /* ObjectKeyword */: return tryParse(parseKeywordAndNoDot) || parseTypeReference(); case 66 /* AsteriskEqualsToken */: scanner2.reScanAsteriskEqualsToken(); @@ -32714,7 +32736,7 @@ scanner2.reScanQuestionToken(); case 57 /* QuestionToken */: return parseJSDocUnknownOrNullableType(); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseJSDocFunctionType(); case 53 /* ExclamationToken */: return parseJSDocNonNullableType(); @@ -32722,26 +32744,26 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: return parseLiteralTypeNode(); case 40 /* MinusToken */: return lookAhead(nextTokenIsNumericOrBigIntLiteral) ? parseLiteralTypeNode( /*negative*/ true ) : parseTypeReference(); - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return parseTokenNode(); - case 108 /* ThisKeyword */: { + case 109 /* ThisKeyword */: { const thisKeyword = parseThisTypeNode(); - if (token() === 140 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (token() === 141 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - case 112 /* TypeOfKeyword */: + case 113 /* TypeOfKeyword */: return lookAhead(isStartOfTypeOfImportType) ? parseImportType() : parseTypeQuery(); case 18 /* OpenBraceToken */: return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); @@ -32749,9 +32771,9 @@ return parseTupleType(); case 20 /* OpenParenToken */: return parseParenthesizedType(); - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return parseImportType(); - case 129 /* AssertsKeyword */: + case 130 /* AssertsKeyword */: return lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine) ? parseAssertsTypePredicate() : parseTypeReference(); case 15 /* TemplateHead */: return parseTemplateType(); @@ -32761,44 +32783,44 @@ } function isStartOfType(inStartOfParameter) { switch (token()) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 146 /* ReadonlyKeyword */: - case 153 /* SymbolKeyword */: - case 156 /* UniqueKeyword */: - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 104 /* NullKeyword */: - case 108 /* ThisKeyword */: - case 112 /* TypeOfKeyword */: - case 144 /* NeverKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 147 /* ReadonlyKeyword */: + case 154 /* SymbolKeyword */: + case 157 /* UniqueKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 105 /* NullKeyword */: + case 109 /* ThisKeyword */: + case 113 /* TypeOfKeyword */: + case 145 /* NeverKeyword */: case 18 /* OpenBraceToken */: case 22 /* OpenBracketToken */: case 29 /* LessThanToken */: case 51 /* BarToken */: case 50 /* AmpersandToken */: - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 149 /* ObjectKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 150 /* ObjectKeyword */: case 41 /* AsteriskToken */: case 57 /* QuestionToken */: case 53 /* ExclamationToken */: case 25 /* DotDotDotToken */: - case 138 /* InferKeyword */: - case 100 /* ImportKeyword */: - case 129 /* AssertsKeyword */: + case 139 /* InferKeyword */: + case 101 /* ImportKeyword */: + case 130 /* AssertsKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: return true; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return !inStartOfParameter; case 40 /* MinusToken */: return !inStartOfParameter && lookAhead(nextTokenIsNumericOrBigIntLiteral); @@ -32862,7 +32884,7 @@ return finishNode(factory2.createTypeOperatorNode(operator, parseTypeOperatorOrHigher()), pos); } function tryParseConstraintOfInferType() { - if (parseOptional(94 /* ExtendsKeyword */)) { + if (parseOptional(95 /* ExtendsKeyword */)) { const constraint = disallowConditionalTypesAnd(parseType); if (inDisallowConditionalTypesContext() || token() !== 57 /* QuestionToken */) { return constraint; @@ -32883,17 +32905,17 @@ } function parseInferType() { const pos = getNodePos(); - parseExpected(138 /* InferKeyword */); + parseExpected(139 /* InferKeyword */); return finishNode(factory2.createInferTypeNode(parseTypeParameterOfInferType()), pos); } function parseTypeOperatorOrHigher() { const operator = token(); switch (operator) { - case 141 /* KeyOfKeyword */: - case 156 /* UniqueKeyword */: - case 146 /* ReadonlyKeyword */: + case 142 /* KeyOfKeyword */: + case 157 /* UniqueKeyword */: + case 147 /* ReadonlyKeyword */: return parseTypeOperator(operator); - case 138 /* InferKeyword */: + case 139 /* InferKeyword */: return parseInferType(); } return allowConditionalTypesAnd(parsePostfixTypeOrHigher); @@ -32934,7 +32956,7 @@ } function nextTokenIsNewKeyword() { nextToken(); - return token() === 103 /* NewKeyword */; + return token() === 104 /* NewKeyword */; } function isStartOfFunctionTypeOrConstructorType() { if (token() === 29 /* LessThanToken */) { @@ -32943,7 +32965,7 @@ if (token() === 20 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType)) { return true; } - return token() === 103 /* NewKeyword */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); + return token() === 104 /* NewKeyword */ || token() === 127 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); } function skipParameterStart() { if (isModifierKind(token())) { @@ -32952,7 +32974,7 @@ false ); } - if (isIdentifier2() || token() === 108 /* ThisKeyword */) { + if (isIdentifier2() || token() === 109 /* ThisKeyword */) { nextToken(); return true; } @@ -32998,16 +33020,16 @@ } function parseTypePredicatePrefix() { const id = parseIdentifier(); - if (token() === 140 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (token() === 141 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { nextToken(); return id; } } function parseAssertsTypePredicate() { const pos = getNodePos(); - const assertsModifier = parseExpectedToken(129 /* AssertsKeyword */); - const parameterName = token() === 108 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); - const type = parseOptional(140 /* IsKeyword */) ? parseType() : void 0; + const assertsModifier = parseExpectedToken(130 /* AssertsKeyword */); + const parameterName = token() === 109 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); + const type = parseOptional(141 /* IsKeyword */) ? parseType() : void 0; return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); } function parseType() { @@ -33019,7 +33041,7 @@ } const pos = getNodePos(); const type = parseUnionTypeOrHigher(); - if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(94 /* ExtendsKeyword */)) { + if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(95 /* ExtendsKeyword */)) { const extendsType = disallowConditionalTypesAnd(parseType); parseExpected(57 /* QuestionToken */); const trueType = allowConditionalTypesAnd(parseType); @@ -33034,11 +33056,11 @@ } function isStartOfLeftHandSideExpression() { switch (token()) { - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: @@ -33047,14 +33069,14 @@ case 20 /* OpenParenToken */: case 22 /* OpenBracketToken */: case 18 /* OpenBraceToken */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 103 /* NewKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 104 /* NewKeyword */: case 43 /* SlashToken */: case 68 /* SlashEqualsToken */: case 79 /* Identifier */: return true; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return lookAhead(nextTokenIsOpenParenOrLessThanOrDot); default: return isIdentifier2(); @@ -33069,14 +33091,14 @@ case 40 /* MinusToken */: case 54 /* TildeToken */: case 53 /* ExclamationToken */: - case 89 /* DeleteKeyword */: - case 112 /* TypeOfKeyword */: - case 114 /* VoidKeyword */: + case 90 /* DeleteKeyword */: + case 113 /* TypeOfKeyword */: + case 115 /* VoidKeyword */: case 45 /* PlusPlusToken */: case 46 /* MinusMinusToken */: case 29 /* LessThanToken */: - case 133 /* AwaitKeyword */: - case 125 /* YieldKeyword */: + case 134 /* AwaitKeyword */: + case 126 /* YieldKeyword */: case 80 /* PrivateIdentifier */: case 59 /* AtToken */: return true; @@ -33088,7 +33110,7 @@ } } function isStartOfExpressionStatement() { - return token() !== 18 /* OpenBraceToken */ && token() !== 98 /* FunctionKeyword */ && token() !== 84 /* ClassKeyword */ && token() !== 59 /* AtToken */ && isStartOfExpression(); + return token() !== 18 /* OpenBraceToken */ && token() !== 99 /* FunctionKeyword */ && token() !== 85 /* ClassKeyword */ && token() !== 59 /* AtToken */ && isStartOfExpression(); } function parseExpression() { const saveDecoratorContext = inDecoratorContext(); @@ -33149,7 +33171,7 @@ return parseConditionalExpressionRest(expr, pos, allowReturnTypeInArrowFunction); } function isYieldExpression2() { - if (token() === 125 /* YieldKeyword */) { + if (token() === 126 /* YieldKeyword */) { if (inYieldContext()) { return true; } @@ -33232,7 +33254,7 @@ ) : tryParse(() => parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction)); } function isParenthesizedArrowFunctionExpression() { - if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 132 /* AsyncKeyword */) { + if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 133 /* AsyncKeyword */) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } if (token() === 38 /* EqualsGreaterThanToken */) { @@ -33241,7 +33263,7 @@ return 0 /* False */; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { nextToken(); if (scanner2.hasPrecedingLineBreak()) { return 0 /* False */; @@ -33270,13 +33292,13 @@ if (second === 25 /* DotDotDotToken */) { return 1 /* True */; } - if (isModifierKind(second) && second !== 132 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { - if (nextToken() === 128 /* AsKeyword */) { + if (isModifierKind(second) && second !== 133 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { + if (nextToken() === 129 /* AsKeyword */) { return 0 /* False */; } return 1 /* True */; } - if (!isIdentifier2() && second !== 108 /* ThisKeyword */) { + if (!isIdentifier2() && second !== 109 /* ThisKeyword */) { return 0 /* False */; } switch (nextToken()) { @@ -33296,14 +33318,14 @@ return 0 /* False */; } else { Debug.assert(first2 === 29 /* LessThanToken */); - if (!isIdentifier2() && token() !== 85 /* ConstKeyword */) { + if (!isIdentifier2() && token() !== 86 /* ConstKeyword */) { return 0 /* False */; } if (languageVariant === 1 /* JSX */) { const isArrowFunctionInJsx = lookAhead(() => { - parseOptional(85 /* ConstKeyword */); + parseOptional(86 /* ConstKeyword */); const third = nextToken(); - if (third === 94 /* ExtendsKeyword */) { + if (third === 95 /* ExtendsKeyword */) { const fourth = nextToken(); switch (fourth) { case 63 /* EqualsToken */: @@ -33327,7 +33349,7 @@ } } function parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { - const tokenPos = scanner2.getTokenPos(); + const tokenPos = scanner2.getTokenStart(); if (notParenthesizedArrow == null ? void 0 : notParenthesizedArrow.has(tokenPos)) { return void 0; } @@ -33342,7 +33364,7 @@ return result; } function tryParseAsyncSimpleArrowFunctionExpression(allowReturnTypeInArrowFunction) { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { const pos = getNodePos(); const asyncModifier = parseModifiersForArrowFunction(); @@ -33353,7 +33375,7 @@ return void 0; } function isUnParenthesizedAsyncArrowFunctionWorker() { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { nextToken(); if (scanner2.hasPrecedingLineBreak() || token() === 38 /* EqualsGreaterThanToken */) { return 0 /* False */; @@ -33401,7 +33423,7 @@ return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 193 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 194 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -33423,7 +33445,7 @@ if (token() === 18 /* OpenBraceToken */) { return parseFunctionBlock(isAsync ? 2 /* Await */ : 0 /* None */); } - if (token() !== 26 /* SemicolonToken */ && token() !== 98 /* FunctionKeyword */ && token() !== 84 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { + if (token() !== 26 /* SemicolonToken */ && token() !== 99 /* FunctionKeyword */ && token() !== 85 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { return parseFunctionBlock(16 /* IgnoreMissingOpenBrace */ | (isAsync ? 2 /* Await */ : 0 /* None */)); } const savedTopLevel = topLevel; @@ -33464,7 +33486,7 @@ return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 101 /* InKeyword */ || t === 162 /* OfKeyword */; + return t === 102 /* InKeyword */ || t === 163 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -33474,16 +33496,16 @@ if (!consumeCurrentOperator) { break; } - if (token() === 101 /* InKeyword */ && inDisallowInContext()) { + if (token() === 102 /* InKeyword */ && inDisallowInContext()) { break; } - if (token() === 128 /* AsKeyword */ || token() === 150 /* SatisfiesKeyword */) { + if (token() === 129 /* AsKeyword */ || token() === 151 /* SatisfiesKeyword */) { if (scanner2.hasPrecedingLineBreak()) { break; } else { const keywordKind = token(); nextToken(); - leftOperand = keywordKind === 150 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); + leftOperand = keywordKind === 151 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); } } else { leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence), pos); @@ -33492,7 +33514,7 @@ return leftOperand; } function isBinaryOperator2() { - if (inDisallowInContext() && token() === 101 /* InKeyword */) { + if (inDisallowInContext() && token() === 102 /* InKeyword */) { return false; } return getBinaryOperatorPrecedence(token()) > 0; @@ -33523,7 +33545,7 @@ return finishNode(factory2.createVoidExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos); } function isAwaitExpression2() { - if (token() === 133 /* AwaitKeyword */) { + if (token() === 134 /* AwaitKeyword */) { if (inAwaitContext()) { return true; } @@ -33546,7 +33568,7 @@ if (token() === 42 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 213 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 214 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { parseErrorAt(pos, end, Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, tokenToString(unaryOperator)); @@ -33561,11 +33583,11 @@ case 54 /* TildeToken */: case 53 /* ExclamationToken */: return parsePrefixUnaryExpression(); - case 89 /* DeleteKeyword */: + case 90 /* DeleteKeyword */: return parseDeleteExpression(); - case 112 /* TypeOfKeyword */: + case 113 /* TypeOfKeyword */: return parseTypeOfExpression(); - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return parseVoidExpression(); case 29 /* LessThanToken */: if (languageVariant === 1 /* JSX */) { @@ -33575,7 +33597,7 @@ ); } return parseTypeAssertion(); - case 133 /* AwaitKeyword */: + case 134 /* AwaitKeyword */: if (isAwaitExpression2()) { return parseAwaitExpression(); } @@ -33589,10 +33611,10 @@ case 40 /* MinusToken */: case 54 /* TildeToken */: case 53 /* ExclamationToken */: - case 89 /* DeleteKeyword */: - case 112 /* TypeOfKeyword */: - case 114 /* VoidKeyword */: - case 133 /* AwaitKeyword */: + case 90 /* DeleteKeyword */: + case 113 /* TypeOfKeyword */: + case 115 /* VoidKeyword */: + case 134 /* AwaitKeyword */: return false; case 29 /* LessThanToken */: if (languageVariant !== 1 /* JSX */) { @@ -33624,20 +33646,20 @@ function parseLeftHandSideExpressionOrHigher() { const pos = getNodePos(); let expression; - if (token() === 100 /* ImportKeyword */) { + if (token() === 101 /* ImportKeyword */) { if (lookAhead(nextTokenIsOpenParenOrLessThan)) { sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; expression = parseTokenNode(); } else if (lookAhead(nextTokenIsDot)) { nextToken(); nextToken(); - expression = finishNode(factory2.createMetaProperty(100 /* ImportKeyword */, parseIdentifierName()), pos); + expression = finishNode(factory2.createMetaProperty(101 /* ImportKeyword */, parseIdentifierName()), pos); sourceFlags |= 4194304 /* PossiblyContainsImportMeta */; } else { expression = parseMemberExpressionOrHigher(); } } else { - expression = token() === 106 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); + expression = token() === 107 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); } return parseCallExpressionRest(pos, expression); } @@ -33679,11 +33701,11 @@ const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 283 /* JsxOpeningElement */) { + if (opening.kind === 284 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 281 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 282 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -33707,10 +33729,10 @@ } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 286 /* JsxOpeningFragment */) { + } else if (opening.kind === 287 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 282 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 283 /* JsxSelfClosingElement */); result = opening; } if (inExpressionContext && token() === 29 /* LessThanToken */) { @@ -33783,7 +33805,7 @@ if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 281 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 282 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -33830,7 +33852,7 @@ function parseJsxElementName() { const pos = getNodePos(); scanJsxIdentifier(); - let expression = token() === 108 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); + let expression = token() === 109 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); while (parseOptional(24 /* DotToken */)) { expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot( /*allowIdentifierNames*/ @@ -34033,7 +34055,7 @@ continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 230 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 231 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -34093,7 +34115,7 @@ } } if (typeArguments || token() === 20 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 231 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -34157,11 +34179,11 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return parseLiteralNode(); - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: return parseTokenNode(); case 20 /* OpenParenToken */: return parseParenthesizedExpression(); @@ -34169,18 +34191,18 @@ return parseArrayLiteralExpression(); case 18 /* OpenBraceToken */: return parseObjectLiteralExpression(); - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { break; } return parseFunctionExpression(); case 59 /* AtToken */: return parseDecoratedExpression(); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassExpression(); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionExpression(); - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: return parseNewExpressionOrNewDotTarget(); case 43 /* SlashToken */: case 68 /* SlashEqualsToken */: @@ -34226,7 +34248,7 @@ } function parseArrayLiteralExpression() { const pos = getNodePos(); - const openBracketPosition = scanner2.getTokenPos(); + const openBracketPosition = scanner2.getTokenStart(); const openBracketParsed = parseExpected(22 /* OpenBracketToken */); const multiLine = scanner2.hasPrecedingLineBreak(); const elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); @@ -34247,11 +34269,11 @@ /*allowDecorators*/ true ); - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 0 /* None */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -34286,7 +34308,7 @@ } function parseObjectLiteralExpression() { const pos = getNodePos(); - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); const openBraceParsed = parseExpected(18 /* OpenBraceToken */); const multiLine = scanner2.hasPrecedingLineBreak(); const properties = parseDelimitedList( @@ -34310,7 +34332,7 @@ /*allowDecorators*/ false ); - parseExpected(98 /* FunctionKeyword */); + parseExpected(99 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */; @@ -34332,10 +34354,10 @@ } function parseNewExpressionOrNewDotTarget() { const pos = getNodePos(); - parseExpected(103 /* NewKeyword */); + parseExpected(104 /* NewKeyword */); if (parseOptional(24 /* DotToken */)) { const name = parseIdentifierName(); - return finishNode(factory2.createMetaProperty(103 /* NewKeyword */, name), pos); + return finishNode(factory2.createMetaProperty(104 /* NewKeyword */, name), pos); } const expressionPos = getNodePos(); let expression = parseMemberExpressionRest( @@ -34345,7 +34367,7 @@ false ); let typeArguments; - if (expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (expression.kind === 231 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -34358,7 +34380,7 @@ function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); const openBraceParsed = parseExpected(18 /* OpenBraceToken */, diagnosticMessage); if (openBraceParsed || ignoreMissingOpenBrace) { const multiLine = scanner2.hasPrecedingLineBreak(); @@ -34414,22 +34436,22 @@ function parseIfStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(99 /* IfKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(100 /* IfKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); const thenStatement = parseStatement(); - const elseStatement = parseOptional(91 /* ElseKeyword */) ? parseStatement() : void 0; + const elseStatement = parseOptional(92 /* ElseKeyword */) ? parseStatement() : void 0; return withJSDoc(finishNode(factoryCreateIfStatement(expression, thenStatement, elseStatement), pos), hasJSDoc); } function parseDoStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(90 /* DoKeyword */); + parseExpected(91 /* DoKeyword */); const statement = parseStatement(); - parseExpected(115 /* WhileKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(116 /* WhileKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -34439,8 +34461,8 @@ function parseWhileStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(115 /* WhileKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(116 /* WhileKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -34450,12 +34472,12 @@ function parseForOrForInOrForOfStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(97 /* ForKeyword */); - const awaitToken = parseOptionalToken(133 /* AwaitKeyword */); + parseExpected(98 /* ForKeyword */); + const awaitToken = parseOptionalToken(134 /* AwaitKeyword */); parseExpected(20 /* OpenParenToken */); let initializer; if (token() !== 26 /* SemicolonToken */) { - if (token() === 113 /* VarKeyword */ || token() === 119 /* LetKeyword */ || token() === 85 /* ConstKeyword */) { + if (token() === 114 /* VarKeyword */ || token() === 120 /* LetKeyword */ || token() === 86 /* ConstKeyword */) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -34465,14 +34487,14 @@ } } let node; - if (awaitToken ? parseExpected(162 /* OfKeyword */) : parseOptional(162 /* OfKeyword */)) { + if (awaitToken ? parseExpected(163 /* OfKeyword */) : parseOptional(163 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ true )); parseExpected(21 /* CloseParenToken */); node = factoryCreateForOfStatement(awaitToken, initializer, expression, parseStatement()); - } else if (parseOptional(101 /* InKeyword */)) { + } else if (parseOptional(102 /* InKeyword */)) { const expression = allowInAnd(parseExpression); parseExpected(21 /* CloseParenToken */); node = factory2.createForInStatement(initializer, expression, parseStatement()); @@ -34489,16 +34511,16 @@ function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 249 /* BreakStatement */ ? 81 /* BreakKeyword */ : 86 /* ContinueKeyword */); + parseExpected(kind === 250 /* BreakStatement */ ? 82 /* BreakKeyword */ : 87 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 249 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 250 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(105 /* ReturnKeyword */); + parseExpected(106 /* ReturnKeyword */); const expression = canParseSemicolon() ? void 0 : allowInAnd(parseExpression); parseSemicolon(); return withJSDoc(finishNode(factory2.createReturnStatement(expression), pos), hasJSDoc); @@ -34506,8 +34528,8 @@ function parseWithStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(116 /* WithKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(117 /* WithKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -34517,7 +34539,7 @@ function parseCaseClause() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(82 /* CaseKeyword */); + parseExpected(83 /* CaseKeyword */); const expression = allowInAnd(parseExpression); parseExpected(58 /* ColonToken */); const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); @@ -34525,13 +34547,13 @@ } function parseDefaultClause() { const pos = getNodePos(); - parseExpected(88 /* DefaultKeyword */); + parseExpected(89 /* DefaultKeyword */); parseExpected(58 /* ColonToken */); const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); return finishNode(factory2.createDefaultClause(statements), pos); } function parseCaseOrDefaultClause() { - return token() === 82 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + return token() === 83 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseCaseBlock() { const pos = getNodePos(); @@ -34543,7 +34565,7 @@ function parseSwitchStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(107 /* SwitchKeyword */); + parseExpected(108 /* SwitchKeyword */); parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpected(21 /* CloseParenToken */); @@ -34553,7 +34575,7 @@ function parseThrowStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(109 /* ThrowKeyword */); + parseExpected(110 /* ThrowKeyword */); let expression = scanner2.hasPrecedingLineBreak() ? void 0 : allowInAnd(parseExpression); if (expression === void 0) { identifierCount++; @@ -34567,15 +34589,15 @@ function parseTryStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(111 /* TryKeyword */); + parseExpected(112 /* TryKeyword */); const tryBlock = parseBlock( /*ignoreMissingOpenBrace*/ false ); - const catchClause = token() === 83 /* CatchKeyword */ ? parseCatchClause() : void 0; + const catchClause = token() === 84 /* CatchKeyword */ ? parseCatchClause() : void 0; let finallyBlock; - if (!catchClause || token() === 96 /* FinallyKeyword */) { - parseExpected(96 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); + if (!catchClause || token() === 97 /* FinallyKeyword */) { + parseExpected(97 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); finallyBlock = parseBlock( /*ignoreMissingOpenBrace*/ false @@ -34585,7 +34607,7 @@ } function parseCatchClause() { const pos = getNodePos(); - parseExpected(83 /* CatchKeyword */); + parseExpected(84 /* CatchKeyword */); let variableDeclaration; if (parseOptional(20 /* OpenParenToken */)) { variableDeclaration = parseVariableDeclaration(); @@ -34602,7 +34624,7 @@ function parseDebuggerStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(87 /* DebuggerKeyword */); + parseExpected(88 /* DebuggerKeyword */); parseSemicolon(); return withJSDoc(finishNode(factory2.createDebuggerStatement(), pos), hasJSDoc); } @@ -34631,11 +34653,11 @@ } function nextTokenIsClassKeywordOnSameLine() { nextToken(); - return token() === 84 /* ClassKeyword */ && !scanner2.hasPrecedingLineBreak(); + return token() === 85 /* ClassKeyword */ && !scanner2.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token() === 98 /* FunctionKeyword */ && !scanner2.hasPrecedingLineBreak(); + return token() === 99 /* FunctionKeyword */ && !scanner2.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine() { nextToken(); @@ -34644,48 +34666,48 @@ function isDeclaration2() { while (true) { switch (token()) { - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: return true; - case 118 /* InterfaceKeyword */: - case 154 /* TypeKeyword */: + case 119 /* InterfaceKeyword */: + case 155 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 146 /* ReadonlyKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 147 /* ReadonlyKeyword */: nextToken(); if (scanner2.hasPrecedingLineBreak()) { return false; } continue; - case 159 /* GlobalKeyword */: + case 160 /* GlobalKeyword */: nextToken(); - return token() === 18 /* OpenBraceToken */ || token() === 79 /* Identifier */ || token() === 93 /* ExportKeyword */; - case 100 /* ImportKeyword */: + return token() === 18 /* OpenBraceToken */ || token() === 79 /* Identifier */ || token() === 94 /* ExportKeyword */; + case 101 /* ImportKeyword */: nextToken(); return token() === 10 /* StringLiteral */ || token() === 41 /* AsteriskToken */ || token() === 18 /* OpenBraceToken */ || tokenIsIdentifierOrKeyword(token()); - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: let currentToken2 = nextToken(); - if (currentToken2 === 154 /* TypeKeyword */) { + if (currentToken2 === 155 /* TypeKeyword */) { currentToken2 = lookAhead(nextToken); } - if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 88 /* DefaultKeyword */ || currentToken2 === 128 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) { + if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 89 /* DefaultKeyword */ || currentToken2 === 129 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) { return true; } continue; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: nextToken(); continue; default: @@ -34701,45 +34723,45 @@ case 59 /* AtToken */: case 26 /* SemicolonToken */: case 18 /* OpenBraceToken */: - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: - case 99 /* IfKeyword */: - case 90 /* DoKeyword */: - case 115 /* WhileKeyword */: - case 97 /* ForKeyword */: - case 86 /* ContinueKeyword */: - case 81 /* BreakKeyword */: - case 105 /* ReturnKeyword */: - case 116 /* WithKeyword */: - case 107 /* SwitchKeyword */: - case 109 /* ThrowKeyword */: - case 111 /* TryKeyword */: - case 87 /* DebuggerKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: + case 100 /* IfKeyword */: + case 91 /* DoKeyword */: + case 116 /* WhileKeyword */: + case 98 /* ForKeyword */: + case 87 /* ContinueKeyword */: + case 82 /* BreakKeyword */: + case 106 /* ReturnKeyword */: + case 117 /* WithKeyword */: + case 108 /* SwitchKeyword */: + case 110 /* ThrowKeyword */: + case 112 /* TryKeyword */: + case 88 /* DebuggerKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return true; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThanOrDot); - case 85 /* ConstKeyword */: - case 93 /* ExportKeyword */: + case 86 /* ConstKeyword */: + case 94 /* ExportKeyword */: return isStartOfDeclaration(); - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 118 /* InterfaceKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 154 /* TypeKeyword */: - case 159 /* GlobalKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 119 /* InterfaceKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 155 /* TypeKeyword */: + case 160 /* GlobalKeyword */: return true; - case 127 /* AccessorKeyword */: - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 124 /* StaticKeyword */: - case 146 /* ReadonlyKeyword */: + case 128 /* AccessorKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 125 /* StaticKeyword */: + case 147 /* ReadonlyKeyword */: return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); default: return isStartOfExpression(); @@ -34761,14 +34783,14 @@ /*ignoreMissingOpenBrace*/ false ); - case 113 /* VarKeyword */: + case 114 /* VarKeyword */: return parseVariableStatement( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 119 /* LetKeyword */: + case 120 /* LetKeyword */: if (isLetDeclaration()) { return parseVariableStatement( getNodePos(), @@ -34778,66 +34800,66 @@ ); } break; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionDeclaration( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassDeclaration( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 99 /* IfKeyword */: + case 100 /* IfKeyword */: return parseIfStatement(); - case 90 /* DoKeyword */: + case 91 /* DoKeyword */: return parseDoStatement(); - case 115 /* WhileKeyword */: + case 116 /* WhileKeyword */: return parseWhileStatement(); - case 97 /* ForKeyword */: + case 98 /* ForKeyword */: return parseForOrForInOrForOfStatement(); - case 86 /* ContinueKeyword */: - return parseBreakOrContinueStatement(248 /* ContinueStatement */); - case 81 /* BreakKeyword */: - return parseBreakOrContinueStatement(249 /* BreakStatement */); - case 105 /* ReturnKeyword */: + case 87 /* ContinueKeyword */: + return parseBreakOrContinueStatement(249 /* ContinueStatement */); + case 82 /* BreakKeyword */: + return parseBreakOrContinueStatement(250 /* BreakStatement */); + case 106 /* ReturnKeyword */: return parseReturnStatement(); - case 116 /* WithKeyword */: + case 117 /* WithKeyword */: return parseWithStatement(); - case 107 /* SwitchKeyword */: + case 108 /* SwitchKeyword */: return parseSwitchStatement(); - case 109 /* ThrowKeyword */: + case 110 /* ThrowKeyword */: return parseThrowStatement(); - case 111 /* TryKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 112 /* TryKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return parseTryStatement(); - case 87 /* DebuggerKeyword */: + case 88 /* DebuggerKeyword */: return parseDebuggerStatement(); case 59 /* AtToken */: return parseDeclaration(); - case 132 /* AsyncKeyword */: - case 118 /* InterfaceKeyword */: - case 154 /* TypeKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 136 /* DeclareKeyword */: - case 85 /* ConstKeyword */: - case 92 /* EnumKeyword */: - case 93 /* ExportKeyword */: - case 100 /* ImportKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 124 /* StaticKeyword */: - case 146 /* ReadonlyKeyword */: - case 159 /* GlobalKeyword */: + case 133 /* AsyncKeyword */: + case 119 /* InterfaceKeyword */: + case 155 /* TypeKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 137 /* DeclareKeyword */: + case 86 /* ConstKeyword */: + case 93 /* EnumKeyword */: + case 94 /* ExportKeyword */: + case 101 /* ImportKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 125 /* StaticKeyword */: + case 147 /* ReadonlyKeyword */: + case 160 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -34846,7 +34868,7 @@ return parseExpressionOrLabeledStatement(); } function isDeclareModifier(modifier) { - return modifier.kind === 136 /* DeclareKeyword */; + return modifier.kind === 137 /* DeclareKeyword */; } function parseDeclaration() { const pos = getNodePos(); @@ -34879,33 +34901,33 @@ } function parseDeclarationWorker(pos, hasJSDoc, modifiersIn) { switch (token()) { - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: return parseVariableStatement(pos, hasJSDoc, modifiersIn); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassDeclaration(pos, hasJSDoc, modifiersIn); - case 118 /* InterfaceKeyword */: + case 119 /* InterfaceKeyword */: return parseInterfaceDeclaration(pos, hasJSDoc, modifiersIn); - case 154 /* TypeKeyword */: + case 155 /* TypeKeyword */: return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); - case 92 /* EnumKeyword */: + case 93 /* EnumKeyword */: return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 159 /* GlobalKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: + case 160 /* GlobalKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiersIn); - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: nextToken(); switch (token()) { - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: case 63 /* EqualsToken */: return parseExportAssignment(pos, hasJSDoc, modifiersIn); - case 128 /* AsKeyword */: + case 129 /* AsKeyword */: return parseNamespaceExportDeclaration(pos, hasJSDoc, modifiersIn); default: return parseExportDeclaration(pos, hasJSDoc, modifiersIn); @@ -34913,7 +34935,7 @@ default: if (modifiersIn) { const missing = createMissingNode( - 279 /* MissingDeclaration */, + 280 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -35023,12 +35045,12 @@ const pos = getNodePos(); let flags = 0; switch (token()) { - case 113 /* VarKeyword */: + case 114 /* VarKeyword */: break; - case 119 /* LetKeyword */: + case 120 /* LetKeyword */: flags |= 1 /* Let */; break; - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: flags |= 2 /* Const */; break; default: @@ -35036,7 +35058,7 @@ } nextToken(); let declarations; - if (token() === 162 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 163 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -35064,7 +35086,7 @@ function parseFunctionDeclaration(pos, hasJSDoc, modifiers) { const savedAwaitContext = inAwaitContext(); const modifierFlags = modifiersToFlags(modifiers); - parseExpected(98 /* FunctionKeyword */); + parseExpected(99 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; @@ -35087,8 +35109,8 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseConstructorName() { - if (token() === 135 /* ConstructorKeyword */) { - return parseExpected(135 /* ConstructorKeyword */); + if (token() === 136 /* ConstructorKeyword */) { + return parseExpected(136 /* ConstructorKeyword */); } if (token() === 10 /* StringLiteral */ && lookAhead(nextToken) === 20 /* OpenParenToken */) { return tryParse(() => { @@ -35182,7 +35204,7 @@ false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 174 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 175 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -35211,7 +35233,7 @@ return true; } if (idToken !== void 0) { - if (!isKeyword(idToken) || idToken === 151 /* SetKeyword */ || idToken === 137 /* GetKeyword */) { + if (!isKeyword(idToken) || idToken === 152 /* SetKeyword */ || idToken === 138 /* GetKeyword */) { return true; } switch (token()) { @@ -35229,7 +35251,7 @@ return false; } function parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers) { - parseExpectedToken(124 /* StaticKeyword */); + parseExpectedToken(125 /* StaticKeyword */); const body = parseClassStaticBlockBody(); const node = withJSDoc(finishNode(factory2.createClassStaticBlockDeclaration(body), pos), hasJSDoc); node.modifiers = modifiers; @@ -35249,7 +35271,7 @@ return body; } function parseDecoratorExpression() { - if (inAwaitContext() && token() === 133 /* AwaitKeyword */) { + if (inAwaitContext() && token() === 134 /* AwaitKeyword */) { const pos = getNodePos(); const awaitExpression = parseIdentifier(Diagnostics.Expression_expected); nextToken(); @@ -35274,13 +35296,13 @@ function tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock) { const pos = getNodePos(); const kind = token(); - if (token() === 85 /* ConstKeyword */ && permitConstAsModifier) { + if (token() === 86 /* ConstKeyword */ && permitConstAsModifier) { if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { return void 0; } - } else if (stopOnStartOfClassStaticBlock && token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + } else if (stopOnStartOfClassStaticBlock && token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return void 0; - } else if (hasSeenStaticModifier && token() === 124 /* StaticKeyword */) { + } else if (hasSeenStaticModifier && token() === 125 /* StaticKeyword */) { return void 0; } else { if (!parseAnyContextualModifier()) { @@ -35299,7 +35321,7 @@ } } while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 124 /* StaticKeyword */) + if (modifier.kind === 125 /* StaticKeyword */) hasSeenStaticModifier = true; list = append(list, modifier); hasLeadingModifier = true; @@ -35312,7 +35334,7 @@ } if (hasTrailingDecorator) { while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 124 /* StaticKeyword */) + if (modifier.kind === 125 /* StaticKeyword */) hasSeenStaticModifier = true; list = append(list, modifier); } @@ -35321,10 +35343,10 @@ } function parseModifiersForArrowFunction() { let modifiers; - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { const pos = getNodePos(); nextToken(); - const modifier = finishNode(factoryCreateToken(132 /* AsyncKeyword */), pos); + const modifier = finishNode(factoryCreateToken(133 /* AsyncKeyword */), pos); modifiers = createNodeArray([modifier], pos); } return modifiers; @@ -35344,16 +35366,16 @@ /*stopOnStartOfClassStaticBlock*/ true ); - if (token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 0 /* None */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 0 /* None */); } - if (token() === 135 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); if (constructorDeclaration) { return constructorDeclaration; @@ -35398,11 +35420,11 @@ /*allowDecorators*/ true ); - if (token() === 84 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 228 /* ClassExpression */); + if (token() === 85 /* ClassKeyword */) { + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 229 /* ClassExpression */); } const missing = createMissingNode( - 279 /* MissingDeclaration */, + 280 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -35417,15 +35439,15 @@ hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 228 /* ClassExpression */ + 229 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 260 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 261 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); - parseExpected(84 /* ClassKeyword */); + parseExpected(85 /* ClassKeyword */); const name = parseNameOfClassDeclarationOrExpression(); const typeParameters = parseTypeParameters(); if (some(modifiers, isExportModifier)) @@ -35442,14 +35464,14 @@ members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 260 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 261 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { return isBindingIdentifier() && !isImplementsClause() ? createIdentifier(isBindingIdentifier()) : void 0; } function isImplementsClause() { - return token() === 117 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 118 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses() { if (isHeritageClause2()) { @@ -35460,7 +35482,7 @@ function parseHeritageClause() { const pos = getNodePos(); const tok = token(); - Debug.assert(tok === 94 /* ExtendsKeyword */ || tok === 117 /* ImplementsKeyword */); + Debug.assert(tok === 95 /* ExtendsKeyword */ || tok === 118 /* ImplementsKeyword */); nextToken(); const types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); return finishNode(factory2.createHeritageClause(tok, types), pos); @@ -35468,7 +35490,7 @@ function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (expression.kind === 231 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -35478,13 +35500,13 @@ return token() === 29 /* LessThanToken */ ? parseBracketedList(20 /* TypeArguments */, parseType, 29 /* LessThanToken */, 31 /* GreaterThanToken */) : void 0; } function isHeritageClause2() { - return token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; } function parseClassMembers() { return parseList(5 /* ClassMembers */, parseClassElement); } function parseInterfaceDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(118 /* InterfaceKeyword */); + parseExpected(119 /* InterfaceKeyword */); const name = parseIdentifier(); const typeParameters = parseTypeParameters(); const heritageClauses = parseHeritageClauses(); @@ -35493,11 +35515,11 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(154 /* TypeKeyword */); + parseExpected(155 /* TypeKeyword */); const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(63 /* EqualsToken */); - const type = token() === 139 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); + const type = token() === 140 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); parseSemicolon(); const node = factory2.createTypeAliasDeclaration(modifiers, name, typeParameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -35510,7 +35532,7 @@ return withJSDoc(finishNode(factory2.createEnumMember(name, initializer), pos), hasJSDoc); } function parseEnumDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(92 /* EnumKeyword */); + parseExpected(93 /* EnumKeyword */); const name = parseIdentifier(); let members; if (parseExpected(18 /* OpenBraceToken */)) { @@ -35550,7 +35572,7 @@ function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; let name; - if (token() === 159 /* GlobalKeyword */) { + if (token() === 160 /* GlobalKeyword */) { name = parseIdentifier(); flags |= 1024 /* GlobalAugmentation */; } else { @@ -35568,12 +35590,12 @@ } function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; - if (token() === 159 /* GlobalKeyword */) { + if (token() === 160 /* GlobalKeyword */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); - } else if (parseOptional(143 /* NamespaceKeyword */)) { + } else if (parseOptional(144 /* NamespaceKeyword */)) { flags |= 16 /* Namespace */; } else { - parseExpected(142 /* ModuleKeyword */); + parseExpected(143 /* ModuleKeyword */); if (token() === 10 /* StringLiteral */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); } @@ -35581,7 +35603,7 @@ return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiersIn, flags); } function isExternalModuleReference2() { - return token() === 147 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); + return token() === 148 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { return nextToken() === 20 /* OpenParenToken */; @@ -35593,8 +35615,8 @@ return nextToken() === 43 /* SlashToken */; } function parseNamespaceExportDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(128 /* AsKeyword */); - parseExpected(143 /* NamespaceKeyword */); + parseExpected(129 /* AsKeyword */); + parseExpected(144 /* NamespaceKeyword */); const name = parseIdentifier(); parseSemicolon(); const node = factory2.createNamespaceExportDeclaration(name); @@ -35602,14 +35624,14 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(100 /* ImportKeyword */); - const afterImportPos = scanner2.getStartPos(); + parseExpected(101 /* ImportKeyword */); + const afterImportPos = scanner2.getTokenFullStart(); let identifier; if (isIdentifier2()) { identifier = parseIdentifier(); } let isTypeOnly = false; - if (token() !== 158 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { + if (token() !== 159 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { isTypeOnly = true; identifier = isIdentifier2() ? parseIdentifier() : void 0; } @@ -35621,11 +35643,11 @@ token() === 41 /* AsteriskToken */ || // import * token() === 18 /* OpenBraceToken */) { importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(158 /* FromKeyword */); + parseExpected(159 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); let assertClause; - if (token() === 130 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (token() === 131 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { assertClause = parseAssertClause(); } parseSemicolon(); @@ -35645,9 +35667,9 @@ function parseAssertClause(skipAssertKeyword) { const pos = getNodePos(); if (!skipAssertKeyword) { - parseExpected(130 /* AssertKeyword */); + parseExpected(131 /* AssertKeyword */); } - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); if (parseExpected(18 /* OpenBraceToken */)) { const multiLine = scanner2.hasPrecedingLineBreak(); const elements = parseDelimitedList( @@ -35686,7 +35708,7 @@ return token() === 41 /* AsteriskToken */ || token() === 18 /* OpenBraceToken */; } function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 27 /* CommaToken */ || token() === 158 /* FromKeyword */; + return token() === 27 /* CommaToken */ || token() === 159 /* FromKeyword */; } function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { parseExpected(63 /* EqualsToken */); @@ -35699,7 +35721,7 @@ function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(27 /* CommaToken */)) { - namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(272 /* NamedImports */); + namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(273 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -35711,7 +35733,7 @@ } function parseExternalModuleReference() { const pos = getNodePos(); - parseExpected(147 /* RequireKeyword */); + parseExpected(148 /* RequireKeyword */); parseExpected(20 /* OpenParenToken */); const expression = parseModuleSpecifier(); parseExpected(21 /* CloseParenToken */); @@ -35729,35 +35751,35 @@ function parseNamespaceImport() { const pos = getNodePos(); parseExpected(41 /* AsteriskToken */); - parseExpected(128 /* AsKeyword */); + parseExpected(129 /* AsKeyword */); const name = parseIdentifier(); return finishNode(factory2.createNamespaceImport(name), pos); } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 272 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); + const node = kind === 273 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(278 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(279 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(273 /* ImportSpecifier */); + return parseImportOrExportSpecifier(274 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); let checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - let checkIdentifierStart = scanner2.getTokenPos(); - let checkIdentifierEnd = scanner2.getTextPos(); + let checkIdentifierStart = scanner2.getTokenStart(); + let checkIdentifierEnd = scanner2.getTokenEnd(); let isTypeOnly = false; let propertyName; let canParseAsKeyword = true; let name = parseIdentifierName(); if (name.escapedText === "type") { - if (token() === 128 /* AsKeyword */) { + if (token() === 129 /* AsKeyword */) { const firstAs = parseIdentifierName(); - if (token() === 128 /* AsKeyword */) { + if (token() === 129 /* AsKeyword */) { const secondAs = parseIdentifierName(); if (tokenIsIdentifierOrKeyword(token())) { isTypeOnly = true; @@ -35782,20 +35804,20 @@ name = parseNameWithKeywordCheck(); } } - if (canParseAsKeyword && token() === 128 /* AsKeyword */) { + if (canParseAsKeyword && token() === 129 /* AsKeyword */) { propertyName = name; - parseExpected(128 /* AsKeyword */); + parseExpected(129 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 273 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 274 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 273 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 274 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - checkIdentifierStart = scanner2.getTokenPos(); - checkIdentifierEnd = scanner2.getTextPos(); + checkIdentifierStart = scanner2.getTokenStart(); + checkIdentifierEnd = scanner2.getTokenEnd(); return parseIdentifierName(); } } @@ -35811,22 +35833,22 @@ let exportClause; let moduleSpecifier; let assertClause; - const isTypeOnly = parseOptional(154 /* TypeKeyword */); + const isTypeOnly = parseOptional(155 /* TypeKeyword */); const namespaceExportPos = getNodePos(); if (parseOptional(41 /* AsteriskToken */)) { - if (parseOptional(128 /* AsKeyword */)) { + if (parseOptional(129 /* AsKeyword */)) { exportClause = parseNamespaceExport(namespaceExportPos); } - parseExpected(158 /* FromKeyword */); + parseExpected(159 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(276 /* NamedExports */); - if (token() === 158 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { - parseExpected(158 /* FromKeyword */); + exportClause = parseNamedImportsOrExports(277 /* NamedExports */); + if (token() === 159 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { + parseExpected(159 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } } - if (moduleSpecifier && token() === 130 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (moduleSpecifier && token() === 131 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { assertClause = parseAssertClause(); } parseSemicolon(); @@ -35844,7 +35866,7 @@ if (parseOptional(63 /* EqualsToken */)) { isExportEquals = true; } else { - parseExpected(88 /* DefaultKeyword */); + parseExpected(89 /* DefaultKeyword */); } const expression = parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ @@ -36042,16 +36064,12 @@ while (true) { switch (token()) { case 59 /* AtToken */: - if (state === 0 /* BeginningOfLine */ || state === 1 /* SawAsterisk */) { - removeTrailingWhitespace(comments); - if (!commentsPos) - commentsPos = getNodePos(); - addTag(parseTag(indent3)); - state = 0 /* BeginningOfLine */; - margin = void 0; - } else { - pushComment(scanner2.getTokenText()); - } + removeTrailingWhitespace(comments); + if (!commentsPos) + commentsPos = getNodePos(); + addTag(parseTag(indent3)); + state = 0 /* BeginningOfLine */; + margin = void 0; break; case 4 /* NewLineTrivia */: comments.push(scanner2.getTokenText()); @@ -36060,29 +36078,33 @@ break; case 41 /* AsteriskToken */: const asterisk = scanner2.getTokenText(); - if (state === 1 /* SawAsterisk */ || state === 2 /* SavingComments */) { + if (state === 1 /* SawAsterisk */) { state = 2 /* SavingComments */; pushComment(asterisk); } else { + Debug.assert(state === 0 /* BeginningOfLine */); state = 1 /* SawAsterisk */; indent3 += asterisk.length; } break; case 5 /* WhitespaceTrivia */: + Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text"); const whitespace = scanner2.getTokenText(); - if (state === 2 /* SavingComments */) { - comments.push(whitespace); - } else if (margin !== void 0 && indent3 + whitespace.length > margin) { + if (margin !== void 0 && indent3 + whitespace.length > margin) { comments.push(whitespace.slice(margin - indent3)); } indent3 += whitespace.length; break; case 1 /* EndOfFileToken */: break loop; + case 81 /* JSDocCommentTextToken */: + state = 2 /* SavingComments */; + pushComment(scanner2.getTokenValue()); + break; case 18 /* OpenBraceToken */: state = 2 /* SavingComments */; - const commentEnd = scanner2.getStartPos(); - const linkStart = scanner2.getTextPos() - 1; + const commentEnd = scanner2.getTokenFullStart(); + const linkStart = scanner2.getTokenEnd() - 1; const link = parseJSDocLink(linkStart); if (link) { if (!linkEnd) { @@ -36091,7 +36113,7 @@ parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd != null ? linkEnd : start2, commentEnd)); parts.push(link); comments = []; - linkEnd = scanner2.getTextPos(); + linkEnd = scanner2.getTokenEnd(); break; } default: @@ -36099,16 +36121,23 @@ pushComment(scanner2.getTokenText()); break; } - nextTokenJSDoc(); + if (state === 2 /* SavingComments */) { + nextJSDocCommentTextToken( + /*inBackticks*/ + false + ); + } else { + nextTokenJSDoc(); + } } - removeTrailingWhitespace(comments); - if (parts.length && comments.length) { - parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd != null ? linkEnd : start2, commentsPos)); + const trimmedComments = trimStringEnd(comments.join("")); + if (parts.length && trimmedComments.length) { + parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd != null ? linkEnd : start2, commentsPos)); } if (parts.length && tags) Debug.assertIsDefined(commentsPos, "having parsed tags implies that the end of the comment span should be set"); const tagsArray = tags && createNodeArray(tags, tagsPos, tagsEnd); - return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start2, commentsPos) : comments.length ? comments.join("") : void 0, tagsArray), start2, end); + return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start2, commentsPos) : trimmedComments.length ? trimmedComments : void 0, tagsArray), start2, end); }); function removeLeadingNewlines(comments2) { while (comments2.length && (comments2[0] === "\n" || comments2[0] === "\r")) { @@ -36116,8 +36145,16 @@ } } function removeTrailingWhitespace(comments2) { - while (comments2.length && comments2[comments2.length - 1].trim() === "") { - comments2.pop(); + while (comments2.length) { + const trimmed = trimStringEnd(comments2[comments2.length - 1]); + if (trimmed === "") { + comments2.pop(); + } else if (trimmed.length < comments2[comments2.length - 1].length) { + comments2[comments2.length - 1] = trimmed; + break; + } else { + break; + } } } function isNextNonwhitespaceTokenEndOfFile() { @@ -36165,7 +36202,7 @@ } function parseTag(margin) { Debug.assert(token() === 59 /* AtToken */); - const start3 = scanner2.getTokenPos(); + const start3 = scanner2.getTokenStart(); nextTokenJSDoc(); const tagName = parseJSDocIdentifierName( /*message*/ @@ -36264,7 +36301,6 @@ const parts2 = []; let linkEnd2; let state = 0 /* BeginningOfLine */; - let previousWhitespace = true; let margin; function pushComment(text) { if (!margin) { @@ -36289,34 +36325,29 @@ indent3 = 0; break; case 59 /* AtToken */: - if (state === 3 /* SavingBackticks */ || state === 2 /* SavingComments */ && (!previousWhitespace || lookAhead(isNextJSDocTokenWhitespace))) { - comments2.push(scanner2.getTokenText()); - break; - } - scanner2.setTextPos(scanner2.getTextPos() - 1); + scanner2.resetTokenState(scanner2.getTokenEnd() - 1); + break loop; case 1 /* EndOfFileToken */: break loop; case 5 /* WhitespaceTrivia */: - if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { - pushComment(scanner2.getTokenText()); - } else { - const whitespace = scanner2.getTokenText(); - if (margin !== void 0 && indent3 + whitespace.length > margin) { - comments2.push(whitespace.slice(margin - indent3)); - } - indent3 += whitespace.length; + Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text"); + const whitespace = scanner2.getTokenText(); + if (margin !== void 0 && indent3 + whitespace.length > margin) { + comments2.push(whitespace.slice(margin - indent3)); + state = 2 /* SavingComments */; } + indent3 += whitespace.length; break; case 18 /* OpenBraceToken */: state = 2 /* SavingComments */; - const commentEnd = scanner2.getStartPos(); - const linkStart = scanner2.getTextPos() - 1; + const commentEnd = scanner2.getTokenFullStart(); + const linkStart = scanner2.getTokenEnd() - 1; const link = parseJSDocLink(linkStart); if (link) { parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 != null ? linkEnd2 : commentsPos2, commentEnd)); parts2.push(link); comments2 = []; - linkEnd2 = scanner2.getTextPos(); + linkEnd2 = scanner2.getTokenEnd(); } else { pushComment(scanner2.getTokenText()); } @@ -36329,6 +36360,12 @@ } pushComment(scanner2.getTokenText()); break; + case 81 /* JSDocCommentTextToken */: + if (state !== 3 /* SavingBackticks */) { + state = 2 /* SavingComments */; + } + pushComment(scanner2.getTokenValue()); + break; case 41 /* AsteriskToken */: if (state === 0 /* BeginningOfLine */) { state = 1 /* SawAsterisk */; @@ -36342,24 +36379,23 @@ pushComment(scanner2.getTokenText()); break; } - previousWhitespace = token() === 5 /* WhitespaceTrivia */; - tok = nextTokenJSDoc(); + if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { + tok = nextJSDocCommentTextToken(state === 3 /* SavingBackticks */); + } else { + tok = nextTokenJSDoc(); + } } removeLeadingNewlines(comments2); - removeTrailingWhitespace(comments2); + const trimmedComments = trimStringEnd(comments2.join("")); if (parts2.length) { - if (comments2.length) { - parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 != null ? linkEnd2 : commentsPos2)); + if (trimmedComments.length) { + parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 != null ? linkEnd2 : commentsPos2)); } - return createNodeArray(parts2, commentsPos2, scanner2.getTextPos()); - } else if (comments2.length) { - return comments2.join(""); + return createNodeArray(parts2, commentsPos2, scanner2.getTokenEnd()); + } else if (trimmedComments.length) { + return trimmedComments; } } - function isNextJSDocTokenWhitespace() { - const next = nextTokenJSDoc(); - return next === 5 /* WhitespaceTrivia */ || next === 4 /* NewLineTrivia */; - } function parseJSDocLink(start3) { const linkType = tryParse(parseJSDocLinkPrefix); if (!linkType) { @@ -36385,7 +36421,7 @@ nextTokenJSDoc(); } const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain; - return finishNode(create(name, text.join("")), start3, scanner2.getTextPos()); + return finishNode(create(name, text.join("")), start3, scanner2.getTokenEnd()); } function parseJSDocLinkPrefix() { skipWhitespaceOrAsterisk(); @@ -36438,9 +36474,9 @@ } function isObjectOrObjectArrayTypeReference(node) { switch (node.kind) { - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return true; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -36470,26 +36506,26 @@ let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) { - if (child.kind === 344 /* JSDocParameterTag */ || child.kind === 351 /* JSDocPropertyTag */) { + if (child.kind === 345 /* JSDocParameterTag */ || child.kind === 352 /* JSDocPropertyTag */) { children = append(children, child); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 185 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 186 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } } function parseReturnTag(start3, tagName, indent3, indentText) { if (some(tags, isJSDocReturnTag)) { - parseErrorAt(tagName.pos, scanner2.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText); + parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText); } const typeExpression = tryParseTypeExpression(); return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start3, getNodePos(), indent3, indentText)), start3); } function parseTypeTag(start3, tagName, indent3, indentText) { if (some(tags, isJSDocTypeTag)) { - parseErrorAt(tagName.pos, scanner2.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText); + parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText); } const typeExpression = parseJSDocTypeExpression( /*mayOmitBraces*/ @@ -36512,10 +36548,10 @@ function parseAuthorTag(start3, tagName, indent3, indentText) { const commentStart = getNodePos(); const textOnly = parseAuthorNameAndEmail(); - let commentEnd = scanner2.getStartPos(); + let commentEnd = scanner2.getTokenFullStart(); const comments2 = parseTrailingTagComments(start3, commentEnd, indent3, indentText); if (!comments2) { - commentEnd = scanner2.getStartPos(); + commentEnd = scanner2.getTokenFullStart(); } const allParts = typeof comments2 !== "string" ? createNodeArray(concatenate([finishNode(textOnly, commentStart, commentEnd)], comments2), commentStart) : textOnly.text + comments2; return finishNode(factory2.createJSDocAuthorTag(tagName, allParts), start3); @@ -36531,7 +36567,7 @@ break; } else if (token2 === 31 /* GreaterThanToken */ && inEmail) { comments2.push(scanner2.getTokenText()); - scanner2.setTextPos(scanner2.getTokenPos() + 1); + scanner2.resetTokenState(scanner2.getTokenEnd()); break; } comments2.push(scanner2.getTokenText()); @@ -36610,7 +36646,7 @@ let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent3))) { hasChildren = true; - if (child.kind === 347 /* JSDocTypeTag */) { + if (child.kind === 348 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -36625,7 +36661,7 @@ } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 185 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 186 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start3); end2 = typeExpression.end; @@ -36639,7 +36675,7 @@ return finishNode(typedefTag, start3, end2); } function parseJSDocTypeNameWithNamespace(nested) { - const pos = scanner2.getTokenPos(); + const start3 = scanner2.getTokenStart(); if (!tokenIsIdentifierOrKeyword(token())) { return void 0; } @@ -36656,7 +36692,7 @@ body, nested ? 4 /* NestedNamespace */ : void 0 ); - return finishNode(jsDocNamespaceNode, pos); + return finishNode(jsDocNamespaceNode, start3); } if (nested) { typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */; @@ -36677,7 +36713,7 @@ const returnTag = tryParse(() => { if (parseOptionalJsdoc(59 /* AtToken */)) { const tag = parseTag(indent3); - if (tag && tag.kind === 345 /* JSDocReturnTag */) { + if (tag && tag.kind === 346 /* JSDocReturnTag */) { return tag; } } @@ -36732,7 +36768,7 @@ case 59 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent3); - if (child && (child.kind === 344 /* JSDocParameterTag */ || child.kind === 351 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 345 /* JSDocParameterTag */ || child.kind === 352 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -36759,7 +36795,7 @@ } function tryParseChildTag(target, indent3) { Debug.assert(token() === 59 /* AtToken */); - const start3 = scanner2.getStartPos(); + const start3 = scanner2.getTokenFullStart(); nextTokenJSDoc(); const tagName = parseJSDocIdentifierName(); skipWhitespace(); @@ -36859,11 +36895,11 @@ ); } identifierCount++; - const pos = scanner2.getTokenPos(); - const end2 = scanner2.getTextPos(); + const start3 = scanner2.getTokenStart(); + const end2 = scanner2.getTokenEnd(); const originalKeywordKind = token(); const text = internIdentifier(scanner2.getTokenValue()); - const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), pos, end2); + const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), start3, end2); nextTokenJSDoc(); return result; } @@ -37452,7 +37488,7 @@ if (lhs.kind === 79 /* Identifier */) { return lhs.escapedText === rhs.escapedText; } - if (lhs.kind === 108 /* ThisKeyword */) { + if (lhs.kind === 109 /* ThisKeyword */) { return true; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -39368,7 +39404,7 @@ var _a2; const rootExpression = (_a2 = sourceFile.statements[0]) == null ? void 0 : _a2.expression; const knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : void 0; - if (rootExpression && rootExpression.kind !== 207 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 208 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -39426,7 +39462,7 @@ function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 299 /* PropertyAssignment */) { + if (element.kind !== 300 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -39484,19 +39520,19 @@ function convertPropertyValueToJson(valueExpression, option) { let invalidReported; switch (valueExpression.kind) { - case 110 /* TrueKeyword */: + case 111 /* TrueKeyword */: reportInvalidOptionValue(option && option.type !== "boolean" && (option.type !== "listOrElement" || option.element.type !== "boolean")); return validateValue( /*value*/ true ); - case 95 /* FalseKeyword */: + case 96 /* FalseKeyword */: reportInvalidOptionValue(option && option.type !== "boolean" && (option.type !== "listOrElement" || option.element.type !== "boolean")); return validateValue( /*value*/ false ); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: reportInvalidOptionValue(option && option.name === "extends"); return validateValue( /*value*/ @@ -39527,13 +39563,13 @@ case 8 /* NumericLiteral */: reportInvalidOptionValue(option && option.type !== "number" && (option.type !== "listOrElement" || option.element.type !== "number")); return validateValue(Number(valueExpression.text)); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: if (valueExpression.operator !== 40 /* MinusToken */ || valueExpression.operand.kind !== 8 /* NumericLiteral */) { break; } reportInvalidOptionValue(option && option.type !== "number" && (option.type !== "listOrElement" || option.element.type !== "number")); return validateValue(-Number(valueExpression.operand.text)); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: reportInvalidOptionValue(option && option.type !== "object" && (option.type !== "listOrElement" || option.element.type !== "object")); const objectLiteralExpression = valueExpression; if (option) { @@ -39555,7 +39591,7 @@ void 0 )); } - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: reportInvalidOptionValue(option && option.type !== "list" && option.type !== "listOrElement"); return validateValue(convertArrayLiteralExpressionToJson( valueExpression.elements, @@ -43301,23 +43337,23 @@ } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 276 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 277 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -43331,7 +43367,7 @@ return state; } break; - case 265 /* ModuleBlock */: { + case 266 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -43350,7 +43386,7 @@ }); return state; } - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 79 /* Identifier */: if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { @@ -43516,7 +43552,7 @@ } } function getDeclarationName(node) { - if (node.kind === 274 /* ExportAssignment */) { + if (node.kind === 275 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -43525,7 +43561,7 @@ const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 164 /* ComputedPropertyName */) { + if (name.kind === 165 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -43547,31 +43583,31 @@ return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return "__constructor" /* Constructor */; - case 181 /* FunctionType */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: + case 182 /* FunctionType */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: return "__call" /* Call */; - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: return "__new" /* New */; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return "__index" /* Index */; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return "export=" /* ExportEquals */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); break; - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 166 /* Parameter */: - Debug.assert(node.parent.kind === 320 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 167 /* Parameter */: + Debug.assert(node.parent.kind === 321 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); const functionType = node.parent; const index = functionType.parameters.indexOf(node); return "arg" + index; @@ -43618,7 +43654,7 @@ messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 274 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 275 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -43657,7 +43693,7 @@ function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 278 /* ExportSpecifier */ || node.kind === 268 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 279 /* ExportSpecifier */ || node.kind === 269 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { Debug.assertNode(container, canHaveLocals); @@ -43724,7 +43760,7 @@ const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 216 /* ArrowFunction */) { + if (node.kind !== 217 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -43746,14 +43782,14 @@ const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 172 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 173 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 173 /* Constructor */ || isInJSFile(node) && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 174 /* Constructor */ || isInJSFile(node) && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; @@ -43767,14 +43803,14 @@ node.flags |= 512 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 173 /* Constructor */ || node.kind === 172 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */)) { + if (node.kind === 174 /* Constructor */ || node.kind === 173 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -43800,8 +43836,8 @@ blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 259 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 259 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 260 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 260 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -43821,59 +43857,59 @@ inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 240 /* FirstStatement */ && node.kind <= 256 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 241 /* FirstStatement */ && node.kind <= 257 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: bindWhileStatement(node); break; - case 243 /* DoStatement */: + case 244 /* DoStatement */: bindDoStatement(node); break; - case 245 /* ForStatement */: + case 246 /* ForStatement */: bindForStatement(node); break; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 242 /* IfStatement */: + case 243 /* IfStatement */: bindIfStatement(node); break; - case 250 /* ReturnStatement */: - case 254 /* ThrowStatement */: + case 251 /* ReturnStatement */: + case 255 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: bindTryStatement(node); break; - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: bindSwitchStatement(node); break; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: bindCaseBlock(node); break; - case 292 /* CaseClause */: + case 293 /* CaseClause */: bindCaseClause(node); break; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: bindLabeledStatement(node); break; - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -43881,49 +43917,49 @@ } bindBinaryExpressionFlow(node); break; - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: bindCallExpressionFlow(node); break; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 308 /* SourceFile */: { + case 309 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 238 /* Block */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 266 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: bindBindingElementFlow(node); break; - case 166 /* Parameter */: + case 167 /* Parameter */: bindParameterFlow(node); break; - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: - case 299 /* PropertyAssignment */: - case 227 /* SpreadElement */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: + case 300 /* PropertyAssignment */: + case 228 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -43936,20 +43972,20 @@ switch (expr.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 108 /* ThisKeyword */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 109 /* ThisKeyword */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return hasNarrowableArgument(expr); - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return expr.operator === 53 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -43968,7 +44004,7 @@ } } } - if (expr.expression.kind === 208 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 209 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -43988,9 +44024,9 @@ case 36 /* EqualsEqualsEqualsToken */: case 37 /* ExclamationEqualsEqualsToken */: return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return isNarrowableOperand(expr.left); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return isNarrowingExpression(expr.right); case 27 /* CommaToken */: return isNarrowingExpression(expr.right); @@ -43999,9 +44035,9 @@ } function isNarrowableOperand(expr) { switch (expr.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 63 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -44036,7 +44072,7 @@ if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if ((expression.kind === 110 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || expression.kind === 95 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && !isExpressionOfOptionalChainRoot(expression) && !isNullishCoalesce(expression.parent)) { + if ((expression.kind === 111 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || expression.kind === 96 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && !isExpressionOfOptionalChainRoot(expression) && !isNullishCoalesce(expression.parent)) { return unreachableFlow; } if (!isNarrowingExpression(expression)) { @@ -44074,21 +44110,21 @@ function isStatementCondition(node) { const parent3 = node.parent; switch (parent3.kind) { - case 242 /* IfStatement */: - case 244 /* WhileStatement */: - case 243 /* DoStatement */: + case 243 /* IfStatement */: + case 245 /* WhileStatement */: + case 244 /* DoStatement */: return parent3.expression === node; - case 245 /* ForStatement */: - case 224 /* ConditionalExpression */: + case 246 /* ForStatement */: + case 225 /* ConditionalExpression */: return parent3.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 214 /* ParenthesizedExpression */) { + if (node.kind === 215 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { + } else if (node.kind === 222 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { node = node.operand; } else { return isLogicalOrCoalescingBinaryExpression(node); @@ -44131,7 +44167,7 @@ } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 253 /* LabeledStatement */) { + while (label && node.parent.kind === 254 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -44182,12 +44218,12 @@ bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 247 /* ForOfStatement */) { + if (node.kind === 248 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 258 /* VariableDeclarationList */) { + if (node.initializer.kind !== 259 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -44209,7 +44245,7 @@ } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 250 /* ReturnStatement */) { + if (node.kind === 251 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -44226,7 +44262,7 @@ return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 249 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 250 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -44296,7 +44332,7 @@ preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 293 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 294 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -44339,9 +44375,9 @@ maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { const call = node; - if (call.expression.kind !== 106 /* SuperKeyword */ && isDottedName(call.expression)) { + if (call.expression.kind !== 107 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); } } @@ -44365,7 +44401,7 @@ currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -44374,21 +44410,21 @@ function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 206 /* ArrayLiteralExpression */) { + } else if (node.kind === 207 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 227 /* SpreadElement */) { + if (e.kind === 228 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 207 /* ObjectLiteralExpression */) { + } else if (node.kind === 208 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 299 /* PropertyAssignment */) { + if (p.kind === 300 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 300 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 301 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 301 /* SpreadAssignment */) { + } else if (p.kind === 302 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -44519,7 +44555,7 @@ const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 63 /* EqualsToken */ && node.left.kind === 209 /* ElementAccessExpression */) { + if (operator === 63 /* EqualsToken */ && node.left.kind === 210 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -44547,7 +44583,7 @@ } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 208 /* PropertyAccessExpression */) { + if (node.expression.kind === 209 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -44612,7 +44648,7 @@ } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 343 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 344 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive( node.fullName, @@ -44627,7 +44663,7 @@ function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 171 /* MethodDeclaration */) { + if (host && host.kind !== 172 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -44640,15 +44676,15 @@ } function bindOptionalChainRest(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -44695,18 +44731,18 @@ bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 215 /* FunctionExpression */ || expr.kind === 216 /* ArrowFunction */) { + if (expr.kind === 216 /* FunctionExpression */ || expr.kind === 217 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); } else { bindEachChild(node); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { currentFlow = createFlowCall(currentFlow, node); } } } - if (node.expression.kind === 208 /* PropertyAccessExpression */) { + if (node.expression.kind === 209 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -44721,39 +44757,39 @@ } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 308 /* SourceFile */: + case 309 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 207 /* ObjectLiteralExpression */: - case 261 /* InterfaceDeclaration */: - case 289 /* JsxAttributes */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 208 /* ObjectLiteralExpression */: + case 262 /* InterfaceDeclaration */: + case 290 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 326 /* JSDocSignature */: - case 178 /* IndexSignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 320 /* JSDocFunctionType */: - case 172 /* ClassStaticBlockDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 197 /* MappedType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 327 /* JSDocSignature */: + case 179 /* IndexSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 321 /* JSDocFunctionType */: + case 173 /* ClassStaticBlockDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 198 /* MappedType */: if (container.locals) Debug.assertNode(container, canHaveLocals); return declareSymbol( @@ -44855,10 +44891,10 @@ } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -44953,13 +44989,13 @@ if (originalKeywordKind === void 0) { return; } - if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) { + if (inStrictMode && originalKeywordKind >= 118 /* FirstFutureReservedWord */ && originalKeywordKind <= 126 /* LastFutureReservedWord */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, getStrictModeIdentifierMessage(node), declarationNameToString(node) )); - } else if (originalKeywordKind === 133 /* AwaitKeyword */) { + } else if (originalKeywordKind === 134 /* AwaitKeyword */) { if (isExternalModule(file) && isInTopLevelContext(node)) { file.bindDiagnostics.push(createDiagnosticForNode2( node, @@ -44973,7 +45009,7 @@ declarationNameToString(node) )); } - } else if (originalKeywordKind === 125 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { + } else if (originalKeywordKind === 126 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, @@ -45061,7 +45097,7 @@ } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 308 /* SourceFile */ && blockScopeContainer.kind !== 264 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 309 /* SourceFile */ && blockScopeContainer.kind !== 265 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -45128,7 +45164,7 @@ node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 162 /* LastToken */) { + if (node.kind > 163 /* LastToken */) { const saveParent = parent2; parent2 = node; const containerFlags = getContainerFlags(node); @@ -45193,24 +45229,24 @@ bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); break; } - case 108 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 300 /* ShorthandPropertyAssignment */)) { + case 109 /* ThisKeyword */: + if (currentFlow && (isExpression(node) || parent2.kind === 301 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 233 /* MetaProperty */: - case 106 /* SuperKeyword */: + case 234 /* MetaProperty */: + case 107 /* SuperKeyword */: node.flowNode = currentFlow; break; case 80 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -45229,7 +45265,7 @@ ); } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -45264,83 +45300,83 @@ Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return checkStrictModeCatchClause(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return checkStrictModeWithStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 194 /* ThisType */: + case 195 /* ThisType */: seenThisKeyword = true; return; - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return bindTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return bindParameter(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return bindPropertyWorker(node); - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 302 /* EnumMember */: + case 303 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return declareSymbolAndAddToSymbolTable( node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */ ); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 181 /* FunctionType */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 183 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 197 /* MappedType */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 198 /* MappedType */: return bindAnonymousTypeWorker(node); - case 335 /* JSDocClassTag */: + case 336 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return bindFunctionExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -45358,60 +45394,60 @@ bindCallExpression(node); } break; - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return bindJsxAttributes(node); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 268 /* ImportEqualsDeclaration */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 269 /* ImportEqualsDeclaration */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return bindImportClause(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return bindExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return bindExportAssignment(node); - case 308 /* SourceFile */: + case 309 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 238 /* Block */: + case 239 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 344 /* JSDocParameterTag */: - if (node.parent.kind === 326 /* JSDocSignature */) { + case 345 /* JSDocParameterTag */: + if (node.parent.kind === 327 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 325 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 326 /* JSDocTypeLiteral */) { break; } - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 319 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 320 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return bind(node.typeExpression); } } @@ -45563,8 +45599,8 @@ false ); switch (thisContainer.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 63 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -45582,12 +45618,12 @@ addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -45604,7 +45640,7 @@ ); } break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -45637,9 +45673,9 @@ } } function bindSpecialPropertyDeclaration(node) { - if (node.expression.kind === 108 /* ThisKeyword */) { + if (node.expression.kind === 109 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 308 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 309 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -45688,7 +45724,7 @@ } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 308 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 309 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces( namespaceSymbol, node.arguments[0], @@ -45802,7 +45838,7 @@ declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 308 /* SourceFile */ : propertyAccess.parent.parent.kind === 308 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 309 /* SourceFile */ : propertyAccess.parent.parent.kind === 309 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -45864,7 +45900,7 @@ } } function bindClassLikeDeclaration(node) { - if (node.kind === 260 /* ClassDeclaration */) { + if (node.kind === 261 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -45893,7 +45929,7 @@ checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 257 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 258 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && getEmitModuleResolutionKind(options) !== 100 /* Bundler */ && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -45906,7 +45942,7 @@ } } function bindParameter(node) { - if (node.kind === 344 /* JSDocParameterTag */ && container.kind !== 326 /* JSDocSignature */) { + if (node.kind === 345 /* JSDocParameterTag */ && container.kind !== 327 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { @@ -45980,7 +46016,7 @@ } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 192 /* InferType */) { + } else if (node.parent.kind === 193 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { Debug.assertNode(container2, canHaveLocals); @@ -46011,9 +46047,9 @@ if (currentFlow === unreachableFlow) { const reportError = ( // report error on all statements except empty ones - isStatementButNotDeclaration(node) && node.kind !== 239 /* EmptyStatement */ || // report error on class declarations - node.kind === 260 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - node.kind === 264 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) + isStatementButNotDeclaration(node) && node.kind !== 240 /* EmptyStatement */ || // report error on class declarations + node.kind === 261 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + node.kind === 265 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) ); if (reportError) { currentFlow = reportedUnreachableFlow; @@ -46041,12 +46077,12 @@ } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -46081,54 +46117,54 @@ } function getContainerFlags(node) { switch (node.kind) { - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 289 /* JsxAttributes */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 290 /* JsxAttributes */: return 1 /* IsContainer */; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 197 /* MappedType */: - case 178 /* IndexSignature */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 198 /* MappedType */: + case 179 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: - case 320 /* JSDocFunctionType */: - case 181 /* FunctionType */: - case 177 /* ConstructSignature */: - case 182 /* ConstructorType */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: + case 321 /* JSDocFunctionType */: + case 182 /* FunctionType */: + case 178 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 173 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 295 /* CatchClause */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 266 /* CaseBlock */: + case 296 /* CatchClause */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 267 /* CaseBlock */: return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - case 238 /* Block */: + case 239 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; } return 0 /* None */; @@ -46289,7 +46325,7 @@ symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 183 /* TypeQuery */) { + if (d.type && d.type.kind === 184 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -47514,7 +47550,10 @@ createIndexInfo, getAnyType: () => anyType, getStringType: () => stringType, + getStringLiteralType, getNumberType: () => numberType, + getNumberLiteralType, + getBigIntType: () => bigintType, createPromiseType, createArrayType, getElementTypeOfArrayType, @@ -48428,7 +48467,7 @@ return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 308 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 309 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function getSymbol2(symbols, name, meaning) { if (meaning) { @@ -48472,13 +48511,13 @@ return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 205 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 205 /* BindingElement */); + if (declaration.kind === 206 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 206 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 257 /* VariableDeclaration */), usage); - } else if (declaration.kind === 257 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 258 /* VariableDeclaration */), usage); + } else if (declaration.kind === 258 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -48494,10 +48533,10 @@ } return true; } - if (usage.parent.kind === 278 /* ExportSpecifier */ || usage.parent.kind === 274 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 279 /* ExportSpecifier */ || usage.parent.kind === 275 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 274 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 275 /* ExportAssignment */ && usage.isExportEquals) { return true; } if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { @@ -48518,9 +48557,9 @@ return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 240 /* VariableStatement */: - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: + case 241 /* VariableStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -48545,7 +48584,7 @@ const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 171 /* MethodDeclaration */) { + if (declaration2.kind === 172 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -48559,7 +48598,7 @@ } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 169 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 170 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -48578,15 +48617,15 @@ return "quit"; } switch (node.kind) { - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return true; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 238 /* Block */: + case 239 /* Block */: switch (node.parent.kind) { - case 174 /* GetAccessor */: - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: return true; default: return false; @@ -48616,17 +48655,17 @@ } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 173 /* Constructor */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 174 /* Constructor */: return false; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 299 /* PropertyAssignment */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 300 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (hasStaticModifier(node)) { return target < 99 /* ESNext */ || !useDefineForClassFields; } @@ -48671,17 +48710,17 @@ if (result = lookup(location.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 323 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 166 /* Parameter */ || lastLocation.kind === 344 /* JSDocParameterTag */ || lastLocation.kind === 345 /* JSDocReturnTag */ || lastLocation.kind === 165 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 324 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 167 /* Parameter */ || lastLocation.kind === 345 /* JSDocParameterTag */ || lastLocation.kind === 346 /* JSDocReturnTag */ || lastLocation.kind === 166 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 166 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 167 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 191 /* ConditionalType */) { + } else if (location.kind === 192 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -48693,13 +48732,13 @@ } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const moduleExports = ((_a2 = getSymbolOfDeclaration(location)) == null ? void 0 : _a2.exports) || emptySymbols; - if (location.kind === 308 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 309 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { if (result = moduleExports.get("default" /* Default */)) { const localSymbol = getLocalSymbolForExportDefault(result); if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { @@ -48708,7 +48747,7 @@ result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 278 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 277 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 279 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 278 /* NamespaceExport */))) { break; } } @@ -48720,7 +48759,7 @@ } } break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 16777216 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { error( @@ -48734,7 +48773,7 @@ break loop; } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -48745,9 +48784,9 @@ } } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -48769,8 +48808,8 @@ } } break; - case 230 /* ExpressionWithTypeArguments */: - if (lastLocation === location.expression && location.parent.token === 94 /* ExtendsKeyword */) { + case 231 /* ExpressionWithTypeArguments */: + if (lastLocation === location.expression && location.parent.token === 95 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) { if (nameNotFoundMessage) { @@ -48780,9 +48819,9 @@ } } break; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 261 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 262 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -48791,21 +48830,21 @@ } } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -48818,37 +48857,37 @@ } } break; - case 167 /* Decorator */: - if (location.parent && location.parent.kind === 166 /* Parameter */) { + case 168 /* Decorator */: + if (location.parent && location.parent.kind === 167 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 260 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 261 /* ClassDeclaration */)) { location = location.parent; } break; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 192 /* InferType */: + case 193 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -48976,7 +49015,7 @@ if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */); if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 277 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + const message = typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 278 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; const unescapedName = unescapeLeadingUnderscores(name); addTypeOnlyDeclarationRelatedInfo( error(errorLocation, message, unescapedName), @@ -48996,14 +49035,14 @@ diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 277 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 278 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 216 /* ArrowFunction */ && location.kind !== 215 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 169 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 217 /* ArrowFunction */ && location.kind !== 216 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 170 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -49015,12 +49054,12 @@ } function isSelfReferenceLocation(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 264 /* ModuleDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 265 /* ModuleDeclaration */: return true; default: return false; @@ -49032,7 +49071,7 @@ function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 165 /* TypeParameter */) { + if (decl.kind === 166 /* TypeParameter */) { const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent2 === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -49093,9 +49132,9 @@ function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -49163,7 +49202,7 @@ return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 278 /* ExportSpecifier */) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 279 /* ExportSpecifier */) { error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } @@ -49209,7 +49248,7 @@ const grandparent = node.parent.parent; const parentOfGrandparent = grandparent.parent; if (grandparent && parentOfGrandparent) { - const isExtending = isHeritageClause(grandparent) && grandparent.token === 94 /* ExtendsKeyword */; + const isExtending = isHeritageClause(grandparent) && grandparent.token === 95 /* ExtendsKeyword */; const isInterface = isInterfaceDeclaration(parentOfGrandparent); return isExtending && isInterface; } @@ -49287,7 +49326,7 @@ return; } const declaration = (_a2 = result.declarations) == null ? void 0 : _a2.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 263 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 264 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); @@ -49319,13 +49358,13 @@ } function getAnyImportSyntax(node) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return node; - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.parent; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.parent; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -49335,7 +49374,7 @@ return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); } function isAliasSymbolDeclaration2(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 267 /* NamespaceExportDeclaration */ || node.kind === 270 /* ImportClause */ && !!node.name || node.kind === 271 /* NamespaceImport */ || node.kind === 277 /* NamespaceExport */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 278 /* ExportSpecifier */ || node.kind === 274 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 300 /* ShorthandPropertyAssignment */ || node.kind === 299 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 257 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 205 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 268 /* NamespaceExportDeclaration */ || node.kind === 271 /* ImportClause */ && !!node.name || node.kind === 272 /* NamespaceImport */ || node.kind === 278 /* NamespaceExport */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 279 /* ExportSpecifier */ || node.kind === 275 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 301 /* ShorthandPropertyAssignment */ || node.kind === 300 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 258 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 206 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -49346,7 +49385,7 @@ const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; } - if (isVariableDeclaration(node) || node.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 281 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -49375,10 +49414,10 @@ false ) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node)); - const isExport = typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */; + const isExport = typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */; const message = isExport ? Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; - const name = typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + const name = typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); addRelatedInfo(error(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); } } @@ -49520,15 +49559,15 @@ } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.parent.moduleSpecifier; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -49861,26 +49900,26 @@ } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: - case 257 /* VariableDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 258 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 273 /* ImportSpecifier */: - case 205 /* BindingElement */: + case 274 /* ImportSpecifier */: + case 206 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 274 /* ExportAssignment */: - case 223 /* BinaryExpression */: + case 275 /* ExportAssignment */: + case 224 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return resolveEntityName( node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -49888,10 +49927,10 @@ true, dontRecursivelyResolve ); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -49992,7 +50031,7 @@ return links.typeOnlyDeclaration || void 0; } if (links.typeOnlyDeclaration) { - const resolved = links.typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); + const resolved = links.typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; } return void 0; @@ -50035,7 +50074,7 @@ if (entityName.kind === 79 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 163 /* QualifiedName */) { + if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 164 /* QualifiedName */) { return resolveEntityName( entityName, 1920 /* Namespace */, @@ -50044,7 +50083,7 @@ dontResolveAlias ); } else { - Debug.assert(entityName.parent.kind === 268 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 269 /* ImportEqualsDeclaration */); return resolveEntityName( entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -50115,9 +50154,9 @@ if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 163 /* QualifiedName */ || name.kind === 208 /* PropertyAccessExpression */) { - const left = name.kind === 163 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 163 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 164 /* QualifiedName */ || name.kind === 209 /* PropertyAccessExpression */) { + const left = name.kind === 164 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 164 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName( left, namespaceMeaning, @@ -50181,7 +50220,7 @@ throw Debug.assertNever(name, "Unknown entity name kind."); } Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 274 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 275 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly( getAliasDeclarationFromName(name), symbol, @@ -50533,7 +50572,7 @@ var _a2; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 308 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 309 /* SourceFile */)) { const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; error(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); return symbol; @@ -50638,7 +50677,7 @@ return shouldTreatPropertiesOfExternalModuleAsExports(type) ? getPropertyOfType(type, memberName) : void 0; } function shouldTreatPropertiesOfExternalModuleAsExports(resolvedExternalModuleType) { - return !(resolvedExternalModuleType.flags & 134348796 /* Primitive */ || getObjectFlags(resolvedExternalModuleType) & 1 /* Class */ || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path + return !(resolvedExternalModuleType.flags & 402784252 /* Primitive */ || getObjectFlags(resolvedExternalModuleType) & 1 /* Class */ || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path isArrayType(resolvedExternalModuleType) || isTupleType(resolvedExternalModuleType)); } function getExportsOfSymbol(symbol) { @@ -50895,7 +50934,7 @@ function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 173 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 174 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -51013,11 +51052,11 @@ } } switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const sym = getSymbolOfDeclaration(location); if (result = callback( (sym == null ? void 0 : sym.exports) || emptySymbols, @@ -51030,9 +51069,9 @@ return result; } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: let table; (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -51110,7 +51149,7 @@ return [symbol]; } const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => { - if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 278 /* ExportSpecifier */))) { + if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 279 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -51155,7 +51194,7 @@ if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 278 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 279 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { @@ -51170,10 +51209,10 @@ if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: continue; default: return false; @@ -51309,10 +51348,10 @@ return node && getSymbolOfDeclaration(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -51360,9 +51399,9 @@ } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 183 /* TypeQuery */ || entityName.parent.kind === 230 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 164 /* ComputedPropertyName */) { + if (entityName.parent.kind === 184 /* TypeQuery */ || entityName.parent.kind === 231 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 165 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 163 /* QualifiedName */ || entityName.kind === 208 /* PropertyAccessExpression */ || entityName.parent.kind === 268 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 164 /* QualifiedName */ || entityName.kind === 209 /* PropertyAccessExpression */ || entityName.parent.kind === 269 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -51428,7 +51467,7 @@ return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 309 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode( 4 /* Unspecified */, @@ -51445,9 +51484,9 @@ function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 182 /* ConstructorType */ : 181 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 183 /* ConstructorType */ : 182 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 178 /* ConstructSignature */ : 177 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -51593,7 +51632,7 @@ return void 0; } context.approximateLength += 3; - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (!(context.flags & 536870912 /* NoTypeReduction */)) { type = getReducedType(type); @@ -51603,29 +51642,29 @@ return factory.createTypeReferenceNode(symbolToEntityNameNode(type.aliasSymbol), mapToTypeNodes(type.aliasTypeArguments, context)); } if (type === unresolvedType) { - return addSyntheticLeadingComment(factory.createKeywordTypeNode(131 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "unresolved"); + return addSyntheticLeadingComment(factory.createKeywordTypeNode(132 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "unresolved"); } context.approximateLength += 3; - return factory.createKeywordTypeNode(type === intrinsicMarkerType ? 139 /* IntrinsicKeyword */ : 131 /* AnyKeyword */); + return factory.createKeywordTypeNode(type === intrinsicMarkerType ? 140 /* IntrinsicKeyword */ : 132 /* AnyKeyword */); } if (type.flags & 2 /* Unknown */) { - return factory.createKeywordTypeNode(157 /* UnknownKeyword */); + return factory.createKeywordTypeNode(158 /* UnknownKeyword */); } if (type.flags & 4 /* String */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(152 /* StringKeyword */); + return factory.createKeywordTypeNode(153 /* StringKeyword */); } if (type.flags & 8 /* Number */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(148 /* NumberKeyword */); + return factory.createKeywordTypeNode(149 /* NumberKeyword */); } if (type.flags & 64 /* BigInt */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(160 /* BigIntKeyword */); + return factory.createKeywordTypeNode(161 /* BigIntKeyword */); } if (type.flags & 16 /* Boolean */ && !type.aliasSymbol) { context.approximateLength += 7; - return factory.createKeywordTypeNode(134 /* BooleanKeyword */); + return factory.createKeywordTypeNode(135 /* BooleanKeyword */); } if (type.flags & 1056 /* EnumLike */) { if (type.symbol.flags & 8 /* EnumMember */) { @@ -51684,15 +51723,15 @@ } } context.approximateLength += 13; - return factory.createTypeOperatorNode(156 /* UniqueKeyword */, factory.createKeywordTypeNode(153 /* SymbolKeyword */)); + return factory.createTypeOperatorNode(157 /* UniqueKeyword */, factory.createKeywordTypeNode(154 /* SymbolKeyword */)); } if (type.flags & 16384 /* Void */) { context.approximateLength += 4; - return factory.createKeywordTypeNode(114 /* VoidKeyword */); + return factory.createKeywordTypeNode(115 /* VoidKeyword */); } if (type.flags & 32768 /* Undefined */) { context.approximateLength += 9; - return factory.createKeywordTypeNode(155 /* UndefinedKeyword */); + return factory.createKeywordTypeNode(156 /* UndefinedKeyword */); } if (type.flags & 65536 /* Null */) { context.approximateLength += 4; @@ -51700,15 +51739,15 @@ } if (type.flags & 131072 /* Never */) { context.approximateLength += 5; - return factory.createKeywordTypeNode(144 /* NeverKeyword */); + return factory.createKeywordTypeNode(145 /* NeverKeyword */); } if (type.flags & 4096 /* ESSymbol */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(153 /* SymbolKeyword */); + return factory.createKeywordTypeNode(154 /* SymbolKeyword */); } if (type.flags & 67108864 /* NonPrimitive */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(149 /* ObjectKeyword */); + return factory.createKeywordTypeNode(150 /* ObjectKeyword */); } if (isThisTypeParameter(type)) { if (context.flags & 4194304 /* InObjectTypeLiteral */) { @@ -51802,7 +51841,7 @@ const indexedType = type.type; context.approximateLength += 6; const indexTypeNode = typeToTypeNodeHelper(indexedType, context); - return factory.createTypeOperatorNode(141 /* KeyOfKeyword */, indexTypeNode); + return factory.createTypeOperatorNode(142 /* KeyOfKeyword */, indexTypeNode); } if (type.flags & 134217728 /* TemplateLiteral */) { const texts = type.texts; @@ -51860,9 +51899,9 @@ factory.createTypeReferenceNode(factory.cloneNode(name)), typeToTypeNodeHelper(type2.checkType, context), factory.createConditionalTypeNode(newTypeVariable, extendsTypeNode2, trueTypeNode2, falseTypeNode2), - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ), - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ); } const saveInferTypeParameters = context.inferTypeParameters; @@ -51902,7 +51941,7 @@ const name = typeParameterToName(newParam, context); newTypeVariable = factory.createTypeReferenceNode(name); } - appropriateConstraintTypeNode = factory.createTypeOperatorNode(141 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); + appropriateConstraintTypeNode = factory.createTypeOperatorNode(142 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); } else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context); } @@ -51931,7 +51970,7 @@ originalConstraint.flags & 2 /* Unknown */ ? void 0 : typeToTypeNodeHelper(originalConstraint, context) )), result, - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ); } return result; @@ -51984,7 +52023,7 @@ const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method some(symbol.declarations, (declaration) => isStatic(declaration)); const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol - forEach(symbol.declarations, (declaration) => declaration.parent.kind === 308 /* SourceFile */ || declaration.parent.kind === 265 /* ModuleBlock */)); + forEach(symbol.declarations, (declaration) => declaration.parent.kind === 309 /* SourceFile */ || declaration.parent.kind === 266 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a4 = context.visitedTypes) == null ? void 0 : _a4.has(typeId))) && // it is type of the symbol uses itself recursively (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); @@ -52067,12 +52106,12 @@ } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 181 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 182 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 182 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 183 /* ConstructorType */, context); return signatureNode; } } @@ -52105,7 +52144,7 @@ } const elementType = typeToTypeNodeHelper(typeArguments[0], context); const arrayType = factory.createArrayTypeNode(elementType); - return type2.target === globalArrayType ? arrayType : factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, arrayType); + return type2.target === globalArrayType ? arrayType : factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, arrayType); } else if (type2.target.objectFlags & 8 /* Tuple */) { typeArguments = sameMap(typeArguments, (t, i) => removeMissingType(t, !!(type2.target.elementFlags[i] & 2 /* Optional */))); if (typeArguments.length > 0) { @@ -52129,12 +52168,12 @@ } } const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode(tupleConstituentNodes), 1 /* SingleLine */); - return type2.target.readonly ? factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; + return type2.target.readonly ? factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; } } if (context.encounteredError || context.flags & 524288 /* AllowEmptyTuple */) { const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode([]), 1 /* SingleLine */); - return type2.target.readonly ? factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; + return type2.target.readonly ? factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; } context.encounteredError = true; return void 0; @@ -52258,12 +52297,12 @@ } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 176 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 177 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 177 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 178 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -52310,7 +52349,7 @@ void 0 ); } - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } function shouldUsePlaceholderForProperty(propertySymbol, context) { var _a2; @@ -52347,7 +52386,7 @@ if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); for (const signature of signatures) { - const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 170 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 171 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } } else { @@ -52359,12 +52398,12 @@ context.reverseMappedStack || (context.reverseMappedStack = []); context.reverseMappedStack.push(propertySymbol); } - propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(131 /* AnyKeyword */); + propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(132 /* AnyKeyword */); if (propertyIsReverseMapped) { context.reverseMappedStack.pop(); } } - const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(146 /* ReadonlyKeyword */)] : void 0; + const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(147 /* ReadonlyKeyword */)] : void 0; if (modifiers) { context.approximateLength += 9; } @@ -52378,8 +52417,8 @@ } function preserveCommentsOn(node) { var _a3; - if (some(propertySymbol.declarations, (d) => d.kind === 351 /* JSDocPropertyTag */)) { - const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 351 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 352 /* JSDocPropertyTag */)) { + const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 352 /* JSDocPropertyTag */); const commentText = getTextOfJSDocComment(d.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -52479,7 +52518,7 @@ } context.approximateLength += name.length + 4; return factory.createIndexSignature( - indexInfo.isReadonly ? [factory.createToken(146 /* ReadonlyKeyword */)] : void 0, + indexInfo.isReadonly ? [factory.createToken(147 /* ReadonlyKeyword */)] : void 0, [indexingParameter], typeNode ); @@ -52535,7 +52574,7 @@ } } } - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 173 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); + const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 174 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context); if (thisParameter) { parameters.unshift(thisParameter); @@ -52543,7 +52582,7 @@ let returnTypeNode; const typePredicate = getTypePredicateOfSignature(signature); if (typePredicate) { - const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(129 /* AssertsKeyword */) : void 0; + const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(130 /* AssertsKeyword */) : void 0; const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 33554432 /* NoAsciiEscaping */) : factory.createThisTypeNode(); const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context); returnTypeNode = factory.createTypePredicateNode(assertsModifier, parameterName, typeNode); @@ -52552,15 +52591,15 @@ if (returnType && !(suppressAny && isTypeAny(returnType))) { returnTypeNode = serializeReturnTypeForSignature(context, returnType, signature, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports); } else if (!suppressAny) { - returnTypeNode = factory.createKeywordTypeNode(131 /* AnyKeyword */); + returnTypeNode = factory.createKeywordTypeNode(132 /* AnyKeyword */); } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 182 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 183 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 176 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 177 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 170 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 171 /* MethodDeclaration */ ? factory.createMethodDeclaration( + const node = kind === 177 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 178 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 171 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 172 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -52572,25 +52611,25 @@ returnTypeNode, /*body*/ void 0 - ) : kind === 173 /* Constructor */ ? factory.createConstructorDeclaration( + ) : kind === 174 /* Constructor */ ? factory.createConstructorDeclaration( modifiers, parameters, /*body*/ void 0 - ) : kind === 174 /* GetAccessor */ ? factory.createGetAccessorDeclaration( + ) : kind === 175 /* GetAccessor */ ? factory.createGetAccessorDeclaration( modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, returnTypeNode, /*body*/ void 0 - ) : kind === 175 /* SetAccessor */ ? factory.createSetAccessorDeclaration( + ) : kind === 176 /* SetAccessor */ ? factory.createSetAccessorDeclaration( modifiers, (_e = options == null ? void 0 : options.name) != null ? _e : factory.createIdentifier(""), parameters, /*body*/ void 0 - ) : kind === 178 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 320 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 181 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 182 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 259 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( + ) : kind === 179 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 321 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 182 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 183 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 260 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -52600,7 +52639,7 @@ returnTypeNode, /*body*/ void 0 - ) : kind === 215 /* FunctionExpression */ ? factory.createFunctionExpression( + ) : kind === 216 /* FunctionExpression */ ? factory.createFunctionExpression( modifiers, /*asteriskToken*/ void 0, @@ -52609,7 +52648,7 @@ parameters, returnTypeNode, factory.createBlock([]) - ) : kind === 216 /* ArrowFunction */ ? factory.createArrowFunction( + ) : kind === 217 /* ArrowFunction */ ? factory.createArrowFunction( modifiers, typeParameters, parameters, @@ -52659,9 +52698,9 @@ return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 166 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 167 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 344 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 345 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -52671,7 +52710,7 @@ const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(25 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 33554432 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 163 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 33554432 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 33554432 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 164 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 33554432 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(57 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -52852,11 +52891,11 @@ } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { var _a2; - let file = getDeclarationOfKind(symbol, 308 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 309 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 308 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 309 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -53336,17 +53375,17 @@ } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 322 /* JSDocNamepathType */) { - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + if (isJSDocAllType(node) || node.kind === 323 /* JSDocNamepathType */) { + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { - return factory.createKeywordTypeNode(157 /* UnknownKeyword */); + return factory.createKeywordTypeNode(158 /* UnknownKeyword */); } if (isJSDocNullableType(node)) { return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]); } if (isJSDocOptionalType(node)) { - return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]); + return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(156 /* UndefinedKeyword */)]); } if (isJSDocNonNullableType(node)) { return visitNode(node.type, visitExistingNodeTreeSymbols); @@ -53364,12 +53403,12 @@ void 0, name, t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0, - overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); })); } if (isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "") { - return setOriginalNode(factory.createKeywordTypeNode(131 /* AnyKeyword */), node); + return setOriginalNode(factory.createKeywordTypeNode(132 /* AnyKeyword */), node); } if ((isExpressionWithTypeArguments(node) || isTypeReferenceNode(node)) && isJSDocIndexSignature(node)) { return factory.createTypeLiteralNode([factory.createIndexSignature( @@ -53405,7 +53444,7 @@ /*initializer*/ void 0 )), - visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); } else { return factory.createFunctionTypeNode( @@ -53420,7 +53459,7 @@ /*initializer*/ void 0 )), - visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); } } @@ -53500,13 +53539,13 @@ function symbolTableToDeclarationStatements(symbolTable, context, bundled) { const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, - 171 /* MethodDeclaration */, + 172 /* MethodDeclaration */, /*useAcessors*/ true ); const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol( (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), - 170 /* MethodSignature */, + 171 /* MethodSignature */, /*useAcessors*/ false ); @@ -53965,10 +54004,10 @@ const baseTypes = getBaseTypes(interfaceType); const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0; const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType)); - const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 176 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 177 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 177 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 178 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); - const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(94 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; + const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(95 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( /*modifiers*/ void 0, @@ -54047,7 +54086,7 @@ function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 259 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 260 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); addResult(setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags); } if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) { @@ -54187,8 +54226,8 @@ const isClass = !!((_b = staticType.symbol) == null ? void 0 : _b.valueDeclaration) && isClassLike(staticType.symbol.valueDeclaration); const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType) : anyType; const heritageClauses = [ - ...!length(baseTypes) ? [] : [factory.createHeritageClause(94 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))], - ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(117 /* ImplementsKeyword */, implementsExpressions)] + ...!length(baseTypes) ? [] : [factory.createHeritageClause(95 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))], + ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(118 /* ImplementsKeyword */, implementsExpressions)] ]; const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType)); const publicSymbolProps = filter(symbolProps, (s) => { @@ -54231,7 +54270,7 @@ [], /*body*/ void 0 - )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 173 /* Constructor */); + )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 174 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -54283,8 +54322,8 @@ const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 205 /* BindingElement */: - if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 257 /* VariableDeclaration */) { + case 206 /* BindingElement */: + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 258 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -54310,15 +54349,15 @@ } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); break; - case 300 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 223 /* BinaryExpression */) { + case 301 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 224 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -54341,7 +54380,7 @@ ), modifierFlags); break; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) { serializeMaybeAliasAssignment(symbol); break; @@ -54362,10 +54401,10 @@ ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 270 /* ImportClause */: { + case 271 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -54383,7 +54422,7 @@ ), 0 /* None */); break; } - case 271 /* NamespaceImport */: { + case 272 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -54401,7 +54440,7 @@ ), 0 /* None */); break; } - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: addResult(factory.createExportDeclaration( /*modifiers*/ void 0, @@ -54411,7 +54450,7 @@ factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 273 /* ImportSpecifier */: { + case 274 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -54436,7 +54475,7 @@ ), 0 /* None */); break; } - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -54444,12 +54483,12 @@ specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 223 /* BinaryExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 224 /* BinaryExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -54865,7 +54904,7 @@ return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker); function typePredicateToStringWorker(writer2) { const predicate = factory.createTypePredicateNode( - typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(129 /* AssertsKeyword */) : void 0, + typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(130 /* AssertsKeyword */) : void 0, typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createIdentifier(typePredicate.parameterName) : factory.createThisTypeNode(), typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */) // TODO: GH#18217 @@ -54928,10 +54967,10 @@ return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 265 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 266 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 308 /* SourceFile */ || isAmbientModule(location); + return location.kind === 309 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -54979,17 +55018,17 @@ if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 257 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 258 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 228 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 229 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -55006,66 +55045,66 @@ return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: - case 343 /* JSDocEnumTag */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 344 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 259 /* FunctionDeclaration */: - case 263 /* EnumDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + case 264 /* EnumDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 268 /* ImportEqualsDeclaration */ && parent2.kind !== 308 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 269 /* ImportEqualsDeclaration */ && parent2.kind !== 309 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 173 /* Constructor */: - case 177 /* ConstructSignature */: - case 176 /* CallSignature */: - case 178 /* IndexSignature */: - case 166 /* Parameter */: - case 265 /* ModuleBlock */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 184 /* TypeLiteral */: - case 180 /* TypeReference */: - case 185 /* ArrayType */: - case 186 /* TupleType */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: + case 174 /* Constructor */: + case 178 /* ConstructSignature */: + case 177 /* CallSignature */: + case 179 /* IndexSignature */: + case 167 /* Parameter */: + case 266 /* ModuleBlock */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 185 /* TypeLiteral */: + case 181 /* TypeReference */: + case 186 /* ArrayType */: + case 187 /* TupleType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: return false; - case 165 /* TypeParameter */: - case 308 /* SourceFile */: - case 267 /* NamespaceExportDeclaration */: + case 166 /* TypeParameter */: + case 309 /* SourceFile */: + case 268 /* NamespaceExportDeclaration */: return true; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return false; default: return false; @@ -55074,7 +55113,7 @@ } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 274 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 275 /* ExportAssignment */) { exportSymbol = resolveName( node, node.escapedText, @@ -55085,7 +55124,7 @@ /*isUse*/ false ); - } else if (node.parent.kind === 278 /* ExportSpecifier */) { + } else if (node.parent.kind === 279 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -55187,12 +55226,12 @@ function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 257 /* VariableDeclaration */: - case 258 /* VariableDeclarationList */: - case 273 /* ImportSpecifier */: - case 272 /* NamedImports */: - case 271 /* NamespaceImport */: - case 270 /* ImportClause */: + case 258 /* VariableDeclaration */: + case 259 /* VariableDeclarationList */: + case 274 /* ImportSpecifier */: + case 273 /* NamedImports */: + case 272 /* NamespaceImport */: + case 271 /* ImportClause */: return false; default: return true; @@ -55310,23 +55349,23 @@ function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return ancestor.initializer; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent2 = node.parent; - if (node.kind === 205 /* BindingElement */ && parent2.kind === 203 /* ObjectBindingPattern */) { + if (node.kind === 206 /* BindingElement */ && parent2.kind === 204 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 299 /* PropertyAssignment */ || node.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.kind === 300 /* PropertyAssignment */ || node.kind === 301 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent2.elements.indexOf(node); @@ -55351,7 +55390,7 @@ parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 203 /* ObjectBindingPattern */) { + if (pattern.kind === 204 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { @@ -55407,7 +55446,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 104 /* NullKeyword */ || expr.kind === 79 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; + return expr.kind === 105 /* NullKeyword */ || expr.kind === 79 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; } function isEmptyArrayLiteral2(node) { const expr = skipParentheses( @@ -55415,13 +55454,13 @@ /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 206 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 207 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, isProperty = false, isOptional = true) { return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type; } function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) { - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 246 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression( declaration.parent.parent.expression, /*checkMode*/ @@ -55429,7 +55468,7 @@ ))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -55458,8 +55497,8 @@ } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 175 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 174 /* GetAccessor */); + if (func.kind === 176 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 175 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -55533,7 +55572,7 @@ const links = getSymbolLinks(symbol); if (links.isConstructorDeclaredProperty === void 0) { links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 209 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 210 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( /*declaredType*/ void 0, declaration, @@ -55561,7 +55600,7 @@ /*includeClassComputedPropertyName*/ false ); - if (container && (container.kind === 173 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 174 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -55831,7 +55870,7 @@ return type; } function containsSameNamedThisProperty(thisProperty, expression) { - return isPropertyAccessExpression(thisProperty) && thisProperty.expression.kind === 108 /* ThisKeyword */ && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); + return isPropertyAccessExpression(thisProperty) && thisProperty.expression.kind === 109 /* ThisKeyword */ && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); } function isDeclarationInConstructor(expression) { const thisContainer = getThisContainer( @@ -55841,7 +55880,7 @@ /*includeClassComputedPropertyName*/ false ); - return thisContainer.kind === 173 /* Constructor */ || thisContainer.kind === 259 /* FunctionDeclaration */ || thisContainer.kind === 215 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 174 /* Constructor */ || thisContainer.kind === 260 /* FunctionDeclaration */ || thisContainer.kind === 216 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -55908,7 +55947,7 @@ function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 205 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 206 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -55924,7 +55963,7 @@ return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 203 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 204 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration( @@ -55965,7 +56004,7 @@ } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 166 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 167 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -56039,7 +56078,7 @@ return reportCircularityError(symbol); } let type; - if (declaration.kind === 274 /* ExportAssignment */) { + if (declaration.kind === 275 /* ExportAssignment */) { type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) { type = getWidenedTypeForAssignmentDeclaration(symbol); @@ -56080,13 +56119,13 @@ function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -56111,9 +56150,9 @@ if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 174 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 175 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 169 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 175 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 176 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration( accessor, /*includeOptionality*/ @@ -56152,7 +56191,7 @@ if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = (_a2 = getDeclarationOfKind(symbol, 175 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 169 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = (_a2 = getDeclarationOfKind(symbol, 176 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { @@ -56192,7 +56231,7 @@ const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 223 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 223 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 224 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 224 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -56256,7 +56295,7 @@ ); return errorType; } - if (noImplicitAny && (declaration.kind !== 166 /* Parameter */ || declaration.initializer)) { + if (noImplicitAny && (declaration.kind !== 167 /* Parameter */ || declaration.initializer)) { error( symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, @@ -56370,43 +56409,43 @@ return void 0; } switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 320 /* JSDocFunctionType */: - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 262 /* TypeAliasDeclaration */: - case 348 /* JSDocTemplateTag */: - case 349 /* JSDocTypedefTag */: - case 343 /* JSDocEnumTag */: - case 341 /* JSDocCallbackTag */: - case 197 /* MappedType */: - case 191 /* ConditionalType */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 321 /* JSDocFunctionType */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 263 /* TypeAliasDeclaration */: + case 349 /* JSDocTemplateTag */: + case 350 /* JSDocTypedefTag */: + case 344 /* JSDocEnumTag */: + case 342 /* JSDocCallbackTag */: + case 198 /* MappedType */: + case 192 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 197 /* MappedType */) { + if (node.kind === 198 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))); - } else if (node.kind === 191 /* ConditionalType */) { + } else if (node.kind === 192 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */ || node.kind === 261 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; + const thisType = includeThisTypes && (node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */ || node.kind === 262 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 323 /* JSDoc */: { + case 324 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -56416,14 +56455,14 @@ function getOuterTypeParametersOfClassOrInterface(symbol) { var _a2; const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a2 = symbol.declarations) == null ? void 0 : _a2.find((decl) => { - if (decl.kind === 261 /* InterfaceDeclaration */) { + if (decl.kind === 262 /* InterfaceDeclaration */) { return true; } - if (decl.kind !== 257 /* VariableDeclaration */) { + if (decl.kind !== 258 /* VariableDeclaration */) { return false; } const initializer = decl.initializer; - return !!initializer && (initializer.kind === 215 /* FunctionExpression */ || initializer.kind === 216 /* ArrowFunction */); + return !!initializer && (initializer.kind === 216 /* FunctionExpression */ || initializer.kind === 217 /* ArrowFunction */); }); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); @@ -56434,7 +56473,7 @@ } let result; for (const node of symbol.declarations) { - if (node.kind === 261 /* InterfaceDeclaration */ || node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 262 /* InterfaceDeclaration */ || node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -56572,7 +56611,7 @@ } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 260 /* ClassDeclaration */ || declaration.kind === 261 /* InterfaceDeclaration */) { + if (declaration.kind === 261 /* ClassDeclaration */ || declaration.kind === 262 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -56661,7 +56700,7 @@ type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 261 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 262 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -56689,7 +56728,7 @@ return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 261 /* InterfaceDeclaration */) { + if (declaration.kind === 262 /* InterfaceDeclaration */) { if (declaration.flags & 128 /* ContainsThis */) { return false; } @@ -56761,7 +56800,7 @@ } } else { type = errorType; - if (declaration.kind === 343 /* JSDocEnumTag */) { + if (declaration.kind === 344 /* JSDocEnumTag */) { error(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } else { error(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); @@ -56780,7 +56819,7 @@ const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 263 /* EnumDeclaration */) { + if (declaration.kind === 264 /* EnumDeclaration */) { for (const member of declaration.members) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); @@ -56861,22 +56900,22 @@ } function isThislessType(node) { switch (node.kind) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 149 /* ObjectKeyword */: - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: - case 198 /* LiteralType */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 150 /* ObjectKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: + case 199 /* LiteralType */: return true; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return isThislessType(node.elementType); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -56892,21 +56931,21 @@ function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 173 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 174 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); } function isThisless(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { const declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -56921,10 +56960,15 @@ return result; } function addInheritedMembers(symbols, baseSymbols) { - for (const s of baseSymbols) { - if (!symbols.has(s.escapedName) && !isStaticPrivateIdentifierProperty(s)) { - symbols.set(s.escapedName, s); + for (const base of baseSymbols) { + if (isStaticPrivateIdentifierProperty(base)) { + continue; } + const derived = symbols.get(base.escapedName); + if (!derived || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration) && !isConstructorDeclaredProperty(derived) && !getContainingClassStaticBlock(derived.valueDeclaration)) { + symbols.set(base.escapedName, base); + symbols.set(base.escapedName, base); + } } } function isStaticPrivateIdentifierProperty(s) { @@ -57865,7 +57909,7 @@ } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 195 /* TypeOperator */ && constraintDeclaration.operator === 141 /* KeyOfKeyword */; + return constraintDeclaration.kind === 196 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -58732,7 +58776,7 @@ } else { parameters.push(paramSymbol); } - if (type && type.kind === 198 /* LiteralType */) { + if (type && type.kind === 199 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -58740,8 +58784,8 @@ minArgumentCount = parameters.length; } } - if ((declaration.kind === 174 /* GetAccessor */ || declaration.kind === 175 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 174 /* GetAccessor */ ? 175 /* SetAccessor */ : 174 /* GetAccessor */; + if ((declaration.kind === 175 /* GetAccessor */ || declaration.kind === 176 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { + const otherKind = declaration.kind === 175 /* GetAccessor */ ? 176 /* SetAccessor */ : 175 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); @@ -58753,7 +58797,7 @@ thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, "this" /* This */), getTypeFromTypeNode(thisTag.typeExpression)); } } - const classType = declaration.kind === 173 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; + const classType = declaration.kind === 174 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { flags |= 1 /* HasRestParameter */; @@ -58831,15 +58875,15 @@ switch (node.kind) { case 79 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - return node.name.kind === 164 /* ComputedPropertyName */ && traverse(node.name); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + return node.name.kind === 165 /* ComputedPropertyName */ && traverse(node.name); + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return traverse(node.expression); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -58926,7 +58970,7 @@ function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 194 /* ThisType */ ? createTypePredicate( + return parameterName.kind === 195 /* ThisType */ ? createTypePredicate( node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, /*parameterName*/ void 0, @@ -58976,7 +59020,7 @@ return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 173 /* Constructor */) { + if (declaration.kind === 174 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } if (isJSDocSignature(declaration)) { @@ -58992,12 +59036,12 @@ if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 174 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 175 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 175 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 176 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -59100,7 +59144,7 @@ var _a2; if (!signature.isolatedSignatureType) { const kind = (_a2 = signature.declaration) == null ? void 0 : _a2.kind; - const isConstructor = kind === void 0 || kind === 173 /* Constructor */ || kind === 177 /* ConstructSignature */ || kind === 182 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 174 /* Constructor */ || kind === 178 /* ConstructSignature */ || kind === 183 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -59159,9 +59203,9 @@ let inferences; if ((_a2 = typeParameter.symbol) == null ? void 0 : _a2.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 192 /* InferType */) { + if (declaration.parent.kind === 193 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 180 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 181 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference); if (typeParameters) { @@ -59179,13 +59223,13 @@ } } } - } else if (grandParent.kind === 166 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 188 /* RestType */ || grandParent.kind === 199 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 167 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 189 /* RestType */ || grandParent.kind === 200 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 201 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 202 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 165 /* TypeParameter */ && grandParent.parent.kind === 197 /* MappedType */) { + } else if (grandParent.kind === 166 /* TypeParameter */ && grandParent.parent.kind === 198 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 197 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 191 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 197 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 198 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 192 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 198 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -59210,7 +59254,7 @@ } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 197 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 198 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -59219,7 +59263,7 @@ return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 165 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 166 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -59304,7 +59348,7 @@ return ((_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 180 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 185 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 181 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 186 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { @@ -59343,7 +59387,7 @@ return errorType; } } - if (node.kind === 180 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 181 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference( type, node, @@ -59434,9 +59478,9 @@ } function getTypeReferenceName(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -59448,10 +59492,10 @@ return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 163 /* QualifiedName */ ? name.right : name.kind === 208 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 164 /* QualifiedName */ ? name.right : name.kind === 209 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 163 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 208 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 164 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 209 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -59503,7 +59547,7 @@ const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 202 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 203 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -59531,7 +59575,7 @@ return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 186 /* TupleType */ && node.elements.length === 1; + return node.kind === 187 /* TupleType */ && node.elements.length === 1; } function getImpliedConstraint(type, checkNode, extendsNode) { return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0; @@ -59539,17 +59583,17 @@ function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 323 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 324 /* JSDoc */) { const parent2 = node.parent; - if (parent2.kind === 166 /* Parameter */) { + if (parent2.kind === 167 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 191 /* ConditionalType */ && node === parent2.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 192 /* ConditionalType */ && node === parent2.trueType) { const constraint = getImpliedConstraint(type, parent2.checkType, parent2.extendsType); if (constraint) { constraints = append(constraints, constraint); } - } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 197 /* MappedType */ && node === parent2.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 198 /* MappedType */ && node === parent2.type) { const mappedType = getTypeFromTypeNode(parent2); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -59566,7 +59610,7 @@ return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 180 /* TypeReference */ || node.kind === 202 /* ImportType */); + return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 181 /* TypeReference */ || node.kind === 203 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { @@ -59682,9 +59726,9 @@ if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: return declaration; } } @@ -60064,11 +60108,11 @@ } function getTupleElementFlags(node) { switch (node.kind) { - case 187 /* OptionalType */: + case 188 /* OptionalType */: return 2 /* Optional */; - case 188 /* RestType */: + case 189 /* RestType */: return getRestTypeElementFlags(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -60084,7 +60128,7 @@ return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 199 /* NamedTupleMember */); + const missingName = some(node.elements, (e) => e.kind !== 200 /* NamedTupleMember */); return getTupleTargetType( elementFlags, readonly, @@ -60093,51 +60137,51 @@ ); } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 185 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 186 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 186 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 187 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent2 = node.parent; switch (parent2.kind) { - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: - case 180 /* TypeReference */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 196 /* IndexedAccessType */: - case 191 /* ConditionalType */: - case 195 /* TypeOperator */: - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: + case 181 /* TypeReference */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 197 /* IndexedAccessType */: + case 192 /* ConditionalType */: + case 196 /* TypeOperator */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return isResolvedByTypeAlias(parent2); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return true; - case 195 /* TypeOperator */: - return node.operator !== 156 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 193 /* ParenthesizedType */: - case 187 /* OptionalType */: - case 199 /* NamedTupleMember */: - case 319 /* JSDocOptionalType */: - case 317 /* JSDocNullableType */: - case 318 /* JSDocNonNullableType */: - case 312 /* JSDocTypeExpression */: + case 196 /* TypeOperator */: + return node.operator !== 157 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); + case 194 /* ParenthesizedType */: + case 188 /* OptionalType */: + case 200 /* NamedTupleMember */: + case 320 /* JSDocOptionalType */: + case 318 /* JSDocNullableType */: + case 319 /* JSDocNonNullableType */: + case 313 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 188 /* RestType */: - return node.type.kind !== 185 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 189 /* RestType */: + return node.type.kind !== 186 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 190 /* UnionType */: + case 191 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -60148,22 +60192,22 @@ const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 186 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 186 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( + } else if (!(node.kind === 187 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 187 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( target, node, /*mapper*/ void 0 ); } else { - const elementTypes = node.kind === 185 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 186 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } return links.resolvedType; } function isReadonlyTypeOperator(node) { - return isTypeOperatorNode(node) && node.operator === 146 /* ReadonlyKeyword */; + return isTypeOperatorNode(node) && node.operator === 147 /* ReadonlyKeyword */; } function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations) { const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, (_) => 1 /* Required */), readonly, namedMemberDeclarations); @@ -60371,7 +60415,7 @@ return addTypesToUnion(typeSet, includes | (isNamedUnionType(type) ? 1048576 /* Union */ : 0), type.types); } if (!(flags & 131072 /* Never */)) { - includes |= flags & 205258751 /* IncludesMask */; + includes |= flags & 473694207 /* IncludesMask */; if (flags & 465829888 /* Instantiable */) includes |= 33554432 /* IncludesInstantiable */; if (type === wildcardType) @@ -60643,7 +60687,7 @@ typeSet.set(type.id.toString(), type); } } - includes |= flags & 205258751 /* IncludesMask */; + includes |= flags & 473694207 /* IncludesMask */; } return includes; } @@ -60846,12 +60890,15 @@ function getConstituentCountOfTypes(types) { return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0); } + function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) { + return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType; + } function getTypeFromIntersectionTypeNode(node) { const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); const types = map(node.types, getTypeFromTypeNode); - const noSupertypeReduction = types.length === 2 && !!(types[0].flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && types[1] === emptyTypeLiteralType; + const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0])); links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction); } return links.resolvedType; @@ -60913,7 +60960,7 @@ const typeVariable = getTypeParameterFromMappedType(mappedType); return isDistributive(getNameTypeFromMappedType(mappedType) || typeVariable); function isDistributive(type) { - return type.flags & (3 /* AnyOrUnknown */ | 134348796 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false; + return type.flags & (3 /* AnyOrUnknown */ | 402784252 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false; } } function getLiteralTypeFromPropertyName(name) { @@ -60982,13 +61029,13 @@ const links = getNodeLinks(node); if (!links.resolvedType) { switch (node.operator) { - case 141 /* KeyOfKeyword */: + case 142 /* KeyOfKeyword */: links.resolvedType = getIndexType(getTypeFromTypeNode(node.type)); break; - case 156 /* UniqueKeyword */: - links.resolvedType = node.type.kind === 153 /* SymbolKeyword */ ? getESSymbolLikeTypeForNode(walkUpParenthesizedTypes(node.parent)) : errorType; + case 157 /* UniqueKeyword */: + links.resolvedType = node.type.kind === 154 /* SymbolKeyword */ ? getESSymbolLikeTypeForNode(walkUpParenthesizedTypes(node.parent)) : errorType; break; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: links.resolvedType = getTypeFromTypeNode(node.type); break; default: @@ -61174,7 +61221,7 @@ } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { var _a2; - const accessExpression = accessNode && accessNode.kind === 209 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 210 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -61372,7 +61419,7 @@ } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 209 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 196 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 164 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 210 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 197 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 165 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); @@ -61509,7 +61556,7 @@ } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 196 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 197 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -61849,7 +61896,7 @@ } function getAliasSymbolForTypeNode(node) { let host2 = node.parent; - while (isParenthesizedTypeNode(host2) || isJSDocTypeExpression(host2) || isTypeOperatorNode(host2) && host2.operator === 146 /* ReadonlyKeyword */) { + while (isParenthesizedTypeNode(host2) || isJSDocTypeExpression(host2) || isTypeOperatorNode(host2) && host2.operator === 147 /* ReadonlyKeyword */) { host2 = host2.parent; } return isTypeAlias(host2) ? getSymbolOfDeclaration(host2) : void 0; @@ -62039,7 +62086,7 @@ return enumLiteralTypes.get(key) || (enumLiteralTypes.set(key, type = createLiteralType(flags, value, symbol)), type); } function getTypeFromLiteralTypeNode(node) { - if (node.literal.kind === 104 /* NullKeyword */) { + if (node.literal.kind === 105 /* NullKeyword */) { return nullType; } const links = getNodeLinks(node); @@ -62072,7 +62119,7 @@ false ); const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 261 /* InterfaceDeclaration */)) { + if (parent2 && (isClassLike(parent2) || parent2.kind === 262 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent2)).thisType; } @@ -62102,17 +62149,17 @@ } function getArrayElementTypeNode(node) { switch (node.kind) { - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 186 /* TupleType */: + case 187 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 188 /* RestType */ || node.kind === 199 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 189 /* RestType */ || node.kind === 200 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return node.elementType; } return void 0; @@ -62131,94 +62178,94 @@ } function getTypeFromTypeNodeWorker(node) { switch (node.kind) { - case 131 /* AnyKeyword */: - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: + case 132 /* AnyKeyword */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: return anyType; - case 157 /* UnknownKeyword */: + case 158 /* UnknownKeyword */: return unknownType; - case 152 /* StringKeyword */: + case 153 /* StringKeyword */: return stringType; - case 148 /* NumberKeyword */: + case 149 /* NumberKeyword */: return numberType; - case 160 /* BigIntKeyword */: + case 161 /* BigIntKeyword */: return bigintType; - case 134 /* BooleanKeyword */: + case 135 /* BooleanKeyword */: return booleanType; - case 153 /* SymbolKeyword */: + case 154 /* SymbolKeyword */: return esSymbolType; - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return voidType; - case 155 /* UndefinedKeyword */: + case 156 /* UndefinedKeyword */: return undefinedType; - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return nullType; - case 144 /* NeverKeyword */: + case 145 /* NeverKeyword */: return neverType; - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; - case 139 /* IntrinsicKeyword */: + case 140 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 194 /* ThisType */: - case 108 /* ThisKeyword */: + case 195 /* ThisType */: + case 109 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return getTypeFromTypeReference(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 187 /* OptionalType */: + case 188 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 189 /* UnionType */: + case 190 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 193 /* ParenthesizedType */: - case 318 /* JSDocNonNullableType */: - case 312 /* JSDocTypeExpression */: + case 194 /* ParenthesizedType */: + case 319 /* JSDocNonNullableType */: + case 313 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 188 /* RestType */: + case 189 /* RestType */: return getTypeFromRestTypeNode(node); - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 192 /* InferType */: + case 193 /* InferType */: return getTypeFromInferTypeNode(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return getTypeFromImportTypeNode(node); case 79 /* Identifier */: - case 163 /* QualifiedName */: - case 208 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -62423,13 +62470,13 @@ return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 180 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 202 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 181 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 203 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); } function isTypeParameterPossiblyReferenced(tp, node) { if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { const container = tp.symbol.declarations[0].parent; for (let n = node; n !== container; n = n.parent) { - if (!n || n.kind === 238 /* Block */ || n.kind === 191 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 239 /* Block */ || n.kind === 192 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -62438,17 +62485,17 @@ return true; function containsReference(node2) { switch (node2.kind) { - case 194 /* ThisType */: + case 195 /* ThisType */: return !!tp.isThisType; case 79 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; let tpScope; - if (tpDeclaration.kind === 165 /* TypeParameter */) { + if (tpDeclaration.kind === 166 /* TypeParameter */) { tpScope = tpDeclaration.parent; } else if (tp.isThisType) { tpScope = tpDeclaration; @@ -62459,8 +62506,8 @@ return some(firstIdentifierSymbol.declarations, (idDecl) => isNodeDescendantOf(idDecl, tpScope)) || some(node2.typeArguments, containsReference); } return true; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -62696,13 +62743,13 @@ return type; } function getUniqueLiteralFilledInstantiation(type) { - return type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper)); + return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper)); } function getPermissiveInstantiation(type) { - return type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper)); + return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper)); } function getRestrictiveInstantiation(type) { - if (type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */)) { + if (type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */)) { return type; } if (type.restrictiveInstantiation) { @@ -62716,32 +62763,32 @@ return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return (node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 288 /* JsxAttribute */: { + case 289 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 291 /* JsxExpression */: { + case 292 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -62752,7 +62799,7 @@ return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node); } function hasContextSensitiveReturnExpression(node) { - return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 238 /* Block */ && isContextSensitive(node.body); + return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 239 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func); @@ -62844,23 +62891,23 @@ return true; } switch (node.kind) { - case 291 /* JsxExpression */: - case 214 /* ParenthesizedExpression */: + case 292 /* JsxExpression */: + case 215 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 27 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -63160,16 +63207,16 @@ } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return { errorNode: child, innerExpression: child.expression, nameType }; case 11 /* JsxText */: if (child.containsOnlyTriviaWhiteSpaces) { break; } return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() }; - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -63285,7 +63332,7 @@ } } function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (target.flags & (134348796 /* Primitive */ | 131072 /* Never */)) + if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) return false; if (isTupleLikeType(source)) { return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); @@ -63319,13 +63366,13 @@ continue; } switch (prop.kind) { - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: - case 171 /* MethodDeclaration */: - case 300 /* ShorthandPropertyAssignment */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: + case 172 /* MethodDeclaration */: + case 301 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; break; default: @@ -63334,7 +63381,7 @@ } } function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (target.flags & (134348796 /* Primitive */ | 131072 /* Never */)) + if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) return false; return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer); } @@ -63397,7 +63444,7 @@ void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 171 /* MethodDeclaration */ && kind !== 170 /* MethodSignature */ && kind !== 173 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 172 /* MethodDeclaration */ && kind !== 171 /* MethodSignature */ && kind !== 174 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -63991,7 +64038,7 @@ return isRelatedTo(source2, target2, 3 /* Both */, reportErrors2); } function isRelatedTo(originalSource, originalTarget, recursionFlags = 3 /* Both */, reportErrors2 = false, headMessage2, intersectionState = 0 /* None */) { - if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 134348796 /* Primitive */) { + if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 402784252 /* Primitive */) { if (relation === comparableRelation && !(originalTarget.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(originalTarget, originalSource, relation) || isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors2 ? reportError : void 0)) { return -1 /* True */; } @@ -64055,7 +64102,7 @@ return 0 /* False */; } } - const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (134348796 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2)); + const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (402784252 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2)); const isComparingJsxAttributes = !!(getObjectFlags(source2) & 2048 /* JsxAttributes */); if (isPerformingCommonPropertyChecks && !hasCommonProperties(source2, target2, isComparingJsxAttributes)) { if (reportErrors2) { @@ -64117,7 +64164,7 @@ maybeSuppress = !!errorInfo; } } - if (source2.flags & 524288 /* Object */ && target2.flags & 134348796 /* Primitive */) { + if (source2.flags & 524288 /* Object */ && target2.flags & 402784252 /* Primitive */) { tryElaborateErrorsForPrimitivesAndObjects(source2, target2); } else if (source2.symbol && source2.flags & 524288 /* Object */ && globalObjectType === source2) { reportError(Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead); @@ -64224,8 +64271,8 @@ if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, (d) => d === objectLiteralDeclaration) && getSourceFileOfNode(objectLiteralDeclaration) === getSourceFileOfNode(errorNode)) { const propDeclaration = prop.valueDeclaration; Debug.assertNode(propDeclaration, isObjectLiteralElementLike); - errorNode = propDeclaration; const name = propDeclaration.name; + errorNode = name; if (isIdentifier(name)) { suggestion = getSuggestionForNonexistentProperty(name, errorTarget); } @@ -64263,15 +64310,15 @@ } function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) { if (source2.flags & 1048576 /* Union */) { - return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */), intersectionState); + return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState); } if (target2.flags & 1048576 /* Union */) { - return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source2), target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */) && !(target2.flags & 134348796 /* Primitive */)); + return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source2), target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */) && !(target2.flags & 402784252 /* Primitive */)); } if (target2.flags & 2097152 /* Intersection */) { return typeRelatedToEachType(source2, target2, reportErrors2, 2 /* Target */); } - if (relation === comparableRelation && target2.flags & 134348796 /* Primitive */) { + if (relation === comparableRelation && target2.flags & 402784252 /* Primitive */) { const constraints = sameMap(source2.types, (t) => t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(t) || unknownType : t); if (constraints !== source2.types) { source2 = getIntersectionType(constraints); @@ -65165,7 +65212,7 @@ } return 0 /* False */; } - const sourceIsPrimitive = !!(sourceFlags & 134348796 /* Primitive */); + const sourceIsPrimitive = !!(sourceFlags & 402784252 /* Primitive */); if (relation !== identityRelation) { source2 = getApparentType(source2); sourceFlags = source2.flags; @@ -65757,7 +65804,7 @@ const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 173 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 173 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 174 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 174 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString( signature, /*enclosingDeclaration*/ @@ -66457,7 +66504,7 @@ const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 208 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 209 /* PropertyAccessExpression */) { return void 0; } } @@ -66857,12 +66904,12 @@ } let diagnostic; switch (declaration.kind) { - case 223 /* BinaryExpression */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 224 /* BinaryExpression */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 166 /* Parameter */: + case 167 /* Parameter */: const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); @@ -66883,27 +66930,27 @@ } diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 326 /* JSDocSignature */: + case 327 /* JSDocSignature */: if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) { error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); } return; - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (noImplicitAny && !declaration.name) { if (wideningKind === 3 /* GeneratorYield */) { error(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); @@ -66914,7 +66961,7 @@ } diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; - case 197 /* MappedType */: + case 198 /* MappedType */: if (noImplicitAny) { error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } @@ -67012,7 +67059,7 @@ function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 171 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); + const contextualType = node.kind === 172 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -67064,8 +67111,8 @@ } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 262 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 308 /* SourceFile */ ? true : n.kind === 264 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 263 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 309 /* SourceFile */ ? true : n.kind === 265 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -67880,7 +67927,7 @@ function inferFromSignature(source, target) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 173 /* Constructor */; + bivariant = bivariant || kind === 172 /* MethodDeclaration */ || kind === 171 /* MethodSignature */ || kind === 174 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; applyToReturnTypes(source, target, inferFromTypes); @@ -67923,7 +67970,7 @@ } function hasPrimitiveConstraint(type) { const constraint = getConstraintOfTypeParameter(type); - return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 134348796 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); + return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); } function isObjectLiteralType2(type) { return !!(getObjectFlags(type) & 128 /* ObjectLiteral */); @@ -68037,7 +68084,7 @@ return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 301 /* ShorthandPropertyAssignment */) { return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer; } else { return Diagnostics.Cannot_find_name_0; @@ -68063,7 +68110,7 @@ function isInTypeQuery(node) { return !!findAncestor( node, - (n) => n.kind === 183 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 163 /* QualifiedName */ ? false : "quit" + (n) => n.kind === 184 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 164 /* QualifiedName */ ? false : "quit" ); } function isInAmbientOrTypeNode(node) { @@ -68076,61 +68123,61 @@ const symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? `${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}|${getSymbolId(symbol)}` : void 0; } - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 233 /* MetaProperty */: - return target.kind === 233 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 234 /* MetaProperty */: + return target.kind === 234 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - return isThisInTypeQuery(source) ? target.kind === 108 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); - case 108 /* ThisKeyword */: - return target.kind === 108 /* ThisKeyword */; - case 106 /* SuperKeyword */: - return target.kind === 106 /* SuperKeyword */; - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: + return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); + case 109 /* ThisKeyword */: + return target.kind === 109 /* ThisKeyword */; + case 107 /* SuperKeyword */: + return target.kind === 107 /* SuperKeyword */; + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const sourcePropertyName = getAccessedPropertyName(source); const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0; return sourcePropertyName !== void 0 && targetPropertyName !== void 0 && targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -68285,7 +68332,7 @@ } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 299 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 300 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -68300,7 +68347,7 @@ } } } - if (expression.expression.kind === 208 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 209 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -68405,7 +68452,7 @@ return 83886079 /* UnknownFacts */; } function getIntersectionTypeFacts(type) { - const ignoreObjects = maybeTypeOfKind(type, 134348796 /* Primitive */); + const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */); let oredFacts = 0 /* None */; let andedFacts = 134217727 /* All */; for (const t of type.types) { @@ -68473,11 +68520,11 @@ ) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 206 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 299 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 207 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 300 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 223 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 247 /* ForOfStatement */ && parent2.parent.initializer === parent2; + return parent2.parent.kind === 224 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 248 /* ForOfStatement */ && parent2.parent.initializer === parent2; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -68494,21 +68541,21 @@ function getAssignedType(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return stringType; - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return checkRightHandSideOfForOf(parent2) || errorType; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent2); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return undefinedType; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent2); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent2); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent2); } return errorType; @@ -68516,7 +68563,7 @@ function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 203 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 204 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); return getTypeWithDefault(type, node.initializer); } function getTypeOfInitializer(node) { @@ -68527,25 +68574,25 @@ if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 246 /* ForInStatement */) { + if (node.parent.parent.kind === 247 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 247 /* ForOfStatement */) { + if (node.parent.parent.kind === 248 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 257 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 258 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 257 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 205 /* BindingElement */ && node.parent.kind === 223 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 258 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 206 /* BindingElement */ && node.parent.kind === 224 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 75 /* BarBarEqualsToken */: @@ -68560,10 +68607,10 @@ } function getReferenceRoot(node) { const { parent: parent2 } = node; - return parent2.kind === 214 /* ParenthesizedExpression */ || parent2.kind === 223 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 223 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; + return parent2.kind === 215 /* ParenthesizedExpression */ || parent2.kind === 224 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 224 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -68579,12 +68626,12 @@ return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 292 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 293 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 292 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 293 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -68742,8 +68789,8 @@ function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 210 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 209 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 223 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 63 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); + const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 211 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isElementAssignment = parent2.kind === 210 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 224 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 63 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); return isLengthPushOrUnshift || isElementAssignment; } function isDeclarationWithExplicitTypeAnnotation(node) { @@ -68766,7 +68813,7 @@ if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName( statement.expression, @@ -68796,11 +68843,11 @@ case 79 /* Identifier */: const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node)); return getExplicitTypeOfSymbol(symbol, diagnostic); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return getExplicitThisType(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 208 /* PropertyAccessExpression */: { + case 209 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -68817,7 +68864,7 @@ } return void 0; } - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -68827,13 +68874,13 @@ let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 241 /* ExpressionStatement */) { + if (node.parent.kind === 242 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ void 0 ); - } else if (node.expression.kind !== 106 /* SuperKeyword */) { + } else if (node.expression.kind !== 107 /* SuperKeyword */) { if (isOptionalChain(node)) { funcType = checkNonNullType( getOptionalExpressionType(checkExpression(node.expression), node.expression), @@ -68881,7 +68928,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 95 /* FalseKeyword */ || node.kind === 223 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + return node.kind === 96 /* FalseKeyword */ || node.kind === 224 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { @@ -68970,7 +69017,7 @@ if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 128 /* SwitchClause */)) { flow = flow.antecedent; } else if (flags & 512 /* Call */) { - if (flow.node.expression.kind === 106 /* SuperKeyword */) { + if (flow.node.expression.kind === 107 /* SuperKeyword */) { return true; } flow = flow.antecedent; @@ -69006,8 +69053,8 @@ return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } break; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -69027,7 +69074,7 @@ const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode)); sharedFlowCount = sharedFlowStart; const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType); - if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 232 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 233 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -69096,7 +69143,7 @@ target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 208 /* PropertyAccessExpression */ && reference.kind !== 209 /* ElementAccessExpression */ && reference.kind !== 108 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 209 /* PropertyAccessExpression */ && reference.kind !== 210 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { flow = container.flowNode; continue; } @@ -69115,7 +69162,7 @@ } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -69145,13 +69192,13 @@ } if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 215 /* FunctionExpression */ || init.kind === 216 /* ArrowFunction */)) { + if (init && (init.kind === 216 /* FunctionExpression */ || init.kind === 217 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 246 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 247 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -69162,10 +69209,10 @@ /*excludeJSDocTypeAssertions*/ true ); - if (node.kind === 95 /* FalseKeyword */) { + if (node.kind === 96 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 223 /* BinaryExpression */) { + if (node.kind === 224 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -69205,13 +69252,13 @@ function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 210 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 211 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { const flowType = getTypeAtFlowNode(flow.antecedent); const type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { let evolvedType2 = type; - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -69248,7 +69295,7 @@ let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 218 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 219 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -69260,7 +69307,7 @@ flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 218 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 219 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -69523,10 +69570,10 @@ const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 218 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 219 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 218 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 219 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -69557,9 +69604,9 @@ return narrowTypeByConstructor(type, operator, left, assumeTrue); } break; - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return narrowTypeByInstanceof(type, expr, assumeTrue); - case 101 /* InKeyword */: + case 102 /* InKeyword */: if (isPrivateIdentifier(expr.left)) { return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue); } @@ -69668,7 +69715,7 @@ } if (assumeTrue) { if (!doubleEquals && (type.flags & 2 /* Unknown */ || someType(type, isEmptyAnonymousObjectType))) { - if (valueType.flags & (134348796 /* Primitive */ | 67108864 /* NonPrimitive */) || isEmptyAnonymousObjectType(valueType)) { + if (valueType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) || isEmptyAnonymousObjectType(valueType)) { return valueType; } if (valueType.flags & 524288 /* Object */) { @@ -69718,7 +69765,7 @@ let groundClauseTypes; for (let i = 0; i < clauseTypes.length; i += 1) { const t = clauseTypes[i]; - if (t.flags & (134348796 /* Primitive */ | 67108864 /* NonPrimitive */)) { + if (t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) { if (groundClauseTypes !== void 0) { groundClauseTypes.push(t); } @@ -69785,7 +69832,7 @@ if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 293 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 294 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -69960,19 +70007,19 @@ } } } - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: if (expr.operator === 53 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -70010,7 +70057,7 @@ return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 266 /* ModuleBlock */ || node2.kind === 309 /* SourceFile */ || node2.kind === 170 /* PropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -70061,12 +70108,12 @@ return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 166 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 167 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { const parent2 = node.parent; - return parent2.kind === 208 /* PropertyAccessExpression */ || parent2.kind === 163 /* QualifiedName */ || parent2.kind === 210 /* CallExpression */ && parent2.expression === node || parent2.kind === 209 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); + return parent2.kind === 209 /* PropertyAccessExpression */ || parent2.kind === 164 /* QualifiedName */ || parent2.kind === 211 /* CallExpression */ && parent2.expression === node || parent2.kind === 210 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); } function isGenericTypeWithUnionConstraint(type) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */)); @@ -70127,14 +70174,14 @@ if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent2 = declaration.parent.parent; - if (parent2.kind === 257 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 166 /* Parameter */) { + if (parent2.kind === 258 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 167 /* Parameter */) { const links = getNodeLinks(parent2); if (!(links.flags & 16777216 /* InCheckIdentifier */)) { links.flags |= 16777216 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); links.flags &= ~16777216 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 166 /* Parameter */ && isSymbolAssigned(symbol))) { + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 167 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference( pattern, @@ -70191,7 +70238,7 @@ } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 216 /* ArrowFunction */) { + if (container.kind === 217 /* ArrowFunction */) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (hasSyntacticModifier(container, 512 /* Async */)) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); @@ -70210,7 +70257,7 @@ } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 260 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { + if (declaration.kind === 261 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { let container = getContainingClass(node); while (container !== void 0) { if (container === declaration && container.name !== node) { @@ -70220,7 +70267,7 @@ } container = getContainingClass(container); } - } else if (declaration.kind === 228 /* ClassExpression */) { + } else if (declaration.kind === 229 /* ClassExpression */) { let container = getThisContainer( node, /*includeArrowFunctions*/ @@ -70228,7 +70275,7 @@ /*includeClassComputedPropertyName*/ false ); - while (container.kind !== 308 /* SourceFile */) { + while (container.kind !== 309 /* SourceFile */) { if (container.parent === declaration) { if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; @@ -70278,16 +70325,16 @@ return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 167 /* Parameter */; const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); const isModuleExports = symbol.flags & 134217728 /* ModuleExports */; - while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + while (flowContainer !== declarationContainer && (flowContainer.kind === 216 /* FunctionExpression */ || flowContainer.kind === 217 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } - const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; + const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 279 /* ExportSpecifier */) || node.parent.kind === 233 /* NonNullExpression */ || declaration.kind === 258 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type); const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer); if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) { @@ -70341,7 +70388,7 @@ )); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 295 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 296 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -70351,7 +70398,7 @@ if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 259 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -70370,7 +70417,7 @@ } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 259 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */; } @@ -70387,13 +70434,13 @@ } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 214 /* ParenthesizedExpression */) { + while (current.parent.kind === 215 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 221 /* PrefixUnaryExpression */ || current.parent.kind === 222 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 222 /* PrefixUnaryExpression */ || current.parent.kind === 223 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; } @@ -70404,7 +70451,7 @@ } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 169 /* PropertyDeclaration */ || container.kind === 173 /* Constructor */) { + if (container.kind === 170 /* PropertyDeclaration */ || container.kind === 174 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -70449,11 +70496,11 @@ ); let capturedByArrowFunction = false; let thisInComputedPropertyName = false; - if (container.kind === 173 /* Constructor */) { + if (container.kind === 174 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } while (true) { - if (container.kind === 216 /* ArrowFunction */) { + if (container.kind === 217 /* ArrowFunction */) { container = getThisContainer( container, /* includeArrowFunctions */ @@ -70462,7 +70509,7 @@ ); capturedByArrowFunction = true; } - if (container.kind === 164 /* ComputedPropertyName */) { + if (container.kind === 165 /* ComputedPropertyName */) { container = getThisContainer( container, !capturedByArrowFunction, @@ -70479,13 +70526,13 @@ error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); } else { switch (container.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 173 /* Constructor */: + case 174 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } @@ -70579,13 +70626,13 @@ } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 215 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 216 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 171 /* MethodDeclaration */ && container.parent.kind === 207 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 172 /* MethodDeclaration */ && container.parent.kind === 208 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 215 /* FunctionExpression */ && container.parent.kind === 299 /* PropertyAssignment */ && container.parent.parent.kind === 207 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 216 /* FunctionExpression */ && container.parent.kind === 300 /* PropertyAssignment */ && container.parent.parent.kind === 208 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 215 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { + } else if (container.kind === 216 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.parent.arguments[0].expression; } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.arguments[0].expression; @@ -70593,7 +70640,7 @@ } function getTypeForThisExpressionFromJSDoc(node) { const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 320 /* JSDocFunctionType */) { + if (jsdocType && jsdocType.kind === 321 /* JSDocFunctionType */) { const jsDocFunctionType = jsdocType; if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].name && jsDocFunctionType.parameters[0].name.escapedText === "this" /* This */) { return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); @@ -70605,10 +70652,10 @@ } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 166 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 167 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 210 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 211 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer( node, /*stopOnFunctions*/ @@ -70618,7 +70665,7 @@ let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 216 /* ArrowFunction */) { + while (container && container.kind === 217 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer( @@ -70633,19 +70680,19 @@ } let nodeCheckFlag = 0; if (!container || !isLegalUsageOfSuperExpression(container)) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 164 /* ComputedPropertyName */); - if (current && current.kind === 164 /* ComputedPropertyName */) { + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 165 /* ComputedPropertyName */); + if (current && current.kind === 165 /* ComputedPropertyName */) { error(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression2) { error(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 207 /* ObjectLiteralExpression */)) { + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 208 /* ObjectLiteralExpression */)) { error(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { error(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); } return errorType; } - if (!isCallExpression2 && immediateContainer.kind === 173 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 174 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if (isStatic(container) || isCallExpression2) { @@ -70661,7 +70708,7 @@ nodeCheckFlag = 16 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 171 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 172 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -70671,7 +70718,7 @@ if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 207 /* ObjectLiteralExpression */) { + if (container.parent.kind === 208 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { error(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return errorType; @@ -70689,20 +70736,20 @@ if (!baseClassType) { return errorType; } - if (container.kind === 173 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 174 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType); function isLegalUsageOfSuperExpression(container2) { if (isCallExpression2) { - return container2.kind === 173 /* Constructor */; + return container2.kind === 174 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 207 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 208 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 171 /* MethodDeclaration */ || container2.kind === 170 /* MethodSignature */ || container2.kind === 174 /* GetAccessor */ || container2.kind === 175 /* SetAccessor */ || container2.kind === 169 /* PropertyDeclaration */ || container2.kind === 172 /* ClassStaticBlockDeclaration */; + return container2.kind === 172 /* MethodDeclaration */ || container2.kind === 171 /* MethodSignature */ || container2.kind === 175 /* GetAccessor */ || container2.kind === 176 /* SetAccessor */ || container2.kind === 170 /* PropertyDeclaration */ || container2.kind === 173 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 171 /* MethodDeclaration */ || container2.kind === 170 /* MethodSignature */ || container2.kind === 174 /* GetAccessor */ || container2.kind === 175 /* SetAccessor */ || container2.kind === 169 /* PropertyDeclaration */ || container2.kind === 168 /* PropertySignature */ || container2.kind === 173 /* Constructor */; + return container2.kind === 172 /* MethodDeclaration */ || container2.kind === 171 /* MethodSignature */ || container2.kind === 175 /* GetAccessor */ || container2.kind === 176 /* SetAccessor */ || container2.kind === 170 /* PropertyDeclaration */ || container2.kind === 169 /* PropertySignature */ || container2.kind === 174 /* Constructor */; } } } @@ -70710,7 +70757,7 @@ } } function getContainingObjectLiteral(func) { - return (func.kind === 171 /* MethodDeclaration */ || func.kind === 174 /* GetAccessor */ || func.kind === 175 /* SetAccessor */) && func.parent.kind === 207 /* ObjectLiteralExpression */ ? func.parent : func.kind === 215 /* FunctionExpression */ && func.parent.kind === 299 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 172 /* MethodDeclaration */ || func.kind === 175 /* GetAccessor */ || func.kind === 176 /* SetAccessor */) && func.parent.kind === 208 /* ObjectLiteralExpression */ ? func.parent : func.kind === 216 /* FunctionExpression */ && func.parent.kind === 300 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -70721,7 +70768,7 @@ }); } function getContextualThisParameterType(func) { - if (func.kind === 216 /* ArrowFunction */) { + if (func.kind === 217 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -70749,7 +70796,7 @@ if (thisType) { return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } - if (literal.parent.kind !== 299 /* PropertyAssignment */) { + if (literal.parent.kind !== 300 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -70762,7 +70809,7 @@ return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 223 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 224 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -70817,11 +70864,11 @@ return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 166 /* Parameter */: + case 167 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -70830,10 +70877,10 @@ function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 205 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 206 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent2.name.kind === 204 /* ArrayBindingPattern */) { + if (parent2.name.kind === 205 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -70983,7 +71030,7 @@ return signature ? getOrCreateTypeFromSignature(signature) : void 0; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 212 /* TaggedTemplateExpression */) { + if (template.parent.kind === 213 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -71312,16 +71359,16 @@ case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: case 79 /* Identifier */: - case 155 /* UndefinedKeyword */: + case 156 /* UndefinedKeyword */: return true; - case 208 /* PropertyAccessExpression */: - case 214 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 215 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -71331,7 +71378,7 @@ contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 299 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 300 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -71351,7 +71398,7 @@ contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 288 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 289 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -71419,47 +71466,47 @@ } const { parent: parent2 } = node; switch (parent2.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 206 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 216 /* ArrowFunction */: - case 250 /* ReturnStatement */: + case 217 /* ArrowFunction */: + case 251 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return getContextualTypeForYieldOperand(parent2, contextFlags); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return getContextualTypeForArgument(parent2, node); - case 167 /* Decorator */: + case 168 /* Decorator */: return getContextualTypeForDecorator(parent2); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return isConstTypeReference(parent2.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(parent2.type); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return getContextualType2(parent2.parent, contextFlags); - case 206 /* ArrayLiteralExpression */: { + case 207 /* ArrayLiteralExpression */: { const arrayLiteral = parent2; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); const spreadIndex = (_b = (_a2 = getNodeLinks(arrayLiteral)).firstSpreadIndex) != null ? _b : _a2.firstSpreadIndex = findIndex(arrayLiteral.elements, isSpreadElement); const elementIndex = indexOfNode(arrayLiteral.elements, node); return getContextualTypeForElementExpression(type, spreadIndex < 0 || elementIndex < spreadIndex ? elementIndex : -1); } - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 236 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 225 /* TemplateExpression */); + case 237 /* TemplateSpan */: + Debug.assert(parent2.parent.kind === 226 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 214 /* ParenthesizedExpression */: { + case 215 /* ParenthesizedExpression */: { if (isInJSFile(parent2)) { if (isJSDocSatisfiesExpression(parent2)) { return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2)); @@ -71471,19 +71518,19 @@ } return getContextualType2(parent2, contextFlags); } - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return getContextualType2(parent2, contextFlags); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return getTypeFromTypeNode(parent2.type); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent2); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return getContextualTypeForJsxExpression(parent2, contextFlags); - case 288 /* JsxAttribute */: - case 290 /* JsxSpreadAttribute */: + case 289 /* JsxAttribute */: + case 291 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent2, contextFlags); } return void 0; @@ -71751,7 +71798,7 @@ return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -71802,7 +71849,7 @@ return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 205 /* BindingElement */ && !!node.initializer || node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; + return node.kind === 206 /* BindingElement */ && !!node.initializer || node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -71821,7 +71868,7 @@ let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 227 /* SpreadElement */) { + if (e.kind === 228 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -71845,7 +71892,7 @@ elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 229 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 230 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(undefinedOrMissingType); elementFlags.push(2 /* Optional */); @@ -71892,7 +71939,7 @@ } function isNumericName(name) { switch (name.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return isNumericComputedName(name); case 79 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -71909,7 +71956,7 @@ function checkComputedPropertyName(node) { const links = getNodeLinks(node.expression); if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 101 /* InKeyword */ && node.parent.kind !== 174 /* GetAccessor */ && node.parent.kind !== 175 /* SetAccessor */) { + if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 102 /* InKeyword */ && node.parent.kind !== 175 /* GetAccessor */ && node.parent.kind !== 176 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -71978,7 +72025,7 @@ /*contextFlags*/ void 0 ); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 203 /* ObjectBindingPattern */ || contextualType.pattern.kind === 207 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 204 /* ObjectBindingPattern */ || contextualType.pattern.kind === 208 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -71997,13 +72044,13 @@ let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfDeclaration(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 164 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 299 /* PropertyAssignment */ || memberDecl.kind === 300 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 299 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( + const computedNameType = memberDecl.name && memberDecl.name.kind === 165 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 300 /* PropertyAssignment */ || memberDecl.kind === 301 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 300 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. // we don't want to say "could not find 'a'". - memberDecl.kind === 300 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) + memberDecl.kind === 301 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) ); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); @@ -72021,7 +72068,7 @@ prop.links.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 299 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 300 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 300 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 301 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -72047,13 +72094,13 @@ prop.links.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 299 /* PropertyAssignment */ || memberDecl.kind === 171 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 300 /* PropertyAssignment */ || memberDecl.kind === 172 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 299 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 300 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } - } else if (memberDecl.kind === 301 /* SpreadAssignment */) { + } else if (memberDecl.kind === 302 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -72082,7 +72129,7 @@ } continue; } else { - Debug.assert(memberDecl.kind === 174 /* GetAccessor */ || memberDecl.kind === 175 /* SetAccessor */); + Debug.assert(memberDecl.kind === 175 /* GetAccessor */ || memberDecl.kind === 176 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -72107,13 +72154,13 @@ if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 257 /* VariableDeclaration */ || n.kind === 223 /* BinaryExpression */ || n.kind === 166 /* Parameter */ + (n) => n.kind === 258 /* VariableDeclaration */ || n.kind === 224 /* BinaryExpression */ || n.kind === 167 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 301 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 302 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 301 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 302 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { @@ -72242,7 +72289,7 @@ } } } else { - Debug.assert(attributeDecl.kind === 290 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 291 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType( spread, @@ -72288,7 +72335,7 @@ ); } } - const parent2 = openingLikeElement.parent.kind === 281 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent2 = openingLikeElement.parent.kind === 282 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { @@ -72347,7 +72394,7 @@ if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 291 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 292 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -72699,7 +72746,7 @@ } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 163 /* QualifiedName */ ? node.right : node.kind === 202 /* ImportType */ ? node : node.kind === 205 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 164 /* QualifiedName */ ? node.right : node.kind === 203 /* ImportType */ ? node : node.kind === 206 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -72834,7 +72881,7 @@ } function reportObjectPossiblyNullOrUndefinedError(node, facts) { const nodeText2 = isEntityNameExpression(node) ? entityNameToString(node) : void 0; - if (node.kind === 104 /* NullKeyword */) { + if (node.kind === 105 /* NullKeyword */) { error(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); return; } @@ -72902,8 +72949,8 @@ } return nonNullType; } - function checkPropertyAccessExpression(node, checkMode) { - return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode); + function checkPropertyAccessExpression(node, checkMode, writeOnly) { + return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); } function checkPropertyAccessChain(node, checkMode) { const leftType = checkExpression(node.expression); @@ -72915,7 +72962,7 @@ return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 214 /* ParenthesizedExpression */) { + while (node.parent.kind === 215 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; @@ -72938,7 +72985,7 @@ if (!isExpressionNode(privId)) { return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression); } - const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 101 /* InKeyword */; + const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 102 /* InKeyword */; if (!getSymbolForPrivateIdentifierExpression(privId) && !isInOperation) { return grammarErrorOnNode(privId, Diagnostics.Cannot_find_name_0, idText(privId)); } @@ -73034,7 +73081,7 @@ false ) === getDeclaringConstructor(prop); } - function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode) { + function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode, writeOnly) { const parentSymbol = getNodeLinks(left).resolvedSymbol; const assignmentKind = getAssignmentTargetKind(node); const apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); @@ -73084,10 +73131,10 @@ /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ - node.kind === 163 /* QualifiedName */ + node.kind === 164 /* QualifiedName */ ); } - if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 302 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 303 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -73133,13 +73180,12 @@ checkPropertyNotUsedBeforeDeclaration(prop, node, right); markPropertyAsReferenced(prop, node, isSelfTypeAccess(left, parentSymbol)); getNodeLinks(node).resolvedSymbol = prop; - const writing = isWriteAccess(node); - checkPropertyAccessibility(node, left.kind === 106 /* SuperKeyword */, writing, apparentType, prop); + checkPropertyAccessibility(node, left.kind === 107 /* SuperKeyword */, isWriteAccess(node), apparentType, prop); if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) { error(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); return errorType; } - propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writing ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); + propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writeOnly || isWriteOnlyAccess(node) ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); } return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode); } @@ -73148,7 +73194,7 @@ if (file) { if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) { const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode); - return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */); + return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */); } } return false; @@ -73166,12 +73212,12 @@ } propType = getNarrowableTypeForReference(propType, node, checkMode); let assumeUninitialized = false; - if (strictNullChecks && strictPropertyInitialization && isAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */) { + if (strictNullChecks && strictPropertyInitialization && isAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */) { const declaration = prop && prop.valueDeclaration; if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 173 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 174 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { assumeUninitialized = true; } } @@ -73195,7 +73241,7 @@ const declarationName = idText(right); if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlags(valueDeclaration) & 32 /* Static */) && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); - } else if (valueDeclaration.kind === 260 /* ClassDeclaration */ && node.parent.kind !== 180 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + } else if (valueDeclaration.kind === 261 /* ClassDeclaration */ && node.parent.kind !== 181 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { @@ -73208,25 +73254,25 @@ function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return true; - case 299 /* PropertyAssignment */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 301 /* SpreadAssignment */: - case 164 /* ComputedPropertyName */: - case 236 /* TemplateSpan */: - case 291 /* JsxExpression */: - case 288 /* JsxAttribute */: - case 289 /* JsxAttributes */: - case 290 /* JsxSpreadAttribute */: - case 283 /* JsxOpeningElement */: - case 230 /* ExpressionWithTypeArguments */: - case 294 /* HeritageClause */: + case 300 /* PropertyAssignment */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 302 /* SpreadAssignment */: + case 165 /* ComputedPropertyName */: + case 237 /* TemplateSpan */: + case 292 /* JsxExpression */: + case 289 /* JsxAttribute */: + case 290 /* JsxAttributes */: + case 291 /* JsxSpreadAttribute */: + case 284 /* JsxOpeningElement */: + case 231 /* ExpressionWithTypeArguments */: + case 295 /* HeritageClause */: return false; - case 216 /* ArrowFunction */: - case 241 /* ExpressionStatement */: + case 217 /* ArrowFunction */: + case 242 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -73259,7 +73305,7 @@ function reportNonexistentProperty(propNode, containingType, isUncheckedJS) { let errorInfo; let relatedInfo; - if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 134348796 /* Primitive */)) { + if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) { for (const subtype of containingType.types) { if (!getPropertyOfType(subtype, propNode.escapedText) && !getApplicableIndexInfoForName(subtype, propNode.escapedText)) { errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(subtype)); @@ -73467,13 +73513,13 @@ (getCheckFlags(prop) & 1 /* Instantiated */ ? getSymbolLinks(prop).target : prop).isReferenced = 67108863 /* All */; } function isSelfTypeAccess(name, parent2) { - return name.kind === 108 /* ThisKeyword */ || !!parent2 && isEntityNameExpression(name) && parent2 === getResolvedSymbol(getFirstIdentifier(name)); + return name.kind === 109 /* ThisKeyword */ || !!parent2 && isEntityNameExpression(name) && parent2 === getResolvedSymbol(getFirstIdentifier(name)); } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: - return isValidPropertyAccessWithType(node, node.expression.kind === 106 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + return isValidPropertyAccessWithType(node, node.expression.kind === 107 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); + case 164 /* QualifiedName */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -73481,7 +73527,7 @@ propertyName, getWidenedType(checkExpression(node.left)) ); - case 202 /* ImportType */: + case 203 /* ImportType */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -73494,7 +73540,7 @@ function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 208 /* PropertyAccessExpression */ && node.expression.kind === 106 /* SuperKeyword */, + node.kind === 209 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, /* isWrite */ false, type, @@ -73527,7 +73573,7 @@ } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 258 /* VariableDeclarationList */) { + if (initializer.kind === 259 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfDeclaration(variable); @@ -73548,7 +73594,7 @@ let child = expr; let node = expr.parent; while (node) { - if (node.kind === 246 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 247 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -73589,11 +73635,11 @@ if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 167 /* Decorator */) { + } else if (node.kind !== 168 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -73638,7 +73684,7 @@ } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 227 /* SpreadElement */ || arg.kind === 234 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 228 /* SpreadElement */ || arg.kind === 235 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -73654,9 +73700,9 @@ let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 225 /* TemplateExpression */) { + if (node.template.kind === 226 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -73664,7 +73710,7 @@ Debug.assert(templateLiteral.kind === 14 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 167 /* Decorator */) { + } else if (node.kind === 168 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -73675,7 +73721,7 @@ effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 211 /* NewExpression */); + Debug.assert(node.kind === 212 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -73771,7 +73817,7 @@ if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 167 /* Decorator */) { + if (node.kind !== 168 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -73808,7 +73854,7 @@ } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 229 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 230 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -73836,11 +73882,11 @@ if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); + const spreadType = arg.kind === 235 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); if (isArrayLikeType(spreadType)) { return getMutableArrayOrTupleType(spreadType); } - return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg), inConstContext); + return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 228 /* SpreadElement */ ? arg.expression : arg), inConstContext); } } const types = []; @@ -73849,22 +73895,22 @@ for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 235 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 228 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { const contextualType = getIndexedAccessType(restType, getNumberLiteralType(i - index), 256 /* Contextual */); const argType = checkExpressionWithContextualType(arg, contextualType, context, checkMode); - const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 134348796 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); + const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 234 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 235 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -74041,7 +74087,7 @@ const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 229 /* OmittedExpression */) { + if (arg.kind !== 230 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType( arg, @@ -74099,7 +74145,7 @@ } } function getThisArgumentOfCall(node) { - const expression = node.kind === 210 /* CallExpression */ ? node.expression : node.kind === 212 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 211 /* CallExpression */ ? node.expression : node.kind === 213 /* TaggedTemplateExpression */ ? node.tag : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -74114,17 +74160,17 @@ return result; } function getEffectiveCallArguments(node) { - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 225 /* TemplateExpression */) { + if (template.kind === 226 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 167 /* Decorator */) { + if (node.kind === 168 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -74136,7 +74182,7 @@ const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 227 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 228 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getTypeArguments(spreadType), (t, i2) => { var _a2; @@ -74175,16 +74221,16 @@ } function getLegacyDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return 1; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 166 /* Parameter */: + case 167 /* Parameter */: return 3; default: return Debug.fail(); @@ -74391,14 +74437,14 @@ return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) { - const isTaggedTemplate = node.kind === 212 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 167 /* Decorator */; + const isTaggedTemplate = node.kind === 213 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 168 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; if (!isDecorator2 && !isSuperCall(node)) { typeArguments = node.typeArguments; - if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 106 /* SuperKeyword */) { + if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 107 /* SuperKeyword */) { forEach(typeArguments, checkSourceElement); } } @@ -74418,7 +74464,7 @@ let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 210 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 211 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -74769,7 +74815,7 @@ return maxParamsIndex; } function resolveCallExpression(node, candidatesOutArray, checkMode) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { const superType = checkSuperExpression(node.expression); if (isTypeAny(superType)) { for (const arg of node.arguments) { @@ -74946,7 +74992,7 @@ } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 173 /* Constructor */) { + if (!modifiers || declaration.kind !== 174 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -75093,16 +75139,16 @@ } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 166 /* Parameter */: + case 167 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; default: return Debug.fail(); @@ -75164,7 +75210,7 @@ returnNode, /*typeArguments*/ void 0 - ) : factory.createKeywordTypeNode(131 /* AnyKeyword */) + ) : factory.createKeywordTypeNode(132 /* AnyKeyword */) ); const parameterSymbol = createSymbol(1 /* FunctionScopedVariable */, "props"); parameterSymbol.links.type = result; @@ -75225,16 +75271,16 @@ } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 167 /* Decorator */: + case 168 /* Decorator */: return resolveDecorator(node, candidatesOutArray, checkMode); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } throw Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); @@ -75344,7 +75390,7 @@ return false; } let parent2 = node.parent; - while (parent2 && parent2.kind === 208 /* PropertyAccessExpression */) { + while (parent2 && parent2.kind === 209 /* PropertyAccessExpression */) { parent2 = parent2.parent; } if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 63 /* EqualsToken */) { @@ -75365,12 +75411,12 @@ return silentNeverType; } checkDeprecatedSignature(signature, node); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return voidType; } - if (node.kind === 211 /* NewExpression */) { + if (node.kind === 212 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 173 /* Constructor */ && declaration.kind !== 177 /* ConstructSignature */ && declaration.kind !== 182 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a2 = getJSDocRoot(declaration)) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 173 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 174 /* Constructor */ && declaration.kind !== 178 /* ConstructSignature */ && declaration.kind !== 183 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a2 = getJSDocRoot(declaration)) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 174 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -75384,7 +75430,7 @@ if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 210 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 241 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 211 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 242 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { if (!isDottedName(node.expression)) { error(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); } else if (!getEffectsSignature(node)) { @@ -75416,20 +75462,20 @@ function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 210 /* CallExpression */: - case 167 /* Decorator */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 168 /* Decorator */: + case 212 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return node.argumentExpression; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.name; - case 180 /* TypeReference */: + case 181 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -75589,7 +75635,7 @@ if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 259 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 257 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 260 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 258 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); return !!decl && !!(decl.flags & 16777216 /* Ambient */); @@ -75607,7 +75653,7 @@ return getReturnTypeOfSignature(signature); } function checkAssertion(node) { - if (node.kind === 213 /* TypeAssertionExpression */) { + if (node.kind === 214 /* TypeAssertionExpression */) { const file = getSourceFileOfNode(node); if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) { grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); @@ -75621,20 +75667,20 @@ case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 225 /* TemplateExpression */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 226 /* TemplateExpression */: return true; - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const op = node.operator; const arg = node.operand; return op === 40 /* MinusToken */ && (arg.kind === 8 /* NumericLiteral */ || arg.kind === 9 /* BigIntLiteral */) || op === 39 /* PlusToken */ && arg.kind === 8 /* NumericLiteral */; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = skipParentheses(node.expression); const symbol = isEntityNameExpression(expr) ? resolveEntityName( expr, @@ -75683,7 +75729,7 @@ function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); forEach(node.typeArguments, checkSourceElement); - const exprType = node.kind === 230 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 231 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); return getInstantiationExpressionType(exprType, node); } function getInstantiationExpressionType(exprType, node) { @@ -75765,19 +75811,19 @@ } function checkMetaProperty(node) { checkGrammarMetaProperty(node); - if (node.keywordToken === 103 /* NewKeyword */) { + if (node.keywordToken === 104 /* NewKeyword */) { return checkNewTargetMetaProperty(node); } - if (node.keywordToken === 100 /* ImportKeyword */) { + if (node.keywordToken === 101 /* ImportKeyword */) { return checkImportMetaProperty(node); } return Debug.assertNever(node.keywordToken); } function checkMetaPropertyKeyword(node) { switch (node.keywordToken) { - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return getGlobalImportMetaExpressionType(); - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: const type = checkNewTargetMetaProperty(node); return isErrorType(type) ? errorType : createNewTargetExpressionType(type); default: @@ -75789,7 +75835,7 @@ if (!container) { error(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return errorType; - } else if (container.kind === 173 /* Constructor */) { + } else if (container.kind === 174 /* Constructor */) { const symbol = getSymbolOfDeclaration(container.parent); return getTypeOfSymbol(symbol); } else { @@ -75839,7 +75885,7 @@ } function getParameterIdentifierNameAtPosition(signature, pos) { var _a2; - if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 320 /* JSDocFunctionType */) { + if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 321 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -75871,7 +75917,7 @@ return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); } function isValidDeclarationForTupleLabel(d) { - return d.kind === 199 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 200 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -76207,17 +76253,17 @@ if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const contextType = createClassDecoratorContextType(targetType); links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType); break; } - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -76229,7 +76275,7 @@ links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); break; } - case 169 /* PropertyDeclaration */: { + case 170 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -76251,8 +76297,8 @@ if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const targetParam = createParameter("target", targetType); @@ -76266,7 +76312,7 @@ ); break; } - case 166 /* Parameter */: { + case 167 /* Parameter */: { const node = parent2; if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { break; @@ -76292,10 +76338,10 @@ ); break; } - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: { + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -76390,7 +76436,7 @@ let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 238 /* Block */) { + if (func.body.kind !== 239 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType( @@ -76564,7 +76610,7 @@ return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 218 /* TypeOfExpression */) { + if (node.expression.kind === 219 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -76625,11 +76671,11 @@ } function mayReturnNever(func) { switch (func.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; - case 171 /* MethodDeclaration */: - return func.parent.kind === 207 /* ObjectLiteralExpression */; + case 172 /* MethodDeclaration */: + return func.parent.kind === 208 /* ObjectLiteralExpression */; default: return false; } @@ -76643,7 +76689,7 @@ if (type && maybeTypeOfKind(type, 1 /* Any */ | 16384 /* Void */)) { return; } - if (func.kind === 170 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 238 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 171 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 239 /* Block */ || !functionHasImplicitReturn(func)) { return; } const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; @@ -76669,7 +76715,7 @@ } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -76702,7 +76748,7 @@ return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 215 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 216 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -76746,7 +76792,7 @@ } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -76754,7 +76800,7 @@ if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 238 /* Block */) { + if (node.body.kind === 239 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -76824,9 +76870,9 @@ return false; } if (isReadonlySymbol(symbol)) { - if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 108 /* ThisKeyword */) { + if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 109 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 173 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 174 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -76847,7 +76893,7 @@ const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 271 /* NamespaceImport */; + return !!declaration && declaration.kind === 272 /* NamespaceImport */; } } } @@ -76952,7 +76998,7 @@ if (!hasParseDiagnostics(sourceFile)) { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); - if (container && container.kind !== 173 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + if (container && container.kind !== 174 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } @@ -77110,7 +77156,7 @@ if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } - if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 134348796 /* Primitive */)) { + if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { error(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { @@ -77161,7 +77207,7 @@ function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 299 /* PropertyAssignment */ || property.kind === 300 /* ShorthandPropertyAssignment */) { + if (property.kind === 300 /* PropertyAssignment */ || property.kind === 301 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -77182,8 +77228,8 @@ } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 300 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 301 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 301 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 302 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { @@ -77215,7 +77261,7 @@ let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 227 /* SpreadElement */) { + if (node.elements[i].kind === 228 /* SpreadElement */) { type = inBoundsType = inBoundsType != null ? inBoundsType : checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType; } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -77225,8 +77271,8 @@ function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 229 /* OmittedExpression */) { - if (element.kind !== 227 /* SpreadElement */) { + if (element.kind !== 230 /* OmittedExpression */) { + if (element.kind !== 228 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -77241,7 +77287,7 @@ error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 223 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { + if (restExpression.kind === 224 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { error(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); } else { checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); @@ -77254,7 +77300,7 @@ } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 300 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 301 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -77266,25 +77312,25 @@ } else { target = exprOrAssignment; } - if (target.kind === 223 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { + if (target.kind === 224 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 207 /* ObjectLiteralExpression */) { + if (target.kind === 208 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 206 /* ArrayLiteralExpression */) { + if (target.kind === 207 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { const targetType = checkExpression(target, checkMode); - const error2 = target.parent.kind === 301 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; - const optionalError = target.parent.kind === 301 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + const error2 = target.parent.kind === 302 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; + const optionalError = target.parent.kind === 302 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; if (checkReferenceExpression(target, error2, optionalError)) { checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target); } @@ -77299,34 +77345,34 @@ case 79 /* Identifier */: case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: - case 212 /* TaggedTemplateExpression */: - case 225 /* TemplateExpression */: + case 213 /* TaggedTemplateExpression */: + case 226 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: - case 155 /* UndefinedKeyword */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 218 /* TypeOfExpression */: - case 232 /* NonNullExpression */: - case 282 /* JsxSelfClosingElement */: - case 281 /* JsxElement */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 156 /* UndefinedKeyword */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 219 /* TypeOfExpression */: + case 233 /* NonNullExpression */: + case 283 /* JsxSelfClosingElement */: + case 282 /* JsxElement */: return true; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: switch (node.operator) { case 53 /* ExclamationToken */: case 39 /* PlusToken */: @@ -77335,9 +77381,9 @@ return true; } return false; - case 219 /* VoidExpression */: - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 220 /* VoidExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: default: return false; } @@ -77381,9 +77427,9 @@ } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (node.left.kind === 207 /* ObjectLiteralExpression */ || node.left.kind === 206 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (node.left.kind === 208 /* ObjectLiteralExpression */ || node.left.kind === 207 /* ArrayLiteralExpression */)) { state.skip = true; - setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 108 /* ThisKeyword */)); + setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 109 /* ThisKeyword */)); return state; } return state; @@ -77406,7 +77452,7 @@ const operator = operatorToken.kind; if (isLogicalOrCoalescingBinaryOperator(operator)) { let parent2 = node.parent; - while (parent2.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { + while (parent2.kind === 215 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { parent2 = parent2.parent; } if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) { @@ -77482,8 +77528,8 @@ } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (left.kind === 207 /* ObjectLiteralExpression */ || left.kind === 206 /* ArrayLiteralExpression */)) { - return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */); + if (operator === 63 /* EqualsToken */ && (left.kind === 208 /* ObjectLiteralExpression */ || left.kind === 207 /* ArrayLiteralExpression */)) { + return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 109 /* ThisKeyword */); } let leftType; if (isLogicalOrCoalescingBinaryOperator(operator)) { @@ -77658,9 +77704,9 @@ checkNaNEquality(errorNode, operator, left, right); reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); return booleanType; - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return checkInExpression(left, right, leftType, rightType); case 55 /* AmpersandAmpersandToken */: case 76 /* AmpersandAmpersandEqualsToken */: { @@ -77742,7 +77788,7 @@ } } function isIndirectCall(node) { - return node.parent.kind === 214 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 212 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + return node.parent.kind === 215 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 213 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval"); } function checkForDisallowedESSymbolOperand(operator2) { @@ -77773,6 +77819,16 @@ addLazyDiagnostic(checkAssignmentOperatorWorker); } function checkAssignmentOperatorWorker() { + let assigneeType = leftType; + if (isCompoundAssignment(operatorToken.kind) && left.kind === 209 /* PropertyAccessExpression */) { + assigneeType = checkPropertyAccessExpression( + left, + /*checkMode*/ + void 0, + /*writeOnly*/ + true + ); + } if (checkReferenceExpression( left, Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, @@ -77785,7 +77841,7 @@ headMessage = Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target; } } - checkTypeAssignableToAndOptionallyElaborate(valueType, leftType, left, right, headMessage); + checkTypeAssignableToAndOptionallyElaborate(valueType, assigneeType, left, right, headMessage); } } } @@ -77862,7 +77918,7 @@ const err = error( errorNode2, Diagnostics.This_condition_will_always_return_0, - tokenToString(operator2 === 36 /* EqualsEqualsEqualsToken */ || operator2 === 34 /* EqualsEqualsToken */ ? 95 /* FalseKeyword */ : 110 /* TrueKeyword */) + tokenToString(operator2 === 36 /* EqualsEqualsEqualsToken */ || operator2 === 34 /* EqualsEqualsToken */ ? 96 /* FalseKeyword */ : 111 /* TrueKeyword */) ); if (isLeftNaN && isRightNaN) return; @@ -78037,7 +78093,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 213 /* TypeAssertionExpression */ || node.kind === 231 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 214 /* TypeAssertionExpression */ || node.kind === 232 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); @@ -78054,7 +78110,7 @@ void 0, checkMode || 0 /* Normal */ ) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 204 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 205 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; } function padTupleType(type, pattern) { const patternElements = pattern.elements; @@ -78062,7 +78118,7 @@ const elementFlags = type.target.elementFlags.slice(); for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) { const e = patternElements[i]; - if (i < patternElements.length - 1 || !(e.kind === 205 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 206 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement( e, /*includePatternInType*/ @@ -78127,14 +78183,14 @@ )); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -78322,7 +78378,7 @@ const type = getQuickTypeOfExpression(expr.expression); return type ? getAwaitedType(type) : void 0; } - if (isCallExpression(expr) && expr.expression.kind !== 106 /* SuperKeyword */ && !isRequireCall( + if (isCallExpression(expr) && expr.expression.kind !== 107 /* SuperKeyword */ && !isRequireCall( expr, /*checkArgumentIsStringLiteralLike*/ true @@ -78366,7 +78422,7 @@ return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 209 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 163 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 183 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 278 /* ExportSpecifier */; + const ok = node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 210 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 164 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 184 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 279 /* ExportSpecifier */; if (!ok) { error(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -78394,9 +78450,9 @@ const kind = node.kind; if (cancellationToken) { switch (kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -78405,15 +78461,15 @@ return checkIdentifier(node, checkMode); case 80 /* PrivateIdentifier */: return checkPrivateIdentifierExpression(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return checkThisExpression(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return nullWideningType; case 14 /* NoSubstitutionTemplateLiteral */: case 10 /* StringLiteral */: - return getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? anyType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 8 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -78423,85 +78479,85 @@ negative: false, base10Value: parsePseudoBigInt(node.text) })); - case 110 /* TrueKeyword */: + case 111 /* TrueKeyword */: return trueType; - case 95 /* FalseKeyword */: + case 96 /* FalseKeyword */: return falseType; - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return checkTemplateExpression(node); case 13 /* RegularExpressionLiteral */: return globalRegExpType; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 210 /* CallExpression */: - if (node.expression.kind === 100 /* ImportKeyword */) { + case 211 /* CallExpression */: + if (node.expression.kind === 101 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 211 /* NewExpression */: + case 212 /* NewExpression */: return checkCallExpression(node, checkMode); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return checkClassExpression(node); - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return checkAssertion(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return checkNonNullAssertion(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return checkMetaProperty(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return checkDeleteExpression(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return checkVoidExpression(node); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return checkAwaitExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 229 /* OmittedExpression */: + case 230 /* OmittedExpression */: return undefinedWideningType; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return checkYieldExpression(node); - case 234 /* SyntheticExpression */: + case 235 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return checkJsxElement(node, checkMode); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return checkJsxFragment(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -78553,10 +78609,10 @@ checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 173 /* Constructor */ && nodeIsPresent(func.body))) { + if (!(func.kind === 174 /* Constructor */ && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 173 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 174 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } @@ -78567,13 +78623,13 @@ if (func.parameters.indexOf(node) !== 0) { error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 173 /* Constructor */ || func.kind === 177 /* ConstructSignature */ || func.kind === 182 /* ConstructorType */) { + if (func.kind === 174 /* Constructor */ || func.kind === 178 /* ConstructSignature */ || func.kind === 183 /* ConstructorType */) { error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 216 /* ArrowFunction */) { + if (func.kind === 217 /* ArrowFunction */) { error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 174 /* GetAccessor */ || func.kind === 175 /* SetAccessor */) { + if (func.kind === 175 /* GetAccessor */ || func.kind === 176 /* SetAccessor */) { error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } @@ -78633,13 +78689,13 @@ } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 216 /* ArrowFunction */: - case 176 /* CallSignature */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 217 /* ArrowFunction */: + case 177 /* CallSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: const parent2 = node.parent; if (node === parent2.type) { return parent2; @@ -78659,7 +78715,7 @@ predicateVariableName ); return true; - } else if (name.kind === 204 /* ArrayBindingPattern */ || name.kind === 203 /* ObjectBindingPattern */) { + } else if (name.kind === 205 /* ArrayBindingPattern */ || name.kind === 204 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -78671,9 +78727,9 @@ } } function checkSignatureDeclaration(node) { - if (node.kind === 178 /* IndexSignature */) { + if (node.kind === 179 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 181 /* FunctionType */ || node.kind === 259 /* FunctionDeclaration */ || node.kind === 182 /* ConstructorType */ || node.kind === 176 /* CallSignature */ || node.kind === 173 /* Constructor */ || node.kind === 177 /* ConstructSignature */) { + } else if (node.kind === 182 /* FunctionType */ || node.kind === 260 /* FunctionDeclaration */ || node.kind === 183 /* ConstructorType */ || node.kind === 177 /* CallSignature */ || node.kind === 174 /* Constructor */ || node.kind === 178 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -78700,10 +78756,10 @@ const returnTypeNode = getEffectiveReturnTypeNode(node); if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -78725,7 +78781,7 @@ checkAsyncFunctionReturnType(node, returnTypeNode); } } - if (node.kind !== 178 /* IndexSignature */ && node.kind !== 320 /* JSDocFunctionType */) { + if (node.kind !== 179 /* IndexSignature */ && node.kind !== 321 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -78735,7 +78791,7 @@ const staticNames = /* @__PURE__ */ new Map(); const privateIdentifiers = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 173 /* Constructor */) { + if (member.kind === 174 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -78753,16 +78809,16 @@ const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -78815,7 +78871,7 @@ function checkObjectTypeForDuplicateDeclarations(node) { const names = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 168 /* PropertySignature */) { + if (member.kind === 169 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -78839,7 +78895,7 @@ } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 261 /* InterfaceDeclaration */) { + if (node.kind === 262 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfDeclaration(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -78874,7 +78930,7 @@ checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 169 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 170 /* PropertyDeclaration */ && node.initializer) { error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } @@ -78891,7 +78947,7 @@ error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* MethodDeclaration */ && node.body) { error(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { @@ -78936,7 +78992,7 @@ if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 169 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 170 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -78979,7 +79035,7 @@ return isExpressionStatement(superCallParent) && superCallParent.parent === body; } function nodeImmediatelyReferencesSuperOrThis(node) { - if (node.kind === 106 /* SuperKeyword */ || node.kind === 108 /* ThisKeyword */) { + if (node.kind === 107 /* SuperKeyword */ || node.kind === 109 /* ThisKeyword */) { return true; } if (isThisContainerOrFunctionBlock(node)) { @@ -78988,7 +79044,7 @@ return !!forEachChild(node, nodeImmediatelyReferencesSuperOrThis); } function checkAccessorDeclaration(node) { - if (isIdentifier(node.name) && idText(node.name) === "constructor") { + if (isIdentifier(node.name) && idText(node.name) === "constructor" && isClassLike(node.parent)) { error(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); } addLazyDiagnostic(checkAccessorDeclarationDiagnostics); @@ -78999,20 +79055,20 @@ checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { if (!(node.flags & 16777216 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 256 /* HasImplicitReturn */) { if (!(node.flags & 512 /* HasExplicitReturn */)) { error(node.name, Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfDeclaration(node); - const getter = getDeclarationOfKind(symbol, 174 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 175 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 175 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 176 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); @@ -79033,7 +79089,7 @@ } } const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node)); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -79094,7 +79150,7 @@ } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 180 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { + if (node.kind === 181 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { const sourceFile = getSourceFileOfNode(node); if (scanTokenAtPosition(sourceFile, node.typeName.end) === 24 /* DotToken */) { grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); @@ -79158,7 +79214,7 @@ let seenRestElement = false; const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 199 /* NamedTupleMember */ && hasNamedElement) { + if (e.kind !== 200 /* NamedTupleMember */ && hasNamedElement) { grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); break; } @@ -79207,7 +79263,7 @@ /*stringsOnly*/ false ))) { - if (accessNode.kind === 209 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + if (accessNode.kind === 210 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } return type; @@ -79268,7 +79324,7 @@ forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 191 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 192 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -79278,7 +79334,7 @@ if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 165 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 166 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { @@ -79316,10 +79372,10 @@ if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 187 /* OptionalType */) { + if (node.type.kind === 188 /* OptionalType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type); } - if (node.type.kind === 188 /* RestType */) { + if (node.type.kind === 189 /* RestType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type); } checkSourceElement(node.type); @@ -79330,7 +79386,7 @@ } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 261 /* InterfaceDeclaration */ && n.parent.kind !== 260 /* ClassDeclaration */ && n.parent.kind !== 228 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { + if (n.parent.kind !== 262 /* InterfaceDeclaration */ && n.parent.kind !== 261 /* ClassDeclaration */ && n.parent.kind !== 229 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } @@ -79407,7 +79463,7 @@ // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) || // Both are literal property names that are the same. isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); if (reportError) { const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; error(errorNode2, diagnostic); @@ -79439,14 +79495,14 @@ for (const current of declarations) { const node = current; const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 261 /* InterfaceDeclaration */ || node.parent.kind === 184 /* TypeLiteral */) || inAmbientContext; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 262 /* InterfaceDeclaration */ || node.parent.kind === 185 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 259 /* FunctionDeclaration */ || node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */ || node.kind === 173 /* Constructor */) { + if (node.kind === 260 /* FunctionDeclaration */ || node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */ || node.kind === 174 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -79499,9 +79555,9 @@ }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 260 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 261 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 260 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 259 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 261 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 260 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; if (diagnostic) { addRelatedInfo( error(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), @@ -79581,45 +79637,45 @@ function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return 2 /* ExportType */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 274 /* ExportAssignment */: - case 223 /* BinaryExpression */: + case 275 /* ExportAssignment */: + case 224 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 268 /* ImportEqualsDeclaration */: - case 271 /* NamespaceImport */: - case 270 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 272 /* NamespaceImport */: + case 271 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfDeclaration(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: - case 259 /* FunctionDeclaration */: - case 273 /* ImportSpecifier */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 260 /* FunctionDeclaration */: + case 274 /* ImportSpecifier */: case 79 /* Identifier */: return 1 /* ExportValue */; - case 170 /* MethodSignature */: - case 168 /* PropertySignature */: + case 171 /* MethodSignature */: + case 169 /* PropertySignature */: return 2 /* ExportType */; default: return Debug.failBadSyntaxKind(d); @@ -79644,7 +79700,7 @@ ))) { return typeAsPromise.promisedTypeOfPromise = getTypeArguments(type)[0]; } - if (allTypesAssignableToKind(getBaseConstraintOrType(type), 134348796 /* Primitive */ | 131072 /* Never */)) { + if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) { return void 0; } const thenFunction = getTypeOfPropertyOfType(type, "then"); @@ -79696,7 +79752,7 @@ return awaitedType || errorType; } function isThenableType(type) { - if (allTypesAssignableToKind(getBaseConstraintOrType(type), 134348796 /* Primitive */ | 131072 /* Never */)) { + if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) { return false; } const thenFunction = getTypeOfPropertyOfType(type, "then"); @@ -79906,21 +79962,21 @@ let headMessage; const expectedReturnType = decoratorSignature.resolvedReturnType; switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!legacyDecorators) { headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; } - case 166 /* Parameter */: + case 167 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; default: @@ -79933,7 +79989,7 @@ /*typeParameters*/ void 0, emptyArray, - factory.createKeywordTypeNode(131 /* AnyKeyword */) + factory.createKeywordTypeNode(132 /* AnyKeyword */) ); return createSignature(decl, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, flags); } @@ -80010,15 +80066,15 @@ function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 190 /* IntersectionType */: - case 189 /* UnionType */: + case 191 /* IntersectionType */: + case 190 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; } } @@ -80026,13 +80082,13 @@ function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 193 /* ParenthesizedType */ || typeNode.kind === 199 /* NamedTupleMember */) { + while (typeNode.kind === 194 /* ParenthesizedType */ || typeNode.kind === 200 /* NamedTupleMember */) { typeNode = typeNode.type; } - if (typeNode.kind === 144 /* NeverKeyword */) { + if (typeNode.kind === 145 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 198 /* LiteralType */ && typeNode.literal.kind === 104 /* NullKeyword */ || typeNode.kind === 155 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 199 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 156 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -80063,7 +80119,7 @@ } if (legacyDecorators) { checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 166 /* Parameter */) { + if (node.kind === 167 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } } else if (languageVersion < 99 /* ESNext */) { @@ -80089,7 +80145,7 @@ if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -80097,22 +80153,22 @@ } } break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - const otherKind = node.kind === 174 /* GetAccessor */ ? 175 /* SetAccessor */ : 174 /* GetAccessor */; + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + const otherKind = node.kind === 175 /* GetAccessor */ ? 176 /* SetAccessor */ : 175 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 166 /* Parameter */: + case 167 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { @@ -80227,7 +80283,7 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -80238,7 +80294,7 @@ checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -80255,7 +80311,7 @@ checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 170 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 171 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); @@ -80291,42 +80347,42 @@ function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 308 /* SourceFile */: - case 264 /* ModuleDeclaration */: - case 238 /* Block */: - case 266 /* CaseBlock */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 309 /* SourceFile */: + case 265 /* ModuleDeclaration */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 173 /* Constructor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 192 /* InferType */: + case 193 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -80345,11 +80401,11 @@ function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 171 /* MethodDeclaration */: - case 169 /* PropertyDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - if (member.kind === 175 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 172 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + if (member.kind === 176 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfDeclaration(member); @@ -80357,16 +80413,16 @@ addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 173 /* Constructor */: + case 174 /* Constructor */: for (const parameter of member.parameters) { if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } break; - case 178 /* IndexSignature */: - case 237 /* SemicolonClassElement */: - case 172 /* ClassStaticBlockDeclaration */: + case 179 /* IndexSignature */: + case 238 /* SemicolonClassElement */: + case 173 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -80390,7 +80446,7 @@ continue; const name = idText(typeParameter.name); const { parent: parent2 } = typeParameter; - if (parent2.kind !== 192 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { + if (parent2.kind !== 193 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { const sourceFile = getSourceFileOfNode(parent2); const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); @@ -80470,7 +80526,7 @@ }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 271 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 272 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); } else { @@ -80481,7 +80537,7 @@ unusedDestructures.forEach(([bindingPattern, bindingElements]) => { const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */; if (bindingPattern.elements.length === bindingElements.length) { - if (bindingElements.length === 1 && bindingPattern.parent.kind === 257 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 258 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 258 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 259 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); @@ -80494,7 +80550,7 @@ }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 240 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 241 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -80523,21 +80579,21 @@ switch (name.kind) { case 79 /* Identifier */: return idText(name); - case 204 /* ArrayBindingPattern */: - case 203 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 270 /* ImportClause */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 271 /* NamespaceImport */; + return node.kind === 271 /* ImportClause */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 272 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 270 /* ImportClause */ ? decl : decl.kind === 271 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 271 /* ImportClause */ ? decl : decl.kind === 272 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 238 /* Block */) { + if (node.kind === 239 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -80565,7 +80621,7 @@ if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 168 /* PropertySignature */ || node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */ || node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */ || node.kind === 299 /* PropertyAssignment */) { + if (node.kind === 170 /* PropertyDeclaration */ || node.kind === 169 /* PropertySignature */ || node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */ || node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */ || node.kind === 300 /* PropertyAssignment */) { return false; } if (node.flags & 16777216 /* Ambient */) { @@ -80621,7 +80677,7 @@ return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { + if (parent2.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { errorSkippedOn( "noEmit", name, @@ -80639,7 +80695,7 @@ return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { + if (parent2.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -80716,7 +80772,7 @@ if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } - if (node.kind === 257 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 258 /* VariableDeclaration */ && !node.initializer) { return; } const symbol = getSymbolOfDeclaration(node); @@ -80736,9 +80792,9 @@ ); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 258 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 240 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 238 /* Block */ && isFunctionLike(container.parent) || container.kind === 265 /* ModuleBlock */ || container.kind === 264 /* ModuleDeclaration */ || container.kind === 308 /* SourceFile */); + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 259 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 241 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 239 /* Block */ && isFunctionLike(container.parent) || container.kind === 266 /* ModuleBlock */ || container.kind === 265 /* ModuleDeclaration */ || container.kind === 309 /* SourceFile */); if (!namesShareScope) { const name = symbolToString(localDeclarationSymbol); error(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); @@ -80759,7 +80815,7 @@ if (!node.name) { return; } - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -80773,7 +80829,7 @@ if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 164 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; @@ -80795,7 +80851,7 @@ ); checkPropertyAccessibility( node, - !!parent2.initializer && parent2.initializer.kind === 106 /* SuperKeyword */, + !!parent2.initializer && parent2.initializer.kind === 107 /* SuperKeyword */, /*writing*/ false, parentType, @@ -80806,7 +80862,7 @@ } } if (isBindingPattern(node.name)) { - if (node.name.kind === 204 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 205 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); @@ -80819,7 +80875,7 @@ if (isInAmbientOrTypeNode(node)) { return; } - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 246 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 247 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -80851,7 +80907,7 @@ const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); if (initializer) { const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a2 = symbol.exports) == null ? void 0 : _a2.size); - if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 246 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 247 /* ForInStatement */) { checkTypeAssignableToAndOptionallyElaborate( checkExpressionCached(initializer), type, @@ -80886,9 +80942,9 @@ error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 168 /* PropertySignature */) { + if (node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 169 /* PropertySignature */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -80896,7 +80952,7 @@ } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 169 /* PropertyDeclaration */ || nextDeclaration.kind === 168 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; + const message = nextDeclaration.kind === 170 /* PropertyDeclaration */ || nextDeclaration.kind === 169 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; const declName = declarationNameToString(nextDeclarationName); const err = error( nextDeclarationName, @@ -80913,7 +80969,7 @@ } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 166 /* Parameter */ && right.kind === 257 /* VariableDeclaration */ || left.kind === 257 /* VariableDeclaration */ && right.kind === 166 /* Parameter */) { + if (left.kind === 167 /* Parameter */ && right.kind === 258 /* VariableDeclaration */ || left.kind === 258 /* VariableDeclaration */ && right.kind === 167 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -80947,7 +81003,7 @@ const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 239 /* EmptyStatement */) { + if (node.thenStatement.kind === 240 /* EmptyStatement */) { error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -81014,7 +81070,7 @@ let testedExpression = testedNode.parent; let childExpression = childNode.parent; while (testedExpression && childExpression) { - if (isIdentifier(testedExpression) && isIdentifier(childExpression) || testedExpression.kind === 108 /* ThisKeyword */ && childExpression.kind === 108 /* ThisKeyword */) { + if (isIdentifier(testedExpression) && isIdentifier(childExpression) || testedExpression.kind === 109 /* ThisKeyword */ && childExpression.kind === 109 /* ThisKeyword */) { return getSymbolAtLocation(testedExpression) === getSymbolAtLocation(childExpression); } else if (isPropertyAccessExpression(testedExpression) && isPropertyAccessExpression(childExpression)) { if (getSymbolAtLocation(testedExpression.name) !== getSymbolAtLocation(childExpression.name)) { @@ -81073,12 +81129,12 @@ } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 259 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { forEach(node.initializer.declarations, checkVariableDeclaration); } else { checkExpression(node.initializer); @@ -81108,12 +81164,12 @@ } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 206 /* ArrayLiteralExpression */ || varExpr.kind === 207 /* ObjectLiteralExpression */) { + if (varExpr.kind === 207 /* ArrayLiteralExpression */ || varExpr.kind === 208 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -81135,7 +81191,7 @@ function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { const variable = node.initializer.declarations[0]; if (variable && isBindingPattern(variable.name)) { error(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -81144,7 +81200,7 @@ } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 206 /* ArrayLiteralExpression */ || varExpr.kind === 207 /* ObjectLiteralExpression */) { + if (varExpr.kind === 207 /* ArrayLiteralExpression */ || varExpr.kind === 208 /* ObjectLiteralExpression */) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); @@ -81829,11 +81885,11 @@ const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 175 /* SetAccessor */) { + if (container.kind === 176 /* SetAccessor */) { if (node.expression) { error(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 173 /* Constructor */) { + } else if (container.kind === 174 /* Constructor */) { if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) { error(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -81850,7 +81906,7 @@ checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 173 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { + } else if (container.kind !== 174 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { error(node, Diagnostics.Not_all_code_paths_return_a_value); } } @@ -81874,7 +81930,7 @@ let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 293 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 294 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -81882,7 +81938,7 @@ hasDuplicateDefaultClause = true; } } - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); @@ -81914,7 +81970,7 @@ if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 253 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 254 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -82004,8 +82060,8 @@ return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 261 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 223 /* BinaryExpression */ || name && name.kind === 164 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 262 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 224 /* BinaryExpression */ || name && name.kind === 165 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -82029,7 +82085,7 @@ function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 261 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 262 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -82135,7 +82191,7 @@ function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 180 /* TypeReference */) { + if (node.kind === 181 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { @@ -82593,7 +82649,7 @@ return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 260 /* ClassDeclaration */ || d.kind === 261 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 261 /* ClassDeclaration */ || d.kind === 262 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a2, _b, _c, _d; @@ -82623,7 +82679,7 @@ continue basePropertyCheck; } } - if (derivedClassDecl.kind === 228 /* ClassExpression */) { + if (derivedClassDecl.kind === 229 /* ClassExpression */) { error( derivedClassDecl, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, @@ -82658,7 +82714,7 @@ const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { - const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 169 /* PropertyDeclaration */ && !d.initializer); + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer); if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; @@ -82768,7 +82824,7 @@ } } function isPropertyWithoutInitializer(node) { - return node.kind === 169 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 170 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -82802,7 +82858,7 @@ checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfDeclaration(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 261 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 262 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -82832,7 +82888,7 @@ checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); - if (node.type.kind === 139 /* IntrinsicKeyword */) { + if (node.type.kind === 140 /* IntrinsicKeyword */) { if (!intrinsicTypeKinds.has(node.name.escapedText) || length(node.typeParameters) !== 1) { error(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); } @@ -82893,7 +82949,7 @@ } function evaluate(expr, location) { switch (expr.kind) { - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const value = evaluate(expr.operand, location); if (typeof value === "number") { switch (expr.operator) { @@ -82906,7 +82962,7 @@ } } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const left = evaluate(expr.left, location); const right = evaluate(expr.right, location); if (typeof left === "number" && typeof right === "number") { @@ -82943,18 +82999,18 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return expr.text; - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return evaluateTemplateExpression(expr, location); case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return evaluate(expr.expression, location); case 79 /* Identifier */: if (isInfinityOrNaNString(expr.escapedText)) { return +expr.escapedText; } - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: if (isEntityNameExpression(expr)) { const symbol = resolveEntityName( expr, @@ -82975,7 +83031,7 @@ } } break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const root = expr.expression; if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { const rootSymbol = resolveEntityName( @@ -83042,7 +83098,7 @@ } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 263 /* EnumDeclaration */) { + if (declaration.kind !== 264 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -83072,7 +83128,7 @@ const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 260 /* ClassDeclaration */ || declaration.kind === 259 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 261 /* ClassDeclaration */ || declaration.kind === 260 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { return declaration; } } @@ -83133,13 +83189,13 @@ error(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - const mergedClass = getDeclarationOfKind(symbol, 260 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 261 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; } } - if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 308 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { - const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 93 /* ExportKeyword */); + if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 309 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { + const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 94 /* ExportKeyword */); if (exportModifier) { error(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } @@ -83171,21 +83227,21 @@ } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 205 /* BindingElement */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 258 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -83193,12 +83249,12 @@ } break; } - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 259 /* FunctionDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 260 /* FunctionDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -83209,12 +83265,12 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -83233,9 +83289,9 @@ error(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 265 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 308 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 275 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + const inAmbientExternalModule = node.parent.kind === 266 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 309 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 276 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -83264,8 +83320,8 @@ symbol = getMergedSymbol(symbol.exportSymbol || symbol); if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) { const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node; - Debug.assert(node.kind !== 277 /* NamespaceExport */); - if (node.kind === 278 /* ExportSpecifier */) { + Debug.assert(node.kind !== 278 /* NamespaceExport */); + if (node.kind === 279 /* ExportSpecifier */) { const diag2 = error(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); const alreadyExportedSymbol = (_b = (_a2 = getSourceFileOfNode(node).symbol) == null ? void 0 : _a2.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText); if (alreadyExportedSymbol === target) { @@ -83279,7 +83335,7 @@ } } } else { - Debug.assert(node.kind !== 257 /* VariableDeclaration */); + Debug.assert(node.kind !== 258 /* VariableDeclaration */); const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)); const moduleSpecifier = (_e = importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) != null ? _e : "..."; const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName); @@ -83295,7 +83351,7 @@ const targetFlags = getAllSymbolFlags(target); const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (targetFlags & excludedMeanings) { - const message = node.kind === 278 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + const message = node.kind === 279 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); } if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { @@ -83303,25 +83359,25 @@ const isType = !(targetFlags & 111551 /* Value */); if (isType || typeOnlyAlias) { switch (node.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 268 /* ImportEqualsDeclaration */: { + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 269 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports || compilerOptions.verbatimModuleSyntax) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? compilerOptions.verbatimModuleSyntax ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled : compilerOptions.verbatimModuleSyntax ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled; - const name = idText(node.kind === 273 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 274 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( error(node, message, name), isType ? void 0 : typeOnlyAlias, name ); } - if (isType && node.kind === 268 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType && node.kind === 269 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; } - case 278 /* ExportSpecifier */: { + case 279 /* ExportSpecifier */: { if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const name = idText(node.propertyName || node.name); const diagnostic = isType ? error(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); @@ -83331,7 +83387,7 @@ } } } - if (compilerOptions.verbatimModuleSyntax && node.kind !== 268 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && node.kind !== 269 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } @@ -83376,7 +83432,7 @@ function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 273 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 274 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -83423,7 +83479,7 @@ checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 272 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -83449,7 +83505,7 @@ if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 280 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 281 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfDeclaration(node)); if (target !== unknownSymbol) { const targetFlags = getAllSymbolFlags(target); @@ -83487,9 +83543,9 @@ if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 265 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 265 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 308 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + const inAmbientExternalModule = node.parent.kind === 266 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 266 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; + if (node.parent.kind !== 309 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { @@ -83514,13 +83570,13 @@ } function checkGrammarExportDeclaration(node) { var _a2; - if (node.isTypeOnly && ((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 276 /* NamedExports */) { + if (node.isTypeOnly && ((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 277 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 308 /* SourceFile */ || node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 264 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 309 /* SourceFile */ || node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 265 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -83604,8 +83660,8 @@ if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 308 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 264 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 309 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 265 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { @@ -83746,182 +83802,182 @@ const kind = node.kind; if (cancellationToken) { switch (kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 240 /* FirstStatement */ && kind <= 256 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 241 /* FirstStatement */ && kind <= 257 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return checkTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return checkParameter(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return checkPropertySignature(node); - case 182 /* ConstructorType */: - case 181 /* FunctionType */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 183 /* ConstructorType */: + case 182 /* FunctionType */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return checkSignatureDeclaration(node); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return checkMethodDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return checkConstructorDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return checkAccessorDeclaration(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return checkTypeReferenceNode(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return checkTypePredicate(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return checkTypeQuery(node); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return checkTypeLiteral(node); - case 185 /* ArrayType */: + case 186 /* ArrayType */: return checkArrayType(node); - case 186 /* TupleType */: + case 187 /* TupleType */: return checkTupleType(node); - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 193 /* ParenthesizedType */: - case 187 /* OptionalType */: - case 188 /* RestType */: + case 194 /* ParenthesizedType */: + case 188 /* OptionalType */: + case 189 /* RestType */: return checkSourceElement(node.type); - case 194 /* ThisType */: + case 195 /* ThisType */: return checkThisType(node); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return checkTypeOperator(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return checkConditionalType(node); - case 192 /* InferType */: + case 193 /* InferType */: return checkInferType(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return checkImportType(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 327 /* JSDocLink */: - case 328 /* JSDocLinkCode */: - case 329 /* JSDocLinkPlain */: + case 328 /* JSDocLink */: + case 329 /* JSDocLinkCode */: + case 330 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 318 /* JSDocNonNullableType */: - case 317 /* JSDocNullableType */: - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: - case 325 /* JSDocTypeLiteral */: + case 319 /* JSDocNonNullableType */: + case 318 /* JSDocNullableType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: + case 326 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 312 /* JSDocTypeExpression */: + case 313 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 336 /* JSDocPublicTag */: - case 338 /* JSDocProtectedTag */: - case 337 /* JSDocPrivateTag */: + case 337 /* JSDocPublicTag */: + case 339 /* JSDocProtectedTag */: + case 338 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 353 /* JSDocSatisfiesTag */: + case 354 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return checkMappedType(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 238 /* Block */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 266 /* ModuleBlock */: return checkBlock(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return checkVariableStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return checkExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return checkIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return checkDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return checkWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return checkForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return checkForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return checkForOfStatement(node); - case 248 /* ContinueStatement */: - case 249 /* BreakStatement */: + case 249 /* ContinueStatement */: + case 250 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return checkReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return checkWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return checkSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return checkLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return checkThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return checkTryStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return checkBindingElement(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return checkClassDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return checkImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return checkExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return checkExportAssignment(node); - case 239 /* EmptyStatement */: - case 256 /* DebuggerStatement */: + case 240 /* EmptyStatement */: + case 257 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -84020,33 +84076,33 @@ currentNode = node; instantiationCount = 0; switch (node.kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 167 /* Decorator */: - case 283 /* JsxOpeningElement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 168 /* Decorator */: + case 284 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 281 /* JsxElement */: + case 282 /* JsxElement */: checkJsxElementDeferred(node); break; } @@ -84198,27 +84254,27 @@ copySymbols(location.locals, meaning); } switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalModule(location)) break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */); break; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */); } break; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -84251,7 +84307,7 @@ function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 278 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 277 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 279 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 278 /* NamespaceExport */)) { copySymbol(symbol, meaning2); } }); @@ -84262,16 +84318,16 @@ return name.kind === 79 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 163 /* QualifiedName */) { + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 180 /* TypeReference */; + return node.parent.kind === 181 /* TypeReference */; } function isInNameOfExpressionWithTypeArguments(node) { - while (node.parent.kind === 208 /* PropertyAccessExpression */) { + while (node.parent.kind === 209 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 230 /* ExpressionWithTypeArguments */; + return node.parent.kind === 231 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -84297,13 +84353,13 @@ return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 163 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 164 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 268 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 269 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 274 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 275 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -84329,7 +84385,7 @@ node = parent2; parent2 = parent2.parent; } - if (parent2 && parent2.kind === 202 /* ImportType */ && parent2.qualifier === node) { + if (parent2 && parent2.kind === 203 /* ImportType */ && parent2.qualifier === node) { return parent2; } return void 0; @@ -84338,7 +84394,7 @@ if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 208 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 209 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -84346,7 +84402,7 @@ } } } - if (name.parent.kind === 274 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 275 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, /*all meanings*/ @@ -84358,7 +84414,7 @@ return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 268 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 269 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals( name, @@ -84379,7 +84435,7 @@ } if (isInNameOfExpressionWithTypeArguments(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 230 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 231 /* ExpressionWithTypeArguments */) { meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -84393,10 +84449,10 @@ return entityNameSymbol; } } - if (name.parent.kind === 344 /* JSDocParameterTag */) { + if (name.parent.kind === 345 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 165 /* TypeParameter */ && name.parent.parent.kind === 348 /* JSDocTemplateTag */) { + if (name.parent.kind === 166 /* TypeParameter */ && name.parent.parent.kind === 349 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -84449,12 +84505,12 @@ return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 208 /* PropertyAccessExpression */ || name.kind === 163 /* QualifiedName */) { + } else if (name.kind === 209 /* PropertyAccessExpression */ || name.kind === 164 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 208 /* PropertyAccessExpression */) { + if (name.kind === 209 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -84494,7 +84550,7 @@ return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 180 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 181 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName( name, meaning, @@ -84505,7 +84561,7 @@ ); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 179 /* TypePredicate */) { + if (name.parent.kind === 180 /* TypePredicate */) { return resolveEntityName( name, /*meaning*/ @@ -84558,17 +84614,17 @@ if (node.kind === 79 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 205 /* BindingElement */ && grandParent.kind === 203 /* ObjectBindingPattern */ && node === parent2.propertyName) { + } else if (parent2.kind === 206 /* BindingElement */ && grandParent.kind === 204 /* ObjectBindingPattern */ && node === parent2.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { return propertyDeclaration; } } else if (isMetaProperty(parent2) && parent2.name === node) { - if (parent2.keywordToken === 103 /* NewKeyword */ && idText(node) === "target") { + if (parent2.keywordToken === 104 /* NewKeyword */ && idText(node) === "target") { return checkNewTargetMetaProperty(parent2).symbol; } - if (parent2.keywordToken === 100 /* ImportKeyword */ && idText(node) === "meta") { + if (parent2.keywordToken === 101 /* ImportKeyword */ && idText(node) === "meta") { return getGlobalImportMetaExpressionType().members.get("meta"); } return void 0; @@ -84577,12 +84633,12 @@ switch (node.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 208 /* PropertyAccessExpression */: - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: const container = getThisContainer( node, /*includeArrowFunctions*/ @@ -84599,19 +84655,19 @@ if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 194 /* ThisType */: + case 195 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkExpression(node).symbol; - case 135 /* ConstructorKeyword */: + case 136 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 173 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 174 /* Constructor */) { return constructorDeclaration.parent.symbol; } return void 0; case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 269 /* ImportDeclaration */ || node.parent.kind === 275 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 270 /* ImportDeclaration */ || node.parent.kind === 276 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( node.parent, /*checkArgumentIsStringLiteralLike*/ false @@ -84624,19 +84680,19 @@ case 8 /* NumericLiteral */: const objectType = isElementAccessExpression(parent2) ? parent2.argumentExpression === node ? getTypeOfExpression(parent2.expression) : void 0 : isLiteralTypeNode(parent2) && isIndexedAccessTypeNode(grandParent) ? getTypeFromTypeNode(grandParent.objectType) : void 0; return objectType && getPropertyOfType(objectType, escapeLeadingUnderscores(node.text)); - case 88 /* DefaultKeyword */: - case 98 /* FunctionKeyword */: + case 89 /* DefaultKeyword */: + case 99 /* FunctionKeyword */: case 38 /* EqualsGreaterThanToken */: - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 202 /* ImportType */: + case 203 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; - case 100 /* ImportKeyword */: - case 103 /* NewKeyword */: + case 101 /* ImportKeyword */: + case 104 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return checkExpression(node).symbol; default: return void 0; @@ -84652,7 +84708,7 @@ return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 300 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 301 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); } return void 0; @@ -84724,16 +84780,16 @@ return errorType; } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 207 /* ObjectLiteralExpression */ || expr.kind === 206 /* ArrayLiteralExpression */); - if (expr.parent.kind === 247 /* ForOfStatement */) { + Debug.assert(expr.kind === 208 /* ObjectLiteralExpression */ || expr.kind === 207 /* ArrayLiteralExpression */); + if (expr.parent.kind === 248 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 223 /* BinaryExpression */) { + if (expr.parent.kind === 224 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 299 /* PropertyAssignment */) { + if (expr.parent.kind === 300 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -84766,7 +84822,7 @@ case 8 /* NumericLiteral */: case 10 /* StringLiteral */: return getStringLiteralType(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -84861,7 +84917,7 @@ } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 308 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 309 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -84891,7 +84947,7 @@ return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 295 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 296 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -84919,7 +84975,7 @@ /*lookInLabeledStatements*/ false ); - const inLoopBodyBlock = container.kind === 238 /* Block */ && isIterationStatement( + const inLoopBodyBlock = container.kind === 239 /* Block */ && isIterationStatement( container.parent, /*lookInLabeledStatements*/ false @@ -84959,25 +85015,25 @@ function isValueAliasDeclaration(node) { Debug.assert(!compilerOptions.verbatimModuleSyntax); switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfDeclaration(node)); - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: const symbol = getSymbolOfDeclaration(node); return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return node.expression && node.expression.kind === 79 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfDeclaration(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 308 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 309 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node)); @@ -85068,15 +85124,15 @@ } function canHaveConstantValue(node) { switch (node.kind) { - case 302 /* EnumMember */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 303 /* EnumMember */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 302 /* EnumMember */) { + if (node.kind === 303 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -85180,7 +85236,7 @@ function createTypeOfDeclaration(declarationIn, enclosingDeclaration, flags, tracker, addUndefined) { const declaration = getParseTreeNode(declarationIn, isVariableLikeOrAccessor); if (!declaration) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const symbol = getSymbolOfDeclaration(declaration); let type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? getWidenedLiteralType(getTypeOfSymbol(symbol)) : errorType; @@ -85195,7 +85251,7 @@ function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn, enclosingDeclaration, flags, tracker) { const signatureDeclaration = getParseTreeNode(signatureDeclarationIn, isFunctionLike); if (!signatureDeclaration) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const signature = getSignatureFromDeclaration(signatureDeclaration); return nodeBuilder.typeToTypeNode(getReturnTypeOfSignature(signature), enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); @@ -85203,7 +85259,7 @@ function createTypeOfExpression(exprIn, enclosingDeclaration, flags, tracker) { const expr = getParseTreeNode(exprIn, isExpression); if (!expr) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const type = getWidenedType(getRegularTypeOfExpression(expr)); return nodeBuilder.typeToTypeNode(type, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); @@ -85386,12 +85442,12 @@ getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 175 /* SetAccessor */ ? 174 /* GetAccessor */ : 175 /* SetAccessor */; + const otherKind = accessor.kind === 176 /* SetAccessor */ ? 175 /* GetAccessor */ : 176 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 175 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 174 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 176 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 175 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -85412,7 +85468,7 @@ }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 308 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 309 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfDeclaration(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -85447,18 +85503,18 @@ return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 230 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 294 /* HeritageClause */; + return node.parent && node.parent.kind === 231 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 295 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 164 /* ComputedPropertyName */) { + if (node.parent.kind === 165 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 208 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 209 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -85501,7 +85557,7 @@ break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 308 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 309 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -85526,7 +85582,7 @@ } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 264 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 265 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker( specifier, specifier, @@ -85536,7 +85592,7 @@ if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 308 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 309 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -85822,12 +85878,12 @@ for (const modifier of node.modifiers) { if (isDecorator(modifier)) { if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - if (node.kind === 171 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { + if (node.kind === 172 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); } - } else if (legacyDecorators && (node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */)) { + } else if (legacyDecorators && (node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */)) { const accessors = getAllAccessorDeclarations(node.parent.members, node); if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -85856,30 +85912,30 @@ } firstDecorator != null ? firstDecorator : firstDecorator = modifier; } else { - if (modifier.kind !== 146 /* ReadonlyKeyword */) { - if (node.kind === 168 /* PropertySignature */ || node.kind === 170 /* MethodSignature */) { + if (modifier.kind !== 147 /* ReadonlyKeyword */) { + if (node.kind === 169 /* PropertySignature */ || node.kind === 171 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 178 /* IndexSignature */ && (modifier.kind !== 124 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 179 /* IndexSignature */ && (modifier.kind !== 125 /* StaticKeyword */ || !isClassLike(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); } } - if (modifier.kind !== 101 /* InKeyword */ && modifier.kind !== 145 /* OutKeyword */ && modifier.kind !== 85 /* ConstKeyword */) { - if (node.kind === 165 /* TypeParameter */) { + if (modifier.kind !== 102 /* InKeyword */ && modifier.kind !== 146 /* OutKeyword */ && modifier.kind !== 86 /* ConstKeyword */) { + if (node.kind === 166 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { - case 85 /* ConstKeyword */: - if (node.kind !== 263 /* EnumDeclaration */ && node.kind !== 165 /* TypeParameter */) { - return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(85 /* ConstKeyword */)); + case 86 /* ConstKeyword */: + if (node.kind !== 264 /* EnumDeclaration */ && node.kind !== 166 /* TypeParameter */) { + return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(86 /* ConstKeyword */)); } const parent2 = node.parent; - if (node.kind === 165 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { + if (node.kind === 166 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind)); } break; - case 161 /* OverrideKeyword */: + case 162 /* OverrideKeyword */: if (flags & 16384 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); } else if (flags & 2 /* Ambient */) { @@ -85894,9 +85950,9 @@ flags |= 16384 /* Override */; lastOverride = modifier; break; - case 123 /* PublicKeyword */: - case 122 /* ProtectedKeyword */: - case 121 /* PrivateKeyword */: + case 124 /* PublicKeyword */: + case 123 /* ProtectedKeyword */: + case 122 /* PrivateKeyword */: const text = visibilityToString(modifierToFlag(modifier.kind)); if (flags & 28 /* AccessibilityModifier */) { return grammarErrorOnNode(modifier, Diagnostics.Accessibility_modifier_already_seen); @@ -85910,10 +85966,10 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); } else if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); - } else if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + } else if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { - if (modifier.kind === 121 /* PrivateKeyword */) { + if (modifier.kind === 122 /* PrivateKeyword */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); @@ -85923,7 +85979,7 @@ } flags |= modifierToFlag(modifier.kind); break; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: if (flags & 32 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static"); } else if (flags & 64 /* Readonly */) { @@ -85932,9 +85988,9 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); - } else if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + } else if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); @@ -85944,31 +86000,31 @@ flags |= 32 /* Static */; lastStatic = modifier; break; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "accessor"); } else if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); } else if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); - } else if (node.kind !== 169 /* PropertyDeclaration */) { + } else if (node.kind !== 170 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; break; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 168 /* PropertySignature */ && node.kind !== 178 /* IndexSignature */ && node.kind !== 166 /* Parameter */) { + } else if (node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 169 /* PropertySignature */ && node.kind !== 179 /* IndexSignature */ && node.kind !== 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); } flags |= 64 /* Readonly */; break; - case 93 /* ExportKeyword */: - if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 262 /* TypeAliasDeclaration */ && node.kind !== 261 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later - node.kind !== 264 /* ModuleDeclaration */ && node.parent.kind === 308 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + case 94 /* ExportKeyword */: + if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 263 /* TypeAliasDeclaration */ && node.kind !== 262 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later + node.kind !== 265 /* ModuleDeclaration */ && node.parent.kind === 309 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } if (flags & 1 /* Export */) { @@ -85981,14 +86037,14 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1 /* Export */; break; - case 88 /* DefaultKeyword */: - const container = node.parent.kind === 308 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 264 /* ModuleDeclaration */ && !isAmbientModule(container)) { + case 89 /* DefaultKeyword */: + const container = node.parent.kind === 309 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 265 /* ModuleDeclaration */ && !isAmbientModule(container)) { return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); } else if (!(flags & 1 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); @@ -85997,7 +86053,7 @@ } flags |= 1024 /* Default */; break; - case 136 /* DeclareKeyword */: + case 137 /* DeclareKeyword */: if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "declare"); } else if (flags & 512 /* Async */) { @@ -86006,9 +86062,9 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 265 /* ModuleBlock */) { + } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 266 /* ModuleBlock */) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); @@ -86018,15 +86074,15 @@ flags |= 2 /* Ambient */; lastDeclare = modifier; break; - case 126 /* AbstractKeyword */: + case 127 /* AbstractKeyword */: if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 260 /* ClassDeclaration */ && node.kind !== 182 /* ConstructorType */) { - if (node.kind !== 171 /* MethodDeclaration */ && node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 174 /* GetAccessor */ && node.kind !== 175 /* SetAccessor */) { + if (node.kind !== 261 /* ClassDeclaration */ && node.kind !== 183 /* ConstructorType */) { + if (node.kind !== 172 /* MethodDeclaration */ && node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 175 /* GetAccessor */ && node.kind !== 176 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 260 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 261 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { return grammarErrorOnNode(modifier, Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32 /* Static */) { @@ -86050,12 +86106,12 @@ } flags |= 256 /* Abstract */; break; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); } else if (flags & 2 /* Ambient */ || node.parent.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -86064,11 +86120,11 @@ flags |= 512 /* Async */; lastAsync = modifier; break; - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - const inOutFlag = modifier.kind === 101 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; - const inOutText = modifier.kind === 101 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 165 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + const inOutFlag = modifier.kind === 102 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; + const inOutText = modifier.kind === 102 /* InKeyword */ ? "in" : "out"; + if (node.kind !== 166 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); } if (flags & inOutFlag) { @@ -86082,7 +86138,7 @@ } } } - if (node.kind === 173 /* Constructor */) { + if (node.kind === 174 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -86093,11 +86149,11 @@ return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 269 /* ImportDeclaration */ || node.kind === 268 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 270 /* ImportDeclaration */ || node.kind === 269 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 166 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 167 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 166 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 167 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -86117,47 +86173,47 @@ } function findFirstIllegalModifier(node) { switch (node.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 264 /* ModuleDeclaration */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 166 /* Parameter */: - case 165 /* TypeParameter */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 265 /* ModuleDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 167 /* Parameter */: + case 166 /* TypeParameter */: return void 0; - case 172 /* ClassStaticBlockDeclaration */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 267 /* NamespaceExportDeclaration */: - case 279 /* MissingDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 268 /* NamespaceExportDeclaration */: + case 280 /* MissingDeclaration */: return find(node.modifiers, isModifier); default: - if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return void 0; } switch (node.kind) { - case 259 /* FunctionDeclaration */: - return findFirstModifierExcept(node, 132 /* AsyncKeyword */); - case 260 /* ClassDeclaration */: - case 182 /* ConstructorType */: - return findFirstModifierExcept(node, 126 /* AbstractKeyword */); - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 240 /* VariableStatement */: - case 262 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + return findFirstModifierExcept(node, 133 /* AsyncKeyword */); + case 261 /* ClassDeclaration */: + case 183 /* ConstructorType */: + return findFirstModifierExcept(node, 127 /* AbstractKeyword */); + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 241 /* VariableStatement */: + case 263 /* TypeAliasDeclaration */: return find(node.modifiers, isModifier); - case 263 /* EnumDeclaration */: - return findFirstModifierExcept(node, 85 /* ConstKeyword */); + case 264 /* EnumDeclaration */: + return findFirstModifierExcept(node, 86 /* ConstKeyword */); default: Debug.assertNever(node); } @@ -86172,10 +86228,10 @@ } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -86347,7 +86403,7 @@ let seenImplementsClause = false; if (!checkGrammarModifiers(node) && node.heritageClauses) { for (const heritageClause of node.heritageClauses) { - if (heritageClause.token === 94 /* ExtendsKeyword */) { + if (heritageClause.token === 95 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); } @@ -86359,7 +86415,7 @@ } seenExtendsClause = true; } else { - Debug.assert(heritageClause.token === 117 /* ImplementsKeyword */); + Debug.assert(heritageClause.token === 118 /* ImplementsKeyword */); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.implements_clause_already_seen); } @@ -86373,13 +86429,13 @@ let seenExtendsClause = false; if (node.heritageClauses) { for (const heritageClause of node.heritageClauses) { - if (heritageClause.token === 94 /* ExtendsKeyword */) { + if (heritageClause.token === 95 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); } seenExtendsClause = true; } else { - Debug.assert(heritageClause.token === 117 /* ImplementsKeyword */); + Debug.assert(heritageClause.token === 118 /* ImplementsKeyword */); return grammarErrorOnFirstToken(heritageClause, Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -86388,11 +86444,11 @@ return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 164 /* ComputedPropertyName */) { + if (node.kind !== 165 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 223 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { + if (computedPropertyName.expression.kind === 224 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } return false; @@ -86400,7 +86456,7 @@ function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */ || node.kind === 171 /* MethodDeclaration */ + node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */ || node.kind === 172 /* MethodDeclaration */ ); if (node.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); @@ -86419,7 +86475,7 @@ function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = /* @__PURE__ */ new Map(); for (const prop of node.properties) { - if (prop.kind === 301 /* SpreadAssignment */) { + if (prop.kind === 302 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -86429,10 +86485,10 @@ continue; } const name = prop.name; - if (name.kind === 164 /* ComputedPropertyName */) { + if (name.kind === 165 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 300 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 301 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { grammarErrorOnNode(prop.equalsToken, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern); } if (name.kind === 80 /* PrivateIdentifier */) { @@ -86440,7 +86496,7 @@ } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 132 /* AsyncKeyword */ || prop.kind !== 171 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 172 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -86453,8 +86509,8 @@ } let currentKind; switch (prop.kind) { - case 300 /* ShorthandPropertyAssignment */: - case 299 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 8 /* NumericLiteral */) { @@ -86462,13 +86518,13 @@ } currentKind = 4 /* PropertyAssignment */; break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -86505,7 +86561,7 @@ checkGrammarTypeArguments(node, node.typeArguments); const seen = /* @__PURE__ */ new Map(); for (const attr of node.attributes.properties) { - if (attr.kind === 290 /* JsxSpreadAttribute */) { + if (attr.kind === 291 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -86514,7 +86570,7 @@ } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 291 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 292 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -86549,7 +86605,7 @@ if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 247 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 248 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { @@ -86589,7 +86645,7 @@ if (!hasParseDiagnostics(sourceFile)) { const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); const func = getContainingFunction(forInOrOfStatement); - if (func && func.kind !== 173 /* Constructor */) { + if (func && func.kind !== 174 /* Constructor */) { Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); @@ -86605,7 +86661,7 @@ grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 258 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 259 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -86613,16 +86669,16 @@ return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } const firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); } } @@ -86630,7 +86686,7 @@ return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 184 /* TypeLiteral */ && accessor.parent.kind !== 261 /* InterfaceDeclaration */) { + if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 185 /* TypeLiteral */ && accessor.parent.kind !== 262 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -86645,7 +86701,7 @@ if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 184 /* TypeLiteral */ || accessor.parent.kind === 261 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 185 /* TypeLiteral */ || accessor.parent.kind === 262 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -86655,10 +86711,10 @@ if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 174 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 175 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 175 /* SetAccessor */) { + if (accessor.kind === 176 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -86676,17 +86732,17 @@ return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 174 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 175 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 174 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 175 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } function checkGrammarTypeOperatorNode(node) { - if (node.operator === 156 /* UniqueKeyword */) { - if (node.type.kind !== 153 /* SymbolKeyword */) { - return grammarErrorOnNode(node.type, Diagnostics._0_expected, tokenToString(153 /* SymbolKeyword */)); + if (node.operator === 157 /* UniqueKeyword */) { + if (node.type.kind !== 154 /* SymbolKeyword */) { + return grammarErrorOnNode(node.type, Diagnostics._0_expected, tokenToString(154 /* SymbolKeyword */)); } let parent2 = walkUpParenthesizedTypes(node.parent); if (isInJSFile(parent2) && isJSDocTypeExpression(parent2)) { @@ -86696,7 +86752,7 @@ } } switch (parent2.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: const decl = parent2; if (decl.name.kind !== 79 /* Identifier */) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); @@ -86708,12 +86764,12 @@ return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!isStatic(parent2) || !hasEffectiveReadonlyModifier(parent2)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); } break; - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (!hasSyntacticModifier(parent2, 64 /* Readonly */)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } @@ -86721,9 +86777,9 @@ default: return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } - } else if (node.operator === 146 /* ReadonlyKeyword */) { - if (node.type.kind !== 185 /* ArrayType */ && node.type.kind !== 186 /* TupleType */) { - return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(153 /* SymbolKeyword */)); + } else if (node.operator === 147 /* ReadonlyKeyword */) { + if (node.type.kind !== 186 /* ArrayType */ && node.type.kind !== 187 /* TupleType */) { + return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(154 /* SymbolKeyword */)); } } } @@ -86736,9 +86792,9 @@ if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 171 /* MethodDeclaration */) { - if (node.parent.kind === 207 /* ObjectLiteralExpression */) { - if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 132 /* AsyncKeyword */)) { + if (node.kind === 172 /* MethodDeclaration */) { + if (node.parent.kind === 208 /* ObjectLiteralExpression */) { + if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 133 /* AsyncKeyword */)) { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) { return true; @@ -86758,12 +86814,12 @@ } if (node.flags & 16777216 /* Ambient */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.kind === 171 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 172 /* MethodDeclaration */ && !node.body) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } - } else if (node.parent.kind === 261 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 262 /* InterfaceDeclaration */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.parent.kind === 184 /* TypeLiteral */) { + } else if (node.parent.kind === 185 /* TypeLiteral */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } } @@ -86774,9 +86830,9 @@ return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 248 /* ContinueStatement */ && !isIterationStatement( + const isMisplacedContinueLabel = node.kind === 249 /* ContinueStatement */ && !isIterationStatement( current.statement, /*lookInLabeledStatement*/ true @@ -86787,8 +86843,8 @@ return false; } break; - case 252 /* SwitchStatement */: - if (node.kind === 249 /* BreakStatement */ && !node.label) { + case 253 /* SwitchStatement */: + if (node.kind === 250 /* BreakStatement */ && !node.label) { return false; } break; @@ -86805,10 +86861,10 @@ current = current.parent; } if (node.label) { - const message = node.kind === 249 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + const message = node.kind === 250 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - const message = node.kind === 249 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + const message = node.kind === 250 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } } @@ -86828,10 +86884,10 @@ } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 221 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 222 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 221 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; + return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 222 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -86841,7 +86897,7 @@ function checkAmbientInitializer(node) { const initializer = node.initializer; if (initializer) { - const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 110 /* TrueKeyword */ || initializer.kind === 95 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); + const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 111 /* TrueKeyword */ || initializer.kind === 96 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { @@ -86853,7 +86909,7 @@ } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 246 /* ForInStatement */ && node.parent.parent.kind !== 247 /* ForOfStatement */) { + if (node.parent.parent.kind !== 247 /* ForInStatement */ && node.parent.parent.kind !== 248 /* ForOfStatement */) { if (node.flags & 16777216 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { @@ -86865,7 +86921,7 @@ } } } - if (node.exclamationToken && (node.parent.parent.kind !== 240 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 241 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } @@ -86917,15 +86973,15 @@ } function allowLetAndConstDeclarations(parent2) { switch (parent2.kind) { - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return false; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return allowLetAndConstDeclarations(parent2.parent); } return true; @@ -86942,12 +86998,12 @@ function checkGrammarMetaProperty(node) { const escapedText = node.name.escapedText; switch (node.keywordToken) { - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: if (escapedText !== "target") { return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.escapedText, tokenToString(node.keywordToken), "target"); } break; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: if (escapedText !== "meta") { return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.escapedText, tokenToString(node.keywordToken), "meta"); } @@ -87005,7 +87061,7 @@ } } function checkGrammarProperty(node) { - if (isComputedPropertyName(node.name) && isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 101 /* InKeyword */) { + if (isComputedPropertyName(node.name) && isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 102 /* InKeyword */) { return grammarErrorOnNode(node.parent.members[0], Diagnostics.A_mapped_type_may_not_declare_properties_or_methods); } if (isClassLike(node.parent)) { @@ -87024,7 +87080,7 @@ if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 261 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 262 /* InterfaceDeclaration */) { if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } @@ -87050,14 +87106,14 @@ } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 261 /* InterfaceDeclaration */ || node.kind === 262 /* TypeAliasDeclaration */ || node.kind === 269 /* ImportDeclaration */ || node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 275 /* ExportDeclaration */ || node.kind === 274 /* ExportAssignment */ || node.kind === 267 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 262 /* InterfaceDeclaration */ || node.kind === 263 /* TypeAliasDeclaration */ || node.kind === 270 /* ImportDeclaration */ || node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 276 /* ExportDeclaration */ || node.kind === 275 /* ExportAssignment */ || node.kind === 268 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (const decl of file.statements) { - if (isDeclaration(decl) || decl.kind === 240 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 241 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -87074,7 +87130,7 @@ if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 238 /* Block */ || node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + if (node.parent.kind === 239 /* Block */ || node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -87089,9 +87145,9 @@ let diagnosticMessage; if (languageVersion >= 1 /* ES5 */) { diagnosticMessage = Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 198 /* LiteralType */)) { + } else if (isChildOfNodeWithKind(node, 199 /* LiteralType */)) { diagnosticMessage = Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 302 /* EnumMember */)) { + } else if (isChildOfNodeWithKind(node, 303 /* EnumMember */)) { diagnosticMessage = Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { @@ -87164,7 +87220,7 @@ if (node.isTypeOnly && node.name && node.namedBindings) { return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); } - if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 272 /* NamedImports */) { + if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 273 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -87174,7 +87230,7 @@ if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 273 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + specifier.kind === 274 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement ); } }); @@ -87237,10 +87293,10 @@ } function findMostOverlappyType(source, unionTarget) { let bestMatch; - if (!(source.flags & (134348796 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { + if (!(source.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { let matchingCount = 0; for (const target of unionTarget.types) { - if (!(target.flags & (134348796 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { + if (!(target.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { const overlap = getIntersectionType([getIndexType(source), getIndexType(target)]); if (overlap.flags & 4194304 /* Index */) { return target; @@ -87258,7 +87314,7 @@ } function filterPrimitivesIfContainsNonPrimitive(type) { if (maybeTypeOfKind(type, 67108864 /* NonPrimitive */)) { - const result = filterType(type, (t) => !(t.flags & 134348796 /* Primitive */)); + const result = filterType(type, (t) => !(t.flags & 402784252 /* Primitive */)); if (!(result.flags & 131072 /* Never */)) { return result; } @@ -87293,12 +87349,12 @@ return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 259 /* FunctionDeclaration */ && declaration.kind !== 171 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 260 /* FunctionDeclaration */ && declaration.kind !== 172 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -87714,21 +87770,21 @@ return fn === void 0 ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor); } var visitEachChildTable = { - [163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [164 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [165 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [165 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -87737,7 +87793,7 @@ nodeVisitor(node.default, visitor, isTypeNode) ); }, - [166 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [167 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -87748,14 +87804,14 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [168 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -87764,7 +87820,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [170 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { var _a2, _b; return context.factory.updatePropertyDeclaration( node, @@ -87776,7 +87832,7 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [170 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -87787,7 +87843,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -87800,7 +87856,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [173 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [174 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -87808,7 +87864,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [174 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [175 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -87818,7 +87874,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -87827,7 +87883,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [172 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [173 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -87835,7 +87891,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -87843,7 +87899,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [177 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -87851,7 +87907,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [178 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -87860,7 +87916,7 @@ ); }, // Types - [179 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -87868,14 +87924,14 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [181 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -87883,7 +87939,7 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -87892,56 +87948,56 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [185 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [187 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [189 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [190 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [190 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [191 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -87950,13 +88006,13 @@ Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [193 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -87966,14 +88022,14 @@ node.isTypeOf ); }, - [298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [200 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -87982,26 +88038,26 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [194 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [198 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -88012,20 +88068,20 @@ nodesVisitor(node.members, visitor, isTypeElement) ); }, - [198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [202 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -88033,19 +88089,19 @@ ); }, // Binding patterns - [203 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [204 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [204 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [205 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [206 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -88055,19 +88111,19 @@ ); }, // Expression - [206 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [207 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [209 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88079,7 +88135,7 @@ Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [210 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88091,7 +88147,7 @@ Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [211 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88105,7 +88161,7 @@ nodesVisitor(node.arguments, visitor, isExpression) ); }, - [211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [212 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88113,7 +88169,7 @@ nodesVisitor(node.arguments, visitor, isExpression) ); }, - [212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [213 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -88121,20 +88177,20 @@ Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [214 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [216 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -88146,7 +88202,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [216 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [217 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -88157,43 +88213,43 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [219 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [220 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [224 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -88201,7 +88257,7 @@ Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [225 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -88211,27 +88267,27 @@ Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [229 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88241,28 +88297,28 @@ nodesVisitor(node.members, visitor, isClassElement) ); }, - [230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [232 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -88271,14 +88327,14 @@ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88286,26 +88342,26 @@ ); }, // Element - [238 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [239 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [240 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [241 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [242 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [243 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88313,21 +88369,21 @@ nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [243 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [245 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -88336,7 +88392,7 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -88344,7 +88400,7 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [248 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -88353,52 +88409,52 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [249 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [250 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -88406,7 +88462,7 @@ nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [258 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -88415,13 +88471,13 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [258 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [259 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [259 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [260 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -88433,7 +88489,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [260 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [261 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88443,7 +88499,7 @@ nodesVisitor(node.members, visitor, isClassElement) ); }, - [261 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [262 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88453,7 +88509,7 @@ nodesVisitor(node.members, visitor, isTypeElement) ); }, - [262 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [263 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88462,7 +88518,7 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88470,7 +88526,7 @@ nodesVisitor(node.members, visitor, isEnumMember) ); }, - [264 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88478,25 +88534,25 @@ nodeVisitor(node.body, visitor, isModuleBody) ); }, - [265 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [266 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [266 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [267 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [269 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88505,7 +88561,7 @@ Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [270 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88514,21 +88570,21 @@ nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [296 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [297 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [298 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -88536,25 +88592,25 @@ nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [273 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [273 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -88562,14 +88618,14 @@ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [275 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88579,13 +88635,13 @@ nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [276 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [277 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [278 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -88594,14 +88650,14 @@ ); }, // Module references - [280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -88609,7 +88665,7 @@ Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -88617,7 +88673,7 @@ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -88625,13 +88681,13 @@ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -88639,52 +88695,52 @@ Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [289 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [290 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [293 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [294 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [294 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [295 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [295 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -88692,28 +88748,28 @@ ); }, // Property assignments - [299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -88721,20 +88777,20 @@ ); }, // Top-level nodes - [308 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [309 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [357 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [358 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -89329,7 +89385,7 @@ function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 308 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 309 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -89372,7 +89428,7 @@ let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -89381,12 +89437,12 @@ hasImportDefault = true; } break; - case 268 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 280 /* ExternalModuleReference */) { + case 269 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 281 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -89409,19 +89465,19 @@ addExportedNamesForExportDeclaration(node); } break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames); } } break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -89438,7 +89494,7 @@ } } break; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -89579,7 +89635,7 @@ return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 169 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 170 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -89616,15 +89672,15 @@ } function getAllDecoratorsOfClassElement(member, parent2, useLegacyDecorators) { switch (member.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (!useLegacyDecorators) { return getAllDecoratorsOfMethod(member); } return getAllDecoratorsOfAccessors(member, parent2); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -90251,8 +90307,8 @@ const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -90263,14 +90319,14 @@ let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 309 /* Bundle */) { + if (node.kind === 310 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 311 /* InputFiles */) { + if (prepend.kind === 312 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -90301,22 +90357,22 @@ } function onBeforeVisitNode(node) { switch (node.kind) { - case 308 /* SourceFile */: - case 266 /* CaseBlock */: - case 265 /* ModuleBlock */: - case 238 /* Block */: + case 309 /* SourceFile */: + case 267 /* CaseBlock */: + case 266 /* ModuleBlock */: + case 239 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 260 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 261 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -90335,10 +90391,10 @@ } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -90353,13 +90409,13 @@ return node; } switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -90369,7 +90425,7 @@ return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 275 /* ExportDeclaration */ || node.kind === 269 /* ImportDeclaration */ || node.kind === 270 /* ImportClause */ || node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (node.kind === 276 /* ExportDeclaration */ || node.kind === 270 /* ImportDeclaration */ || node.kind === 271 /* ImportClause */ || node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 281 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -90381,21 +90437,21 @@ } function classElementVisitorWorker(node, parent2) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructor(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent2); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return node; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -90406,15 +90462,15 @@ } function objectLiteralElementVisitorWorker(node, parent2) { switch (node.kind) { - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return visitor(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); default: return Debug.failBadSyntaxKind(node); @@ -90431,7 +90487,7 @@ return void 0; if (modifierToFlag(node.kind) & 117086 /* TypeScriptModifier */) { return void 0; - } else if (currentNamespace && node.kind === 93 /* ExportKeyword */) { + } else if (currentNamespace && node.kind === 94 /* ExportKeyword */) { return void 0; } return node; @@ -90441,108 +90497,108 @@ return factory2.createNotEmittedStatement(node); } switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return currentNamespace ? void 0 : node; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 126 /* AbstractKeyword */: - case 161 /* OverrideKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 146 /* ReadonlyKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - case 185 /* ArrayType */: - case 186 /* TupleType */: - case 187 /* OptionalType */: - case 188 /* RestType */: - case 184 /* TypeLiteral */: - case 179 /* TypePredicate */: - case 165 /* TypeParameter */: - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 134 /* BooleanKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 144 /* NeverKeyword */: - case 114 /* VoidKeyword */: - case 153 /* SymbolKeyword */: - case 182 /* ConstructorType */: - case 181 /* FunctionType */: - case 183 /* TypeQuery */: - case 180 /* TypeReference */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 191 /* ConditionalType */: - case 193 /* ParenthesizedType */: - case 194 /* ThisType */: - case 195 /* TypeOperator */: - case 196 /* IndexedAccessType */: - case 197 /* MappedType */: - case 198 /* LiteralType */: - case 178 /* IndexSignature */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 127 /* AbstractKeyword */: + case 162 /* OverrideKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 147 /* ReadonlyKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + case 186 /* ArrayType */: + case 187 /* TupleType */: + case 188 /* OptionalType */: + case 189 /* RestType */: + case 185 /* TypeLiteral */: + case 180 /* TypePredicate */: + case 166 /* TypeParameter */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 135 /* BooleanKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 145 /* NeverKeyword */: + case 115 /* VoidKeyword */: + case 154 /* SymbolKeyword */: + case 183 /* ConstructorType */: + case 182 /* FunctionType */: + case 184 /* TypeQuery */: + case 181 /* TypeReference */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 192 /* ConditionalType */: + case 194 /* ParenthesizedType */: + case 195 /* ThisType */: + case 196 /* TypeOperator */: + case 197 /* IndexedAccessType */: + case 198 /* MappedType */: + case 199 /* LiteralType */: + case 179 /* IndexSignature */: return void 0; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return void 0; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return visitHeritageClause(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return visitArrowFunction(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return visitAssertionExpression(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return visitNonNullExpression(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -90579,7 +90635,7 @@ ))) facts |= 1 /* HasStaticInitializedProperties */; const extendsClauseElement = getEffectiveBaseTypeNode(node); - if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */) + if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */) facts |= 64 /* IsDerivedClass */; if (classOrConstructorParameterIsDecorated(legacyDecorators, node)) facts |= 2 /* HasClassOrConstructorParameterDecorators */; @@ -90875,19 +90931,19 @@ } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 169 /* PropertyDeclaration */; + return kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 170 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 171 /* MethodDeclaration */; + return node.kind === 172 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; } return false; @@ -90919,7 +90975,7 @@ return Debug.checkDefined(visitNode(name, visitor, isPropertyName)); } function visitHeritageClause(node) { - if (node.token === 117 /* ImplementsKeyword */) { + if (node.token === 118 /* ImplementsKeyword */) { return void 0; } return visitEachChild(node, visitor, context); @@ -91515,12 +91571,12 @@ true ) ) - ], currentLexicalScope.kind === 308 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) + ], currentLexicalScope.kind === 309 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) ); setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 263 /* EnumDeclaration */) { + if (node.kind === 264 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -91633,7 +91689,7 @@ let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 265 /* ModuleBlock */) { + if (node.body.kind === 266 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -91664,13 +91720,13 @@ true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 265 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 266 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 264 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 265 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -91705,7 +91761,7 @@ ) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 271 /* NamespaceImport */) { + if (node.kind === 272 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.verbatimModuleSyntax || compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -91903,15 +91959,15 @@ if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(264 /* ModuleDeclaration */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(265 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 264 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 265 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 263 /* EnumDeclaration */; + return getOriginalNode(node).kind === 264 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -91956,9 +92012,9 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -91973,8 +92029,8 @@ /*prefixLocals*/ false ); - if (container && container.kind !== 308 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 264 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 263 /* EnumDeclaration */; + if (container && container.kind !== 309 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 265 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 264 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -92074,7 +92130,7 @@ } function modifierVisitor(node) { switch (node.kind) { - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return shouldTransformAutoAccessorsInCurrentClass() ? void 0 : node; default: return tryCast(node, isModifier); @@ -92085,51 +92141,51 @@ return node; } switch (node.kind) { - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return Debug.fail("Use `modifierVisitor` instead."); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression( node, /*referencedName*/ void 0 ); - case 172 /* ClassStaticBlockDeclaration */: - case 169 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: return Debug.fail("Use `classElementVisitor` instead."); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return visitBindingElement(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); case 80 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -92137,20 +92193,20 @@ /*referencedName*/ void 0 ); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, @@ -92167,21 +92223,21 @@ } function namedEvaluationVisitor(node, referencedName) { switch (node.kind) { - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ false, referencedName ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ false, referencedName ); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node, referencedName); default: return visitor(node); @@ -92189,26 +92245,26 @@ } function discardedValueVisitor(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -92222,9 +92278,9 @@ } function heritageClauseVisitor(node) { switch (node.kind) { - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -92232,8 +92288,8 @@ } function assignmentTargetVisitor(node) { switch (node.kind) { - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -92241,29 +92297,29 @@ } function classElementVisitor(node) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, visitMethodOrAccessorDeclaration, node ); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, visitPropertyDeclaration, node ); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return node; default: return isModifierLike(node) ? modifierVisitor(node) : visitor(node); @@ -92271,7 +92327,7 @@ } function propertyNameVisitor(node) { switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); default: return visitor(node); @@ -92279,10 +92335,10 @@ } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -93459,7 +93515,7 @@ return constructor; } const extendsClauseElement = getEffectiveBaseTypeNode(container); - const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */); + const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */); const parameters = visitParameterList(constructor ? constructor.parameters : void 0, visitor, context); const body = transformConstructorBody(container, constructor, isDerivedClass); if (!body) { @@ -93753,15 +93809,15 @@ function enableSubstitutionForClassStaticThisOrSuperReference() { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; - context.enableSubstitution(108 /* ThisKeyword */); - context.enableEmitNotification(259 /* FunctionDeclaration */); - context.enableEmitNotification(215 /* FunctionExpression */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(169 /* PropertyDeclaration */); - context.enableEmitNotification(164 /* ComputedPropertyName */); + context.enableSubstitution(109 /* ThisKeyword */); + context.enableEmitNotification(260 /* FunctionDeclaration */); + context.enableEmitNotification(216 /* FunctionExpression */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(170 /* PropertyDeclaration */); + context.enableEmitNotification(165 /* ComputedPropertyName */); } } function addInstanceMethodStatements(statements, methods, receiver) { @@ -94135,16 +94191,16 @@ return; } switch (node.kind) { - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) { break; } - case 259 /* FunctionDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - case 169 /* PropertyDeclaration */: { + case 260 /* FunctionDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: { const savedLexicalEnvironment = lexicalEnvironment; const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; lexicalEnvironment = void 0; @@ -94156,7 +94212,7 @@ lexicalEnvironment = savedLexicalEnvironment; return; } - case 164 /* ComputedPropertyName */: { + case 165 /* ComputedPropertyName */: { const savedLexicalEnvironment = lexicalEnvironment; const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; @@ -94180,7 +94236,7 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return substituteThisExpression(node); } return node; @@ -94253,7 +94309,7 @@ return !isGeneratedPrivateIdentifier(node) && node.escapedText === "#constructor"; } function isPrivateIdentifierInExpression(node) { - return isPrivateIdentifier(node.left) && node.operatorToken.kind === 101 /* InKeyword */; + return isPrivateIdentifier(node.left) && node.operatorToken.kind === 102 /* InKeyword */; } // src/compiler/transformers/typeSerializer.ts @@ -94290,15 +94346,15 @@ } function serializeTypeOfNode(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: - case 166 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 167 /* Parameter */: return serializeTypeNode(node.type); - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 171 /* MethodDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 172 /* MethodDeclaration */: return factory2.createIdentifier("Function"); default: return factory2.createVoidZero(); @@ -94325,7 +94381,7 @@ return factory2.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 174 /* GetAccessor */) { + if (container && node.kind === 175 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -94347,76 +94403,76 @@ } node = skipTypeParentheses(node); switch (node.kind) { - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: return factory2.createVoidZero(); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return factory2.createIdentifier("Function"); - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return factory2.createIdentifier("Array"); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean"); - case 134 /* BooleanKeyword */: + case 135 /* BooleanKeyword */: return factory2.createIdentifier("Boolean"); - case 200 /* TemplateLiteralType */: - case 152 /* StringKeyword */: + case 201 /* TemplateLiteralType */: + case 153 /* StringKeyword */: return factory2.createIdentifier("String"); - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return factory2.createIdentifier("Object"); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); - case 148 /* NumberKeyword */: + case 149 /* NumberKeyword */: return factory2.createIdentifier("Number"); - case 160 /* BigIntKeyword */: + case 161 /* BigIntKeyword */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 153 /* SymbolKeyword */: + case 154 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return serializeTypeReferenceNode(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ true ); - case 189 /* UnionType */: + case 190 /* UnionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ false ); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return serializeUnionOrIntersectionConstituents( [node.trueType, node.falseType], /*isIntersection*/ false ); - case 195 /* TypeOperator */: - if (node.operator === 146 /* ReadonlyKeyword */) { + case 196 /* TypeOperator */: + if (node.operator === 147 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 183 /* TypeQuery */: - case 196 /* IndexedAccessType */: - case 197 /* MappedType */: - case 184 /* TypeLiteral */: - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 194 /* ThisType */: - case 202 /* ImportType */: + case 184 /* TypeQuery */: + case 197 /* IndexedAccessType */: + case 198 /* MappedType */: + case 185 /* TypeLiteral */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 195 /* ThisType */: + case 203 /* ImportType */: break; - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: - case 320 /* JSDocFunctionType */: - case 321 /* JSDocVariadicType */: - case 322 /* JSDocNamepathType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: + case 321 /* JSDocFunctionType */: + case 322 /* JSDocVariadicType */: + case 323 /* JSDocNamepathType */: break; - case 317 /* JSDocNullableType */: - case 318 /* JSDocNonNullableType */: - case 319 /* JSDocOptionalType */: + case 318 /* JSDocNullableType */: + case 319 /* JSDocNonNullableType */: + case 320 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -94428,7 +94484,7 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return factory2.createIdentifier("String"); - case 221 /* PrefixUnaryExpression */: { + case 222 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 8 /* NumericLiteral */: @@ -94442,10 +94498,10 @@ return factory2.createIdentifier("Number"); case 9 /* BigIntLiteral */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: return factory2.createIdentifier("Boolean"); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return factory2.createVoidZero(); default: return Debug.failBadSyntaxKind(node); @@ -94455,20 +94511,20 @@ let serializedType; for (let typeNode of types) { typeNode = skipTypeParentheses(typeNode); - if (typeNode.kind === 144 /* NeverKeyword */) { + if (typeNode.kind === 145 /* NeverKeyword */) { if (isIntersection) return factory2.createVoidZero(); continue; } - if (typeNode.kind === 157 /* UnknownKeyword */) { + if (typeNode.kind === 158 /* UnknownKeyword */) { if (!isIntersection) return factory2.createIdentifier("Object"); continue; } - if (typeNode.kind === 131 /* AnyKeyword */) { + if (typeNode.kind === 132 /* AnyKeyword */) { return factory2.createIdentifier("Object"); } - if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 104 /* NullKeyword */ || typeNode.kind === 155 /* UndefinedKeyword */)) { + if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 156 /* UndefinedKeyword */)) { continue; } const serializedConstituent = serializeTypeNode(typeNode); @@ -94587,7 +94643,7 @@ name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -94637,23 +94693,23 @@ return node; } switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -95206,49 +95262,49 @@ return node; } switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return Debug.fail("Use `modifierVisitor` instead."); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression( node, /*referencedName*/ void 0 ); - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return Debug.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return visitBindingElement(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return visitThisExpression(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ false ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -95256,7 +95312,7 @@ /*referencedName*/ void 0 ); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ @@ -95264,28 +95320,28 @@ /*referencedName*/ void 0 ); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discard*/ false ); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: { + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: { enterOther(); const result = visitEachChild(node, fallbackVisitor, context); exitOther(); @@ -95297,7 +95353,7 @@ } function fallbackVisitor(node) { switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; default: return visitor(node); @@ -95305,7 +95361,7 @@ } function modifierVisitor(node) { switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; default: return node; @@ -95313,17 +95369,17 @@ } function classElementVisitor(node) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); default: return visitor(node); @@ -95331,21 +95387,21 @@ } function namedEvaluationVisitor(node, referencedName) { switch (node.kind) { - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ false, referencedName ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ false, referencedName ); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node, referencedName); default: return visitor(node); @@ -95353,26 +95409,26 @@ } function discardedValueVisitor(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -95498,7 +95554,7 @@ } } if (classDecorators && containsLexicalSuperInStaticInitializer(node)) { - const extendsClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const extendsClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); if (extendsExpression) { @@ -95534,7 +95590,7 @@ return node2; } switch (node2.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: if (!outerThis) { outerThis = factory2.createUniqueName("_outerThis", 16 /* Optimistic */); classDefinitionStatements.unshift(createLet(outerThis, factory2.createThis())); @@ -95554,7 +95610,7 @@ const initializerStatements = prepareConstructor(node, classInfo2); if (initializerStatements) { const extendsClauseElement = getEffectiveBaseTypeNode(node); - const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */); + const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */); const constructorStatements = []; if (isDerivedClass) { const spreadArguments = factory2.createSpreadElement(factory2.createIdentifier("arguments")); @@ -96142,7 +96198,7 @@ setterName = factory2.updateComputedPropertyName(name2, temp); } } - const modifiersWithoutAccessor = visitNodes2(modifiers, (node2) => node2.kind !== 127 /* AccessorKeyword */ ? node2 : void 0, isModifier); + const modifiersWithoutAccessor = visitNodes2(modifiers, (node2) => node2.kind !== 128 /* AccessorKeyword */ ? node2 : void 0, isModifier); const backingField = createAccessorPropertyBackingField(factory2, node, modifiersWithoutAccessor, initializer); setOriginalNode(backingField, node); setEmitFlags(backingField, 3072 /* NoComments */); @@ -96865,36 +96921,36 @@ return node; } switch (node.kind) { - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return void 0; - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return visitAwaitExpression(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 208 /* PropertyAccessExpression */: - if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 106 /* SuperKeyword */) { + case 209 /* PropertyAccessExpression */: + if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 209 /* ElementAccessExpression */: - if (capturedSuperProperties && node.expression.kind === 106 /* SuperKeyword */) { + case 210 /* ElementAccessExpression */: + if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 173 /* Constructor */: + case 174 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -96903,27 +96959,27 @@ function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 238 /* Block */: - case 252 /* SwitchStatement */: - case 266 /* CaseBlock */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 255 /* TryStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 242 /* IfStatement */: - case 251 /* WithStatement */: - case 253 /* LabeledStatement */: + case 239 /* Block */: + case 253 /* SwitchStatement */: + case 267 /* CaseBlock */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 256 /* TryStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 243 /* IfStatement */: + case 252 /* WithStatement */: + case 254 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -97200,7 +97256,7 @@ const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 216 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 217 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = /* @__PURE__ */ new Set(); @@ -97299,15 +97355,15 @@ function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); - context.enableEmitNotification(260 /* ClassDeclaration */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(240 /* VariableStatement */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); + context.enableEmitNotification(261 /* ClassDeclaration */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(241 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -97338,17 +97394,17 @@ } function substituteExpression(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), @@ -97360,7 +97416,7 @@ return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return createSuperElementAccessInAsyncMethod( node.argumentExpression, node @@ -97386,7 +97442,7 @@ } function isSuperContainer(node) { const kind = node.kind; - return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 261 /* ClassDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -97604,7 +97660,7 @@ ); } function visitorNoAsyncModifier(node) { - if (node.kind === 132 /* AsyncKeyword */) { + if (node.kind === 133 /* AsyncKeyword */) { return void 0; } return node; @@ -97626,119 +97682,119 @@ return node; } switch (node.kind) { - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return visitAwaitExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 246 /* ForInStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 247 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return visitVoidExpression(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 208 /* PropertyAccessExpression */: - if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 106 /* SuperKeyword */) { + case 209 /* PropertyAccessExpression */: + if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 209 /* ElementAccessExpression */: - if (capturedSuperProperties && node.expression.kind === 106 /* SuperKeyword */) { + case 210 /* ElementAccessExpression */: + if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -97823,7 +97879,7 @@ function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 247 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 248 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -97834,7 +97890,7 @@ let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 301 /* SpreadAssignment */) { + if (e.kind === 302 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -97842,7 +97898,7 @@ const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 299 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 300 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -97853,7 +97909,7 @@ function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 207 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 208 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -98641,15 +98697,15 @@ function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); - context.enableEmitNotification(260 /* ClassDeclaration */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(240 /* VariableStatement */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); + context.enableEmitNotification(261 /* ClassDeclaration */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(241 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -98680,17 +98736,17 @@ } function substituteExpression(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), @@ -98702,7 +98758,7 @@ return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return createSuperElementAccessInAsyncMethod( node.argumentExpression, node @@ -98728,7 +98784,7 @@ } function isSuperContainer(node) { const kind = node.kind; - return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 261 /* ClassDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -98773,7 +98829,7 @@ return node; } switch (node.kind) { - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -98812,7 +98868,7 @@ return node; } switch (node.kind) { - case 210 /* CallExpression */: { + case 211 /* CallExpression */: { const updated = visitNonOptionalCallExpression( node, /*captureThisArg*/ @@ -98821,8 +98877,8 @@ Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression( node, @@ -98835,12 +98891,12 @@ return updated; } return visitEachChild(node, visitor, context); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (node.operatorToken.kind === 60 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -98878,7 +98934,7 @@ thisArg = expression; } } - expression = node.kind === 208 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 209 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -98914,12 +98970,12 @@ } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -98945,8 +99001,8 @@ for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -98955,9 +99011,9 @@ thisArg = rightExpression; } } - rightExpression = segment.kind === 208 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 209 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -98965,7 +99021,7 @@ } rightExpression = factory2.createFunctionCallCall( rightExpression, - leftThisArg.kind === 106 /* SuperKeyword */ ? factory2.createThis() : leftThisArg, + leftThisArg.kind === 107 /* SuperKeyword */ ? factory2.createThis() : leftThisArg, visitNodes2(segment.arguments, visitor, isExpression) ); } else { @@ -99297,25 +99353,25 @@ } function visitorWorker(node) { switch (node.kind) { - case 281 /* JsxElement */: + case 282 /* JsxElement */: return visitJsxElement( node, /*isChild*/ false ); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ false ); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ false ); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -99325,21 +99381,21 @@ switch (node.kind) { case 11 /* JsxText */: return visitJsxText(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return visitJsxExpression(node); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return visitJsxElement( node, /*isChild*/ true ); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ true ); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ @@ -99565,7 +99621,7 @@ const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 291 /* JsxExpression */) { + if (node.kind === 292 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -99639,7 +99695,7 @@ return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 281 /* JsxElement */) { + if (node.kind === 282 /* JsxElement */) { return getTagName(node.openingElement); } else { const name = node.tagName; @@ -99938,7 +99994,7 @@ return node; } switch (node.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -100066,7 +100122,7 @@ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 250 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 251 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -100121,7 +100177,7 @@ return node; } function callExpressionVisitor(node) { - if (node.kind === 106 /* SuperKeyword */) { + if (node.kind === 107 /* SuperKeyword */) { return visitSuperKeyword( /*isExpressionOfCall*/ true @@ -100131,87 +100187,87 @@ } function visitorWorker(node, expressionResultIsUnused2) { switch (node.kind) { - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: return void 0; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return visitArrowFunction(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); case 79 /* Identifier */: return visitIdentifier(node); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return visitCaseBlock(node); - case 238 /* Block */: + case 239 /* Block */: return visitBlock( node, /*isFunctionBody*/ false ); - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return visitDoOrWhileStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: @@ -100222,33 +100278,33 @@ return visitStringLiteral(node); case 8 /* NumericLiteral */: return visitNumericLiteral(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return visitTemplateExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return visitSpreadElement(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return visitSuperKeyword( /*isExpressionOfCall*/ false ); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return visitThisKeyword(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return visitMetaProperty(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return visitAccessorDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -100356,13 +100412,13 @@ } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 249 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 250 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump; if (!canUseBreakOrContinue) { let labelMarker; const label = node.label; if (!label) { - if (node.kind === 249 /* BreakStatement */) { + if (node.kind === 250 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -100370,7 +100426,7 @@ labelMarker = "continue"; } } else { - if (node.kind === 249 /* BreakStatement */) { + if (node.kind === 250 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump( convertedLoopState, @@ -100582,7 +100638,7 @@ return block; } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { - const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */; + const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */; if (!constructor) return createDefaultConstructorBody(node, isDerivedClass); const prologue = []; @@ -100691,14 +100747,14 @@ }; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 250 /* ReturnStatement */) { + if (statement.kind === 251 /* ReturnStatement */) { return true; - } else if (statement.kind === 242 /* IfStatement */) { + } else if (statement.kind === 243 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 238 /* Block */) { + } else if (statement.kind === 239 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -100972,7 +101028,7 @@ return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 216 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 217 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } @@ -101014,27 +101070,27 @@ if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return statements; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 173 /* Constructor */: + case 174 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), "constructor" ); break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), factory2.createBinaryExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), - 102 /* InstanceOfKeyword */, + 103 /* InstanceOfKeyword */, factory2.getLocalName(node) ) ), @@ -101077,21 +101133,21 @@ function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 173 /* Constructor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 173 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -101298,7 +101354,7 @@ const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -101359,7 +101415,7 @@ multiLine = true; } } else { - Debug.assert(node.kind === 216 /* ArrowFunction */); + Debug.assert(node.kind === 217 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -101585,14 +101641,14 @@ } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -101942,7 +101998,7 @@ let numInitialProperties = -1, hasComputed = false; for (let i = 0; i < properties.length; i++) { const property = properties[i]; - if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 164 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 165 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -102064,15 +102120,15 @@ } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -102124,11 +102180,11 @@ function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 258 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 259 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -102567,20 +102623,20 @@ for (let i = start2; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -102706,7 +102762,7 @@ let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -102749,7 +102805,7 @@ return visitTypeScriptClassWrapper(node); } const expression = skipOuterExpressions(node.expression); - if (expression.kind === 106 /* SuperKeyword */ || isSuperProperty(expression) || some(node.arguments, isSpreadElement)) { + if (expression.kind === 107 /* SuperKeyword */ || isSuperProperty(expression) || some(node.arguments, isSpreadElement)) { return visitCallExpressionWithPotentialCapturedThisAssignment( node, /*assignToCapturedThis*/ @@ -102869,16 +102925,16 @@ ); } function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { - if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 106 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { + if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 107 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { const { target, thisArg } = factory2.createCallBinding(node.expression, hoistVariableDeclaration); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { setEmitFlags(thisArg, 8 /* NoSubstitution */); } let resultingCall; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { resultingCall = factory2.createFunctionApplyCall( Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)), - node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), + node.expression.kind === 107 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), transformAndSpreadElements( node.arguments, /*isArgumentList*/ @@ -102893,13 +102949,13 @@ resultingCall = setTextRange( factory2.createFunctionCallCall( Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)), - node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), + node.expression.kind === 107 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), visitNodes2(node.arguments, visitor, isExpression) ), node ); } - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { const initializer = factory2.createLogicalOr( resultingCall, createActualThis() @@ -103042,7 +103098,7 @@ return hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), "prototype") : factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); } function visitMetaProperty(node) { - if (node.keywordToken === 103 /* NewKeyword */ && node.name.escapedText === "target") { + if (node.keywordToken === 104 /* NewKeyword */ && node.name.escapedText === "target") { hierarchyFacts |= 32768 /* NewTarget */; return factory2.createUniqueName("_newTarget", 16 /* Optimistic */ | 32 /* FileLevel */); } @@ -103069,14 +103125,14 @@ function enableSubstitutionsForCapturedThis() { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; - context.enableSubstitution(108 /* ThisKeyword */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(216 /* ArrowFunction */); - context.enableEmitNotification(215 /* FunctionExpression */); - context.enableEmitNotification(259 /* FunctionDeclaration */); + context.enableSubstitution(109 /* ThisKeyword */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(217 /* ArrowFunction */); + context.enableEmitNotification(216 /* FunctionExpression */); + context.enableEmitNotification(260 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -103100,10 +103156,10 @@ } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 258 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -103112,7 +103168,7 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return substituteThisKeyword(node); } return node; @@ -103160,19 +103216,19 @@ return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 241 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 242 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 210 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 211 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; - if (!nodeIsSynthesized(callTarget) || callTarget.kind !== 106 /* SuperKeyword */) { + if (!nodeIsSynthesized(callTarget) || callTarget.kind !== 107 /* SuperKeyword */) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 227 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 228 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -103189,24 +103245,24 @@ if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(283 /* JsxOpeningElement */); - context.enableEmitNotification(284 /* JsxClosingElement */); - context.enableEmitNotification(282 /* JsxSelfClosingElement */); + context.enableEmitNotification(284 /* JsxOpeningElement */); + context.enableEmitNotification(285 /* JsxClosingElement */); + context.enableEmitNotification(283 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(299 /* PropertyAssignment */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(300 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: + case 283 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -103244,7 +103300,7 @@ } function trySubstituteReservedName(name) { const token = identifierToKeywordKind(name); - if (token !== void 0 && token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */) { + if (token !== void 0 && token >= 82 /* FirstReservedWord */ && token <= 117 /* LastReservedWord */) { return setTextRange(factory2.createStringLiteralFromNode(name), name); } return void 0; @@ -103332,13 +103388,13 @@ } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 243 /* DoStatement */: + case 244 /* DoStatement */: return visitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return visitWhileStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -103346,24 +103402,24 @@ } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return visitAccessorDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return visitBreakStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return visitContinueStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -103377,23 +103433,23 @@ } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return visitConditionalExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -103401,9 +103457,9 @@ } function visitGenerator(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -103588,14 +103644,14 @@ if (containsYield(right)) { let target; switch (left.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), left.name ); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), @@ -103928,35 +103984,35 @@ } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 238 /* Block */: + case 239 /* Block */: return transformAndEmitBlock(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return transformAndEmitIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return transformAndEmitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return transformAndEmitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return transformAndEmitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -104180,7 +104236,7 @@ markLabel(conditionLabel); emitBreakWhenFalse(endLoopLabel, factory2.createLessThan(keysIndex, factory2.createPropertyAccessExpression(keysArray, "length"))); emitAssignment(key, factory2.createElementAccessExpression(keysArray, keysIndex)); - emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key, 101 /* InKeyword */, obj)); + emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key, 102 /* InKeyword */, obj)); let variable; if (isVariableDeclarationList(initializer)) { for (const variable2 of initializer.declarations) { @@ -104308,7 +104364,7 @@ for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 293 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 294 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -104318,7 +104374,7 @@ let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -105286,12 +105342,12 @@ const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(212 /* TaggedTemplateExpression */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(213 /* TaggedTemplateExpression */); context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(223 /* BinaryExpression */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(224 /* BinaryExpression */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(309 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; let currentSourceFile; @@ -105704,23 +105760,23 @@ } function topLevelVisitor(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 358 /* MergeDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 359 /* EndOfDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -105731,26 +105787,26 @@ return node; } switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -105773,24 +105829,24 @@ if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -106623,7 +106679,7 @@ } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 240 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 241 /* VariableStatement */) { const id = getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -106655,10 +106711,10 @@ const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration( statements, @@ -106829,14 +106885,14 @@ } function modifierVisitor(node) { switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return void 0; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -106874,11 +106930,11 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -106931,7 +106987,7 @@ return node; } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 308 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 309 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -107018,10 +107074,10 @@ context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableSubstitution(223 /* BinaryExpression */); - context.enableSubstitution(233 /* MetaProperty */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableSubstitution(224 /* BinaryExpression */); + context.enableSubstitution(234 /* MetaProperty */); + context.enableEmitNotification(309 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; const exportFunctionsMap = []; @@ -107209,7 +107265,7 @@ if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 275 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 276 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -107357,11 +107413,11 @@ for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -107384,7 +107440,7 @@ ); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -107479,13 +107535,13 @@ } function topLevelVisitor(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -107655,7 +107711,7 @@ } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 308 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 309 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -107692,7 +107748,7 @@ return isExportedDeclaration ? createExportExpression(name, preventSubstitution(setTextRange(factory2.createAssignment(name, value), location))) : preventSubstitution(setTextRange(factory2.createAssignment(name, value), location)); } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 240 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 241 /* VariableStatement */) { const id = getOriginalNodeId(node); const isExportedDeclaration = hasSyntacticModifier(node.original, 1 /* Export */); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -107730,10 +107786,10 @@ const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -107833,47 +107889,47 @@ } function topLevelNestedVisitor(node) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return visitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return visitWhileStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return visitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return visitCaseBlock(node); - case 292 /* CaseClause */: + case 293 /* CaseClause */: return visitCaseClause(node); - case 293 /* DefaultClause */: + case 294 /* DefaultClause */: return visitDefaultClause(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return visitTryStatement(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 238 /* Block */: + case 239 /* Block */: return visitBlock(node); - case 358 /* MergeDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 359 /* EndOfDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -108019,30 +108075,30 @@ return node; } switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -108115,7 +108171,7 @@ return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 308 /* SourceFile */; + return container !== void 0 && container.kind === 309 /* SourceFile */; } else { return false; } @@ -108152,14 +108208,14 @@ } function modifierVisitor(node) { switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return void 0; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -108193,7 +108249,7 @@ } function substituteUnspecified(node) { switch (node.kind) { - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -108237,9 +108293,9 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return substituteBinaryExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -108308,7 +108364,7 @@ /*prefixLocals*/ false ); - if (exportContainer && exportContainer.kind === 308 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 309 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); @@ -108341,7 +108397,7 @@ const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(308 /* SourceFile */); + context.enableEmitNotification(309 /* SourceFile */); context.enableSubstitution(79 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -108389,11 +108445,11 @@ } function visitor(node) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -108443,7 +108499,7 @@ /*typeArguments*/ void 0, [ - factory2.createPropertyAccessExpression(factory2.createMetaProperty(100 /* ImportKeyword */, factory2.createIdentifier("meta")), factory2.createIdentifier("url")) + factory2.createPropertyAccessExpression(factory2.createMetaProperty(101 /* ImportKeyword */, factory2.createIdentifier("meta")), factory2.createIdentifier("url")) ] ) ) @@ -108598,8 +108654,8 @@ const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(308 /* SourceFile */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(309 /* SourceFile */); + context.enableEmitNotification(309 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -108642,7 +108698,7 @@ return result; } function transformSourceFileOrBundle(node) { - return node.kind === 308 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 309 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -108672,7 +108728,7 @@ function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -108689,7 +108745,7 @@ function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; @@ -108720,12 +108776,12 @@ return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`); } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 170 /* PropertyDeclaration */ || node.kind === 209 /* PropertyAccessExpression */ || node.kind === 169 /* PropertySignature */ || node.kind === 167 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */ || node.kind === 166 /* Parameter */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */ || node.kind === 167 /* Parameter */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -108742,7 +108798,7 @@ } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 175 /* SetAccessor */) { + if (node.kind === 176 /* SetAccessor */) { if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1; } else { @@ -108764,26 +108820,26 @@ function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -108804,29 +108860,29 @@ } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 177 /* ConstructSignature */: - case 182 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 183 /* ConstructorType */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 176 /* CallSignature */: + case 177 /* CallSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node.parent)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 259 /* FunctionDeclaration */: - case 181 /* FunctionType */: + case 260 /* FunctionDeclaration */: + case 182 /* FunctionType */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1; default: return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`); @@ -108835,40 +108891,40 @@ function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 197 /* MappedType */: + case 198 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node.parent)) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 261 /* ClassDeclaration */) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 181 /* FunctionType */: - case 259 /* FunctionDeclaration */: + case 182 /* FunctionType */: + case 260 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 192 /* InferType */: + case 193 /* InferType */: diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; break; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -108883,7 +108939,7 @@ function getHeritageClauseVisibilityError() { let diagnosticMessage; if (isClassDeclaration(node.parent.parent)) { - diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 117 /* ImplementsKeyword */ ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 118 /* ImplementsKeyword */ ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; } @@ -108930,7 +108986,7 @@ } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 166 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 167 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -109162,10 +109218,10 @@ return result; } function transformRoot(node) { - if (node.kind === 308 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 309 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 309 /* Bundle */) { + if (node.kind === 310 /* Bundle */) { isBundledEmit = true; refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); @@ -109197,7 +109253,7 @@ const newFile = factory2.updateSourceFile( sourceFile, [factory2.createModuleDeclaration( - [factory2.createModifier(136 /* DeclareKeyword */)], + [factory2.createModifier(137 /* DeclareKeyword */)], factory2.createStringLiteral(getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), factory2.createModuleBlock(setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)) )], @@ -109232,7 +109288,7 @@ ); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 311 /* InputFiles */) { + if (prepend.kind === 312 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -109400,14 +109456,14 @@ if (name.kind === 79 /* Identifier */) { return name; } else { - if (name.kind === 204 /* ArrayBindingPattern */) { + if (name.kind === 205 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 229 /* OmittedExpression */) { + if (elem.kind === 230 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { @@ -109471,15 +109527,15 @@ if (shouldPrintWithInitializer(node)) { return; } - const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 167 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } if (!getParseTreeNode(node)) { - return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */); + return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(132 /* AnyKeyword */); } - if (node.kind === 175 /* SetAccessor */) { - return factory2.createKeywordTypeNode(131 /* AnyKeyword */); + if (node.kind === 176 /* SetAccessor */) { + return factory2.createKeywordTypeNode(132 /* AnyKeyword */); } errorNameNode = node.name; let oldDiag; @@ -109487,10 +109543,10 @@ oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 166 /* Parameter */ || node.kind === 169 /* PropertyDeclaration */ || node.kind === 168 /* PropertySignature */) { + if (node.kind === 167 /* Parameter */ || node.kind === 170 /* PropertyDeclaration */ || node.kind === 169 /* PropertySignature */) { if (isPropertySignature(node) || !node.initializer) return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); @@ -109501,27 +109557,27 @@ if (!suppressNewDiagnosticContexts) { getSymbolAccessibilityDiagnostic = oldDiag; } - return returnValue || factory2.createKeywordTypeNode(131 /* AnyKeyword */); + return returnValue || factory2.createKeywordTypeNode(132 /* AnyKeyword */); } } function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: return !resolver.isDeclarationVisible(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: return false; - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -109609,7 +109665,7 @@ function rewriteModuleSpecifier(parent2, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 264 /* ModuleDeclaration */ && parent2.kind !== 202 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 265 /* ModuleDeclaration */ && parent2.kind !== 203 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); @@ -109628,7 +109684,7 @@ function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 281 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -109665,7 +109721,7 @@ void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 272 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 @@ -109768,7 +109824,7 @@ const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 184 /* TypeLiteral */ || input.kind === 197 /* MappedType */) && input.parent.kind !== 262 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 185 /* TypeLiteral */ || input.kind === 198 /* MappedType */) && input.parent.kind !== 263 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -109796,26 +109852,26 @@ } if (isProcessedComponent(input)) { switch (input.kind) { - case 230 /* ExpressionWithTypeArguments */: { + case 231 /* ExpressionWithTypeArguments */: { if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) { checkEntityNameVisibility(input.expression, enclosingDeclaration); } const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); } - case 180 /* TypeReference */: { + case 181 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 173 /* Constructor */: { + case 174 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( /*modifiers*/ ensureModifiers(input), @@ -109825,7 +109881,7 @@ ); return cleanup(ctor); } - case 171 /* MethodDeclaration */: { + case 172 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -109846,7 +109902,7 @@ ); return cleanup(sig); } - case 174 /* GetAccessor */: { + case 175 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -109864,7 +109920,7 @@ void 0 )); } - case 175 /* SetAccessor */: { + case 176 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -109880,7 +109936,7 @@ void 0 )); } - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -109895,7 +109951,7 @@ ensureType(input, input.type), ensureNoInitializer(input) )); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -109909,7 +109965,7 @@ input.questionToken, ensureType(input, input.type) )); - case 170 /* MethodSignature */: { + case 171 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -109926,7 +109982,7 @@ ensureType(input, input.type) )); } - case 176 /* CallSignature */: { + case 177 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -109934,15 +109990,15 @@ ensureType(input, input.type) )); } - case 178 /* IndexSignature */: { + case 179 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), updateParamsList(input, input.parameters), - visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(132 /* AnyKeyword */) )); } - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -109957,7 +110013,7 @@ ensureNoInitializer(input) )); } - case 165 /* TypeParameter */: { + case 166 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration( input, @@ -109971,7 +110027,7 @@ } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 191 /* ConditionalType */: { + case 192 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); const oldEnclosingDecl = enclosingDeclaration; @@ -109985,13 +110041,13 @@ Debug.assert(falseType); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 181 /* FunctionType */: { + case 182 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 182 /* ConstructorType */: { + case 183 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 202 /* ImportType */: { + case 203 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -110031,7 +110087,7 @@ } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 171 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 172 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -110040,7 +110096,7 @@ if (shouldStripInternal(input)) return; switch (input.kind) { - case 275 /* ExportDeclaration */: { + case 276 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -110054,7 +110110,7 @@ getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -110077,7 +110133,7 @@ void 0 ); errorFallbackNode = void 0; - const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(136 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); + const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(137 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); preserveJsDoc(statement, input); removeAllComments(input); return [statement, factory2.updateExportAssignment(input, input.modifiers, newId)]; @@ -110103,10 +110159,10 @@ if (shouldStripInternal(input)) return; switch (input.kind) { - case 268 /* ImportEqualsDeclaration */: { + case 269 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 269 /* ImportDeclaration */: { + case 270 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -110126,7 +110182,7 @@ } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 262 /* TypeAliasDeclaration */: { + case 263 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -110138,7 +110194,7 @@ needsDeclare = previousNeedsDeclare; return clean2; } - case 261 /* InterfaceDeclaration */: { + case 262 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -110148,7 +110204,7 @@ visitNodes2(input.members, visitDeclarationSubtree, isTypeElement) )); } - case 259 /* FunctionDeclaration */: { + case 260 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -110195,7 +110251,7 @@ /*initializer*/ void 0 ); - return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(93 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); + return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(94 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); }); if (!exportMappings.length) { declarations = mapDefined(declarations, (declaration) => factory2.updateModifiers(declaration, 0 /* None */)); @@ -110254,10 +110310,10 @@ return clean2; } } - case 264 /* ModuleDeclaration */: { + case 265 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 265 /* ModuleBlock */) { + if (inner && inner.kind === 266 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; @@ -110301,7 +110357,7 @@ )); } } - case 260 /* ClassDeclaration */: { + case 261 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -110370,7 +110426,7 @@ const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement)); const members = factory2.createNodeArray(memberNodes); const extendsClause = getEffectiveBaseTypeNode(input); - if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) { + if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 105 /* NullKeyword */) { const oldId = input.name ? unescapeLeadingUnderscores(input.name.escapedText) : "default"; const newId = factory2.createUniqueName(`${oldId}_base`, 16 /* Optimistic */); getSymbolAccessibilityDiagnostic = () => ({ @@ -110386,16 +110442,16 @@ /*initializer*/ void 0 ); - const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(136 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); + const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(137 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); const heritageClauses = factory2.createNodeArray(map(input.heritageClauses, (clause) => { - if (clause.token === 94 /* ExtendsKeyword */) { + if (clause.token === 95 /* ExtendsKeyword */) { const oldDiag2 = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]); const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode)))); getSymbolAccessibilityDiagnostic = oldDiag2; return newClause; } - return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); + return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 105 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); })); return [statement, cleanup(factory2.updateClassDeclaration( input, @@ -110417,10 +110473,10 @@ )); } } - case 240 /* VariableStatement */: { + case 241 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 263 /* EnumDeclaration */: { + case 264 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -110437,7 +110493,7 @@ if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 264 /* ModuleDeclaration */) { + if (input.kind === 265 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -110460,7 +110516,7 @@ return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 229 /* OmittedExpression */) { + if (e.kind === 230 /* OmittedExpression */) { return; } if (e.name) { @@ -110520,7 +110576,7 @@ function ensureModifierFlags(node) { let mask2 = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; - const parentIsFile = node.parent.kind === 308 /* SourceFile */; + const parentIsFile = node.parent.kind === 309 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask2 ^= 2 /* Ambient */; additions = 0 /* None */; @@ -110541,12 +110597,12 @@ } function transformHeritageClauses(nodes) { return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => { - return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */; + return isEntityNameExpression(t.expression) || clause.token === 95 /* ExtendsKeyword */ && t.expression.kind === 105 /* NullKeyword */; })), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length)); } } function isAlwaysType(node) { - if (node.kind === 261 /* InterfaceDeclaration */) { + if (node.kind === 262 /* InterfaceDeclaration */) { return true; } return false; @@ -110566,57 +110622,57 @@ } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 174 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 175 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 166 /* Parameter */: - case 257 /* VariableDeclaration */: + case 167 /* Parameter */: + case 258 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 240 /* VariableStatement */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 241 /* VariableStatement */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 177 /* ConstructSignature */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 178 /* IndexSignature */: - case 257 /* VariableDeclaration */: - case 165 /* TypeParameter */: - case 230 /* ExpressionWithTypeArguments */: - case 180 /* TypeReference */: - case 191 /* ConditionalType */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 202 /* ImportType */: + case 178 /* ConstructSignature */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 179 /* IndexSignature */: + case 258 /* VariableDeclaration */: + case 166 /* TypeParameter */: + case 231 /* ExpressionWithTypeArguments */: + case 181 /* TypeReference */: + case 192 /* ConditionalType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 203 /* ImportType */: return true; } return false; @@ -110725,7 +110781,7 @@ } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a2, _b; - const enabledSyntaxKindFeatures = new Array(361 /* Count */); + const enabledSyntaxKindFeatures = new Array(362 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -110804,7 +110860,7 @@ state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 308 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); + (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 309 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); (_b = tracing) == null ? void 0 : _b.pop(); } @@ -111124,7 +111180,7 @@ } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 309 /* Bundle */) { + if (sourceFile.kind === 310 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -111516,8 +111572,8 @@ } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, mapOptions) { const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 309 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 308 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 310 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 309 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -111579,7 +111635,7 @@ writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 308 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 309 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -111948,11 +112004,11 @@ break; } switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return printFile(node); - case 309 /* Bundle */: + case 310 /* Bundle */: return printBundle(node); - case 310 /* UnparsedSource */: + case 311 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -112331,301 +112387,301 @@ return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return emitQualifiedName(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return emitTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return emitParameter(node); - case 167 /* Decorator */: + case 168 /* Decorator */: return emitDecorator(node); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return emitPropertySignature(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 170 /* MethodSignature */: + case 171 /* MethodSignature */: return emitMethodSignature(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return emitConstructor(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return emitAccessorDeclaration(node); - case 176 /* CallSignature */: + case 177 /* CallSignature */: return emitCallSignature(node); - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return emitConstructSignature(node); - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return emitIndexSignature(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return emitTypePredicate(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return emitTypeReference(node); - case 181 /* FunctionType */: + case 182 /* FunctionType */: return emitFunctionType(node); - case 182 /* ConstructorType */: + case 183 /* ConstructorType */: return emitConstructorType(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return emitTypeQuery(node); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return emitTypeLiteral(node); - case 185 /* ArrayType */: + case 186 /* ArrayType */: return emitArrayType(node); - case 186 /* TupleType */: + case 187 /* TupleType */: return emitTupleType(node); - case 187 /* OptionalType */: + case 188 /* OptionalType */: return emitOptionalType(node); - case 189 /* UnionType */: + case 190 /* UnionType */: return emitUnionType(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return emitIntersectionType(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return emitConditionalType(node); - case 192 /* InferType */: + case 193 /* InferType */: return emitInferType(node); - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return emitParenthesizedType(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 194 /* ThisType */: + case 195 /* ThisType */: return emitThisType(); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return emitTypeOperator(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return emitMappedType(node); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return emitLiteralType(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return emitTemplateType(node); - case 201 /* TemplateLiteralTypeSpan */: + case 202 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return emitImportTypeNode(node); - case 203 /* ObjectBindingPattern */: + case 204 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return emitBindingElement(node); - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return emitTemplateSpan(node); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 238 /* Block */: + case 239 /* Block */: return emitBlock(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return emitVariableStatement(node); - case 239 /* EmptyStatement */: + case 240 /* EmptyStatement */: return emitEmptyStatement( /*isEmbeddedStatement*/ false ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return emitExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return emitIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return emitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return emitWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return emitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return emitForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return emitForOfStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return emitContinueStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return emitBreakStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return emitReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return emitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return emitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return emitLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return emitThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return emitTryStatement(node); - case 256 /* DebuggerStatement */: + case 257 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return emitClassDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return emitModuleBlock(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return emitCaseBlock(node); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return emitImportDeclaration(node); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return emitImportClause(node); - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return emitNamespaceImport(node); - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return emitNamespaceExport(node); - case 272 /* NamedImports */: + case 273 /* NamedImports */: return emitNamedImports(node); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return emitImportSpecifier(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return emitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return emitExportDeclaration(node); - case 276 /* NamedExports */: + case 277 /* NamedExports */: return emitNamedExports(node); - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return emitExportSpecifier(node); - case 296 /* AssertClause */: + case 297 /* AssertClause */: return emitAssertClause(node); - case 297 /* AssertEntry */: + case 298 /* AssertEntry */: return emitAssertEntry(node); - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return; - case 280 /* ExternalModuleReference */: + case 281 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 11 /* JsxText */: return emitJsxText(node); - case 283 /* JsxOpeningElement */: - case 286 /* JsxOpeningFragment */: + case 284 /* JsxOpeningElement */: + case 287 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 284 /* JsxClosingElement */: - case 287 /* JsxClosingFragment */: + case 285 /* JsxClosingElement */: + case 288 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return emitJsxAttribute(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return emitJsxAttributes(node); - case 290 /* JsxSpreadAttribute */: + case 291 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return emitJsxExpression(node); - case 292 /* CaseClause */: + case 293 /* CaseClause */: return emitCaseClause(node); - case 293 /* DefaultClause */: + case 294 /* DefaultClause */: return emitDefaultClause(node); - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return emitHeritageClause(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return emitCatchClause(node); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 302 /* EnumMember */: + case 303 /* EnumMember */: return emitEnumMember(node); - case 303 /* UnparsedPrologue */: + case 304 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 310 /* UnparsedSource */: - case 304 /* UnparsedPrepend */: + case 311 /* UnparsedSource */: + case 305 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 305 /* UnparsedText */: - case 306 /* UnparsedInternalText */: + case 306 /* UnparsedText */: + case 307 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 307 /* UnparsedSyntheticReference */: + case 308 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 308 /* SourceFile */: + case 309 /* SourceFile */: return emitSourceFile(node); - case 309 /* Bundle */: + case 310 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 311 /* InputFiles */: + case 312 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 312 /* JSDocTypeExpression */: + case 313 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 313 /* JSDocNameReference */: + case 314 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 315 /* JSDocAllType */: + case 316 /* JSDocAllType */: return writePunctuation("*"); - case 316 /* JSDocUnknownType */: + case 317 /* JSDocUnknownType */: return writePunctuation("?"); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 318 /* JSDocNonNullableType */: + case 319 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 188 /* RestType */: - case 321 /* JSDocVariadicType */: + case 189 /* RestType */: + case 322 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 322 /* JSDocNamepathType */: + case 323 /* JSDocNamepathType */: return; - case 323 /* JSDoc */: + case 324 /* JSDoc */: return emitJSDoc(node); - case 325 /* JSDocTypeLiteral */: + case 326 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 326 /* JSDocSignature */: + case 327 /* JSDocSignature */: return emitJSDocSignature(node); - case 330 /* JSDocTag */: - case 335 /* JSDocClassTag */: - case 340 /* JSDocOverrideTag */: + case 331 /* JSDocTag */: + case 336 /* JSDocClassTag */: + case 341 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 331 /* JSDocAugmentsTag */: - case 332 /* JSDocImplementsTag */: + case 332 /* JSDocAugmentsTag */: + case 333 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 333 /* JSDocAuthorTag */: - case 334 /* JSDocDeprecatedTag */: + case 334 /* JSDocAuthorTag */: + case 335 /* JSDocDeprecatedTag */: return; - case 336 /* JSDocPublicTag */: - case 337 /* JSDocPrivateTag */: - case 338 /* JSDocProtectedTag */: - case 339 /* JSDocReadonlyTag */: + case 337 /* JSDocPublicTag */: + case 338 /* JSDocPrivateTag */: + case 339 /* JSDocProtectedTag */: + case 340 /* JSDocReadonlyTag */: return; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return emitJSDocOverloadTag(node); - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 343 /* JSDocEnumTag */: - case 345 /* JSDocReturnTag */: - case 346 /* JSDocThisTag */: - case 347 /* JSDocTypeTag */: - case 352 /* JSDocThrowsTag */: - case 353 /* JSDocSatisfiesTag */: + case 344 /* JSDocEnumTag */: + case 346 /* JSDocReturnTag */: + case 347 /* JSDocThisTag */: + case 348 /* JSDocTypeTag */: + case 353 /* JSDocThrowsTag */: + case 354 /* JSDocSatisfiesTag */: return emitJSDocSimpleTypedTag(node); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 350 /* JSDocSeeTag */: + case 351 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 355 /* NotEmittedStatement */: - case 359 /* EndOfDeclarationMarker */: - case 358 /* MergeDeclarationMarker */: + case 356 /* NotEmittedStatement */: + case 360 /* EndOfDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return; } if (isExpression(node)) { @@ -112658,86 +112714,86 @@ return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return emitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return emitNewExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return emitFunctionExpression(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return emitArrowFunction(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return emitDeleteExpression(node); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return emitVoidExpression(node); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return emitAwaitExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return emitBinaryExpression(node); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return emitConditionalExpression(node); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return emitTemplateExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return emitYieldExpression(node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return emitSpreadElement(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return emitClassExpression(node); - case 229 /* OmittedExpression */: + case 230 /* OmittedExpression */: return; - case 231 /* AsExpression */: + case 232 /* AsExpression */: return emitAsExpression(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return emitNonNullExpression(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return emitMetaProperty(node); - case 234 /* SyntheticExpression */: + case 235 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return; - case 281 /* JsxElement */: + case 282 /* JsxElement */: return emitJsxElement(node); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return emitJsxFragment(node); - case 354 /* SyntaxList */: + case 355 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 355 /* NotEmittedStatement */: + case 356 /* NotEmittedStatement */: return; - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return emitCommaList(node); - case 358 /* MergeDeclarationMarker */: - case 359 /* EndOfDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return; - case 360 /* SyntheticReferenceExpression */: + case 361 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -112783,7 +112839,7 @@ } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 309 /* Bundle */ ? node : void 0; + const bundle = node.kind === 310 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -112858,7 +112914,7 @@ updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 305 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 306 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -112894,7 +112950,7 @@ } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 239 /* EmptyStatement */, + node.kind === 240 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -112966,7 +113022,7 @@ emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 320 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 321 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -113042,7 +113098,7 @@ /*allowDecorators*/ true ); - const token = node.kind === 174 /* GetAccessor */ ? 137 /* GetKeyword */ : 151 /* SetKeyword */; + const token = node.kind === 175 /* GetAccessor */ ? 138 /* GetKeyword */ : 152 /* SetKeyword */; emitTokenWithComment(token, pos, writeKeyword, node); writeSpace(); emit(node.name); @@ -113224,7 +113280,7 @@ function emitTypeOperator(node) { writeTokenText(node.operator, writeKeyword); writeSpace(); - const parenthesizerRule = node.operator === 146 /* ReadonlyKeyword */ ? parenthesizer.parenthesizeOperandOfReadonlyTypeOperator : parenthesizer.parenthesizeOperandOfTypeOperator; + const parenthesizerRule = node.operator === 147 /* ReadonlyKeyword */ ? parenthesizer.parenthesizeOperandOfReadonlyTypeOperator : parenthesizer.parenthesizeOperandOfTypeOperator; emit(node.type, parenthesizerRule); } function emitIndexedAccessType(node) { @@ -113244,7 +113300,7 @@ } if (node.readonlyToken) { emit(node.readonlyToken); - if (node.readonlyToken.kind !== 146 /* ReadonlyKeyword */) { + if (node.readonlyToken.kind !== 147 /* ReadonlyKeyword */) { writeKeyword("readonly"); } writeSpace(); @@ -113423,7 +113479,7 @@ emitExpressionList(node, node.arguments, 2576 /* CallExpressionArguments */, parenthesizer.parenthesizeExpressionForDisallowedComma); } function emitNewExpression(node) { - emitTokenWithComment(103 /* NewKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(104 /* NewKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfNew); emitTypeArguments(node, node.typeArguments); @@ -113479,22 +113535,22 @@ emit(node.equalsGreaterThanToken); } function emitDeleteExpression(node) { - emitTokenWithComment(89 /* DeleteKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(90 /* DeleteKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitTypeOfExpression(node) { - emitTokenWithComment(112 /* TypeOfKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(113 /* TypeOfKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitVoidExpression(node) { - emitTokenWithComment(114 /* VoidKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(115 /* VoidKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitAwaitExpression(node) { - emitTokenWithComment(133 /* AwaitKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(134 /* AwaitKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } @@ -113507,7 +113563,7 @@ } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 221 /* PrefixUnaryExpression */ && (node.operator === 39 /* PlusToken */ && (operand.operator === 39 /* PlusToken */ || operand.operator === 45 /* PlusPlusToken */) || node.operator === 40 /* MinusToken */ && (operand.operator === 40 /* MinusToken */ || operand.operator === 46 /* MinusMinusToken */)); + return operand.kind === 222 /* PrefixUnaryExpression */ && (node.operator === 39 /* PlusToken */ && (operand.operator === 39 /* PlusToken */ || operand.operator === 45 /* PlusPlusToken */) || node.operator === 40 /* MinusToken */ && (operand.operator === 40 /* MinusToken */ || operand.operator === 46 /* MinusMinusToken */)); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary); @@ -113560,7 +113616,7 @@ const linesAfterOperator = getLinesBetweenNodes(node, operatorToken, node.right); writeLinesAndIndent(linesBeforeOperator, isCommaOperator); emitLeadingCommentsOfPosition(operatorToken.pos); - writeTokenNode(operatorToken, operatorToken.kind === 101 /* InKeyword */ ? writeKeyword : writeOperator); + writeTokenNode(operatorToken, operatorToken.kind === 102 /* InKeyword */ ? writeKeyword : writeOperator); emitTrailingCommentsOfPosition( operatorToken.end, /*prefixSpace*/ @@ -113651,7 +113707,7 @@ emitList(node, node.templateSpans, 262144 /* TemplateExpressionSpans */); } function emitYieldExpression(node) { - emitTokenWithComment(125 /* YieldKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(126 /* YieldKeyword */, node.pos, writeKeyword, node); emit(node.asteriskToken); emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsiAndDisallowedComma); } @@ -113757,7 +113813,7 @@ } } function emitIfStatement(node) { - const openParenPos = emitTokenWithComment(99 /* IfKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(100 /* IfKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -113765,8 +113821,8 @@ emitEmbeddedStatement(node, node.thenStatement); if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); - emitTokenWithComment(91 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 242 /* IfStatement */) { + emitTokenWithComment(92 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); + if (node.elseStatement.kind === 243 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -113775,14 +113831,14 @@ } } function emitWhileClause(node, startPos) { - const openParenPos = emitTokenWithComment(115 /* WhileKeyword */, startPos, writeKeyword, node); + const openParenPos = emitTokenWithComment(116 /* WhileKeyword */, startPos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); } function emitDoStatement(node) { - emitTokenWithComment(90 /* DoKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(91 /* DoKeyword */, node.pos, writeKeyword, node); emitEmbeddedStatement(node, node.statement); if (isBlock(node.statement) && !preserveSourceNewlines) { writeSpace(); @@ -113797,7 +113853,7 @@ emitEmbeddedStatement(node, node.statement); } function emitForStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); let pos = emitTokenWithComment( 20 /* OpenParenToken */, @@ -113815,25 +113871,25 @@ emitEmbeddedStatement(node, node.statement); } function emitForInStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(101 /* InKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(102 /* InKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); emitEmbeddedStatement(node, node.statement); } function emitForOfStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); emitWithTrailingSpace(node.awaitModifier); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(162 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(163 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -113841,7 +113897,7 @@ } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 258 /* VariableDeclarationList */) { + if (node.kind === 259 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -113849,12 +113905,12 @@ } } function emitContinueStatement(node) { - emitTokenWithComment(86 /* ContinueKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(87 /* ContinueKeyword */, node.pos, writeKeyword, node); emitWithLeadingSpace(node.label); writeTrailingSemicolon(); } function emitBreakStatement(node) { - emitTokenWithComment(81 /* BreakKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(82 /* BreakKeyword */, node.pos, writeKeyword, node); emitWithLeadingSpace(node.label); writeTrailingSemicolon(); } @@ -113877,7 +113933,7 @@ } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 291 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 292 /* JsxExpression */; emitTrailingCommentsOfPosition( pos, /*prefixSpace*/ @@ -113925,7 +113981,7 @@ } function emitReturnStatement(node) { emitTokenWithComment( - 105 /* ReturnKeyword */, + 106 /* ReturnKeyword */, node.pos, writeKeyword, /*contextNode*/ @@ -113935,7 +113991,7 @@ writeTrailingSemicolon(); } function emitWithStatement(node) { - const openParenPos = emitTokenWithComment(116 /* WithKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(117 /* WithKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -113943,7 +113999,7 @@ emitEmbeddedStatement(node, node.statement); } function emitSwitchStatement(node) { - const openParenPos = emitTokenWithComment(107 /* SwitchKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(108 /* SwitchKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -113958,12 +114014,12 @@ emit(node.statement); } function emitThrowStatement(node) { - emitTokenWithComment(109 /* ThrowKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(110 /* ThrowKeyword */, node.pos, writeKeyword, node); emitExpressionWithLeadingSpace(parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi); writeTrailingSemicolon(); } function emitTryStatement(node) { - emitTokenWithComment(111 /* TryKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(112 /* TryKeyword */, node.pos, writeKeyword, node); writeSpace(); emit(node.tryBlock); if (node.catchClause) { @@ -113972,13 +114028,13 @@ } if (node.finallyBlock) { writeLineOrSpace(node, node.catchClause || node.tryBlock, node.finallyBlock); - emitTokenWithComment(96 /* FinallyKeyword */, (node.catchClause || node.tryBlock).end, writeKeyword, node); + emitTokenWithComment(97 /* FinallyKeyword */, (node.catchClause || node.tryBlock).end, writeKeyword, node); writeSpace(); emit(node.finallyBlock); } } function emitDebuggerStatement(node) { - writeToken(87 /* DebuggerKeyword */, node.pos, writeKeyword); + writeToken(88 /* DebuggerKeyword */, node.pos, writeKeyword); writeTrailingSemicolon(); } function emitVariableDeclaration(node) { @@ -114116,7 +114172,7 @@ /*allowDecorators*/ true ); - emitTokenWithComment(84 /* ClassKeyword */, moveRangePastModifiers(node).pos, writeKeyword, node); + emitTokenWithComment(85 /* ClassKeyword */, moveRangePastModifiers(node).pos, writeKeyword, node); if (node.name) { writeSpace(); emitIdentifierName(node.name); @@ -114243,10 +114299,10 @@ /*allowDecorators*/ false ); - emitTokenWithComment(100 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); + emitTokenWithComment(101 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); writeSpace(); if (node.isTypeOnly) { - emitTokenWithComment(154 /* TypeKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(155 /* TypeKeyword */, node.pos, writeKeyword, node); writeSpace(); } emit(node.name); @@ -114270,12 +114326,12 @@ /*allowDecorators*/ false ); - emitTokenWithComment(100 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); + emitTokenWithComment(101 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); writeSpace(); if (node.importClause) { emit(node.importClause); writeSpace(); - emitTokenWithComment(158 /* FromKeyword */, node.importClause.end, writeKeyword, node); + emitTokenWithComment(159 /* FromKeyword */, node.importClause.end, writeKeyword, node); writeSpace(); } emitExpression(node.moduleSpecifier); @@ -114286,7 +114342,7 @@ } function emitImportClause(node) { if (node.isTypeOnly) { - emitTokenWithComment(154 /* TypeKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(155 /* TypeKeyword */, node.pos, writeKeyword, node); writeSpace(); } emit(node.name); @@ -114299,7 +114355,7 @@ function emitNamespaceImport(node) { const asPos = emitTokenWithComment(41 /* AsteriskToken */, node.pos, writePunctuation, node); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, asPos, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, asPos, writeKeyword, node); writeSpace(); emit(node.name); } @@ -114310,12 +114366,12 @@ emitImportOrExportSpecifier(node); } function emitExportAssignment(node) { - const nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + const nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.isExportEquals) { emitTokenWithComment(63 /* EqualsToken */, nextPos, writeOperator, node); } else { - emitTokenWithComment(88 /* DefaultKeyword */, nextPos, writeKeyword, node); + emitTokenWithComment(89 /* DefaultKeyword */, nextPos, writeKeyword, node); } writeSpace(); emitExpression(node.expression, node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(63 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault); @@ -114328,10 +114384,10 @@ /*allowDecorators*/ false ); - let nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + let nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.isTypeOnly) { - nextPos = emitTokenWithComment(154 /* TypeKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(155 /* TypeKeyword */, nextPos, writeKeyword, node); writeSpace(); } if (node.exportClause) { @@ -114342,7 +114398,7 @@ if (node.moduleSpecifier) { writeSpace(); const fromPos = node.exportClause ? node.exportClause.end : nextPos; - emitTokenWithComment(158 /* FromKeyword */, fromPos, writeKeyword, node); + emitTokenWithComment(159 /* FromKeyword */, fromPos, writeKeyword, node); writeSpace(); emitExpression(node.moduleSpecifier); } @@ -114352,7 +114408,7 @@ writeTrailingSemicolon(); } function emitAssertClause(node) { - emitTokenWithComment(130 /* AssertKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(131 /* AssertKeyword */, node.pos, writeKeyword, node); writeSpace(); const elements = node.elements; emitList(node, elements, 526226 /* ImportClauseEntries */); @@ -114369,11 +114425,11 @@ emit(value); } function emitNamespaceExportDeclaration(node) { - let nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + let nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); - nextPos = emitTokenWithComment(128 /* AsKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(129 /* AsKeyword */, nextPos, writeKeyword, node); writeSpace(); - nextPos = emitTokenWithComment(143 /* NamespaceKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(144 /* NamespaceKeyword */, nextPos, writeKeyword, node); writeSpace(); emit(node.name); writeTrailingSemicolon(); @@ -114381,7 +114437,7 @@ function emitNamespaceExport(node) { const asPos = emitTokenWithComment(41 /* AsteriskToken */, node.pos, writePunctuation, node); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, asPos, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, asPos, writeKeyword, node); writeSpace(); emit(node.name); } @@ -114404,7 +114460,7 @@ if (node.propertyName) { emit(node.propertyName); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, node.propertyName.end, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, node.propertyName.end, writeKeyword, node); writeSpace(); } emit(node.name); @@ -114507,13 +114563,13 @@ } } function emitCaseClause(node) { - emitTokenWithComment(82 /* CaseKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(83 /* CaseKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma); emitCaseOrDefaultClauseRest(node, node.statements, node.expression.end); } function emitDefaultClause(node) { - const pos = emitTokenWithComment(88 /* DefaultKeyword */, node.pos, writeKeyword, node); + const pos = emitTokenWithComment(89 /* DefaultKeyword */, node.pos, writeKeyword, node); emitCaseOrDefaultClauseRest(node, node.statements, pos); } function emitCaseOrDefaultClauseRest(parentNode, statements, colonPos) { @@ -114536,7 +114592,7 @@ emitList(node, node.types, 528 /* HeritageClauseTypes */); } function emitCatchClause(node) { - const openParenPos = emitTokenWithComment(83 /* CatchKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(84 /* CatchKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.variableDeclaration) { emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); @@ -114592,7 +114648,7 @@ } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 347 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 348 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -114636,7 +114692,7 @@ function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 312 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 313 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -114654,7 +114710,7 @@ emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 325 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 326 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -115537,7 +115593,7 @@ return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 214 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 215 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -115620,84 +115676,84 @@ if (!node) return; switch (node.kind) { - case 238 /* Block */: + case 239 /* Block */: forEach(node.statements, generateNames); break; - case 253 /* LabeledStatement */: - case 251 /* WithStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 254 /* LabeledStatement */: + case 252 /* WithStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: generateNames(node.statement); break; - case 242 /* IfStatement */: + case 243 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 295 /* CatchClause */: + case 296 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: generateNames(node.declarationList); break; - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: generateNames(node.importClause); break; - case 270 /* ImportClause */: + case 271 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: forEach(node.elements, generateNames); break; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -115706,12 +115762,12 @@ if (!node) return; switch (node.kind) { - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -115970,16 +116026,16 @@ prefix, suffix ); - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: { + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: { Debug.assert(!prefix && !suffix && !privateName); const name = node.name; if (name && !isGeneratedIdentifier(name)) { @@ -115994,17 +116050,17 @@ } return generateNameForExportDefault(); } - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return makeTempVariableName( 0 /* Auto */, /*reserveInNestedScopes*/ @@ -116098,7 +116154,7 @@ emitLeadingComments( pos, /*isEmittedNode*/ - node.kind !== 355 /* NotEmittedStatement */ + node.kind !== 356 /* NotEmittedStatement */ ); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) { @@ -116106,7 +116162,7 @@ } if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 258 /* VariableDeclarationList */) { + if (node.kind === 259 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -116122,7 +116178,7 @@ containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 356 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -116394,7 +116450,7 @@ } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 356 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 128 /* NoNestedSourceMaps */) { @@ -116409,7 +116465,7 @@ if (emitFlags & 128 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 356 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -117795,6 +117851,7 @@ const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions; const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3 } = createProgramOptions; let { oldProgram } = createProgramOptions; + const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations)); let processingDefaultLibFiles; let processingOtherFiles; let files; @@ -118928,89 +118985,89 @@ return diagnostics; function walk(node, parent2) { switch (parent2.kind) { - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: if (parent2.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 257 /* VariableDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 258 /* VariableDeclaration */: if (parent2.type === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); return "skip"; } } switch (node.kind) { - case 270 /* ImportClause */: + case 271 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? "import...type" : "export...type")); return "skip"; } break; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: const heritageClause = node; - if (heritageClause.token === 117 /* ImplementsKeyword */) { + if (heritageClause.token === 118 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 261 /* InterfaceDeclaration */: - const interfaceKeyword = tokenToString(118 /* InterfaceKeyword */); + case 262 /* InterfaceDeclaration */: + const interfaceKeyword = tokenToString(119 /* InterfaceKeyword */); Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); return "skip"; - case 264 /* ModuleDeclaration */: - const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(143 /* NamespaceKeyword */) : tokenToString(142 /* ModuleKeyword */); + case 265 /* ModuleDeclaration */: + const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(144 /* NamespaceKeyword */) : tokenToString(143 /* ModuleKeyword */); Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); return "skip"; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 263 /* EnumDeclaration */: - const enumKeyword = Debug.checkDefined(tokenToString(92 /* EnumKeyword */)); + case 264 /* EnumDeclaration */: + const enumKeyword = Debug.checkDefined(tokenToString(93 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); return "skip"; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 231 /* AsExpression */: + case 232 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: Debug.fail(); } } @@ -119045,47 +119102,47 @@ } } switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: if (nodes === parent2.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 240 /* VariableStatement */); + checkModifiers(parent2.modifiers, parent2.kind === 241 /* VariableStatement */); return "skip"; } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (nodes === parent2.modifiers) { for (const modifier of nodes) { - if (isModifier(modifier) && modifier.kind !== 124 /* StaticKeyword */ && modifier.kind !== 127 /* AccessorKeyword */) { + if (isModifier(modifier) && modifier.kind !== 125 /* StaticKeyword */ && modifier.kind !== 128 /* AccessorKeyword */) { diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); } } return "skip"; } break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (nodes === parent2.modifiers && some(nodes, isModifier)) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: - case 212 /* TaggedTemplateExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 213 /* TaggedTemplateExpression */: if (nodes === parent2.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -119096,25 +119153,25 @@ function checkModifiers(modifiers, isConstValid) { for (const modifier of modifiers) { switch (modifier.kind) { - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: if (isConstValid) { continue; } - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 136 /* DeclareKeyword */: - case 126 /* AbstractKeyword */: - case 161 /* OverrideKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 137 /* DeclareKeyword */: + case 127 /* AbstractKeyword */: + case 162 /* OverrideKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); break; - case 124 /* StaticKeyword */: - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: - case 127 /* AccessorKeyword */: + case 125 /* StaticKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: + case 128 /* AccessorKeyword */: } } } @@ -120221,127 +120278,131 @@ } } } - function getVersionForDeprecationDiagnostics(reportInvalidIgnoreDeprecations) { - const version2 = typeScriptVersion3 || versionMajorMinor; + function getIgnoreDeprecationsVersion() { const ignoreDeprecations = options.ignoreDeprecations; if (ignoreDeprecations) { - if (ignoreDeprecations === "5.0" /* v5_0 */ && version2.startsWith("5.")) { - return; - } else if (reportInvalidIgnoreDeprecations) { - createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations); + if (ignoreDeprecations === "5.0") { + return new Version(ignoreDeprecations); } + reportInvalidIgnoreDeprecations(); } - return version2; + return Version.zero; } - function verifyDeprecatedCompilerOptions() { - const version2 = getVersionForDeprecationDiagnostics( - /*reportInvalidIgnoreDeprecations*/ - true - ); - if (!version2) - return; - if (options.target === 0 /* ES3 */) { - createDeprecatedDiagnosticForOption(version2, "target", "ES3"); + function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn) { + const deprecatedInVersion = new Version(deprecatedIn); + const removedInVersion = new Version(removedIn); + const typescriptVersion = new Version(typeScriptVersion3 || versionMajorMinor); + const ignoreDeprecationsVersion = getIgnoreDeprecationsVersion(); + const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */); + const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1 /* LessThan */; + if (mustBeRemoved || canBeSilenced) { + fn((name, value, useInstead) => { + if (mustBeRemoved) { + if (value === void 0) { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name); + } else { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value); + } + } else { + if (value === void 0) { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn); + } else { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn); + } + } + }); } - if (options.noImplicitUseStrict) { - createDeprecatedDiagnosticForOption(version2, "noImplicitUseStrict"); - } - if (options.keyofStringsOnly) { - createDeprecatedDiagnosticForOption(version2, "keyofStringsOnly"); - } - if (options.suppressExcessPropertyErrors) { - createDeprecatedDiagnosticForOption(version2, "suppressExcessPropertyErrors"); - } - if (options.suppressImplicitAnyIndexErrors) { - createDeprecatedDiagnosticForOption(version2, "suppressImplicitAnyIndexErrors"); - } - if (options.noStrictGenericChecks) { - createDeprecatedDiagnosticForOption(version2, "noStrictGenericChecks"); - } - if (options.charset) { - createDeprecatedDiagnosticForOption(version2, "charset"); - } - if (options.out) { - createDeprecatedDiagnosticForOption(version2, "out"); - } - if (options.importsNotUsedAsValues) { - createDeprecatedDiagnosticForOption( - version2, - "importsNotUsedAsValues", - /*value*/ - void 0, - "verbatimModuleSyntax" - ); - } - if (options.preserveValueImports) { - createDeprecatedDiagnosticForOption( - version2, - "preserveValueImports", - /*value*/ - void 0, - "verbatimModuleSyntax" - ); - } } - function verifyDeprecatedProjectReference(ref, parentFile, index) { - if (ref.prepend) { - const version2 = getVersionForDeprecationDiagnostics( - /*reportInvalidIgnoreDeprecations*/ - false - ); - if (version2) { - createDeprecatedOptionForVersionDiagnostic( - version2, - (message, arg0, arg1, arg2) => createDiagnosticForReference(parentFile, index, message, arg0, arg1, arg2), - "prepend" + function verifyDeprecatedCompilerOptions() { + function createDiagnostic(name, value, useInstead, message, arg0, arg1, arg2, arg3) { + if (useInstead) { + const details = chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.Use_0_instead, + useInstead ); + const chain = chainDiagnosticMessages(details, message, arg0, arg1, arg2, arg3); + createDiagnosticForOption( + /*onKey*/ + !value, + name, + /*option2*/ + void 0, + chain + ); + } else { + createDiagnosticForOption( + /*onKey*/ + !value, + name, + /*option2*/ + void 0, + message, + arg0, + arg1, + arg2, + arg3 + ); } } + checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { + if (options.target === 0 /* ES3 */) { + createDeprecatedDiagnostic("target", "ES3"); + } + if (options.noImplicitUseStrict) { + createDeprecatedDiagnostic("noImplicitUseStrict"); + } + if (options.keyofStringsOnly) { + createDeprecatedDiagnostic("keyofStringsOnly"); + } + if (options.suppressExcessPropertyErrors) { + createDeprecatedDiagnostic("suppressExcessPropertyErrors"); + } + if (options.suppressImplicitAnyIndexErrors) { + createDeprecatedDiagnostic("suppressImplicitAnyIndexErrors"); + } + if (options.noStrictGenericChecks) { + createDeprecatedDiagnostic("noStrictGenericChecks"); + } + if (options.charset) { + createDeprecatedDiagnostic("charset"); + } + if (options.out) { + createDeprecatedDiagnostic( + "out", + /*value*/ + void 0, + "outFile" + ); + } + if (options.importsNotUsedAsValues) { + createDeprecatedDiagnostic( + "importsNotUsedAsValues", + /*value*/ + void 0, + "verbatimModuleSyntax" + ); + } + if (options.preserveValueImports) { + createDeprecatedDiagnostic( + "preserveValueImports", + /*value*/ + void 0, + "verbatimModuleSyntax" + ); + } + }); } - function createDeprecatedDiagnosticForOption(version2, name, value, useInstead) { - return createDeprecatedOptionForVersionDiagnostic( - version2, - (message, arg0, arg1, arg2) => { - if (useInstead) { - const details = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Use_0_instead, - useInstead - ); - const chain = chainDiagnosticMessages(details, message, arg0, arg1, arg2); - createDiagnosticForOption( - /*onKey*/ - !value, - name, - /*option2*/ - void 0, - chain - ); - } else { - createDiagnosticForOption( - /*onKey*/ - !value, - name, - /*option2*/ - void 0, - message, - arg0, - arg1, - arg2 - ); - } - }, - name, - value - ); - } - function createDeprecatedOptionForVersionDiagnostic(version2, createDiagnostic, name, value) { - if (version2 === "6.0" /* v6_0 */) { - createDiagnostic(Diagnostics.Flag_0_is_deprecated_Please_remove_it_from_your_configuration, value || name); - } else { - createDiagnostic(Diagnostics.Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, value || name, "5.5" /* v5_5 */, "5.0" /* v5_0 */); + function verifyDeprecatedProjectReference(ref, parentFile, index) { + function createDiagnostic(_name, _value, _useInstead, message, arg0, arg1, arg2, arg3) { + createDiagnosticForReference(parentFile, index, message, arg0, arg1, arg2, arg3); } + checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { + if (ref.prepend) { + createDeprecatedDiagnostic("prepend"); + } + }); } function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) { var _a3; @@ -120594,25 +120655,25 @@ arg1 ); } - function createDiagnosticForReference(sourceFile, index, message, arg0, arg1, arg2) { + function createDiagnosticForReference(sourceFile, index, message, arg0, arg1, arg2, arg3) { const referencesSyntax = firstDefined( getTsConfigPropArray(sourceFile || options.configFile, "references"), (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 ); if (referencesSyntax && referencesSyntax.elements.length > index) { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, arg0, arg1, arg2)); + programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, arg0, arg1, arg2, arg3)); } else { - programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2)); + programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2, arg3)); } } - function createDiagnosticForOption(onKey, option1, option2, message, arg0, arg1, arg2) { + function createDiagnosticForOption(onKey, option1, option2, message, arg0, arg1, arg2, arg3) { const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax(); - const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, arg0, arg1, arg2); + const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, arg0, arg1, arg2, arg3); if (needCompilerDiagnostic) { if ("messageText" in message) { programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message)); } else { - programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2)); + programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2, arg3)); } } } @@ -120631,13 +120692,13 @@ } return _compilerOptionsObjectLiteralSyntax || void 0; } - function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, arg0, arg1, arg2) { + function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, arg0, arg1, arg2, arg3) { const props = getPropertyAssignment(objectLiteral, key1, key2); for (const prop of props) { if ("messageText" in message) { programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message)); } else { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, arg0, arg1, arg2)); + programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, arg0, arg1, arg2, arg3)); } } return !!props.length; @@ -127551,36 +127612,36 @@ })(SemanticMeaning || {}); function getMeaningFromDeclaration(node) { switch (node.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 295 /* CatchClause */: - case 288 /* JsxAttribute */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 296 /* CatchClause */: + case 289 /* JsxAttribute */: return 1 /* Value */; - case 165 /* TypeParameter */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 184 /* TypeLiteral */: + case 166 /* TypeParameter */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 185 /* TypeLiteral */: return 2 /* Type */; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 302 /* EnumMember */: - case 260 /* ClassDeclaration */: + case 303 /* EnumMember */: + case 261 /* ClassDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -127588,15 +127649,15 @@ } else { return 4 /* Namespace */; } - case 263 /* EnumDeclaration */: - case 272 /* NamedImports */: - case 273 /* ImportSpecifier */: - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 264 /* EnumDeclaration */: + case 273 /* NamedImports */: + case 274 /* ImportSpecifier */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: return 7 /* All */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 7 /* All */; @@ -127604,7 +127665,7 @@ function getMeaningFromLocation(node) { node = getAdjustedReferenceLocation(node); const parent2 = node.parent; - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return 1 /* Value */; } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7 /* All */; @@ -127628,11 +127689,11 @@ } } function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 163 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 268 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; + const name = node.kind === 164 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; + return name && name.parent.kind === 269 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; } function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 163 /* QualifiedName */) { + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -127643,26 +127704,26 @@ function isQualifiedNameNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 163 /* QualifiedName */) { - while (root.parent && root.parent.kind === 163 /* QualifiedName */) { + if (root.parent.kind === 164 /* QualifiedName */) { + while (root.parent && root.parent.kind === 164 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 180 /* TypeReference */ && !isLastClause; + return root.parent.kind === 181 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 208 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 208 /* PropertyAccessExpression */) { + if (root.parent.kind === 209 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 209 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 230 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 294 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 231 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 295 /* HeritageClause */) { const decl = root.parent.parent.parent; - return decl.kind === 260 /* ClassDeclaration */ && root.parent.parent.token === 117 /* ImplementsKeyword */ || decl.kind === 261 /* InterfaceDeclaration */ && root.parent.parent.token === 94 /* ExtendsKeyword */; + return decl.kind === 261 /* ClassDeclaration */ && root.parent.parent.token === 118 /* ImplementsKeyword */ || decl.kind === 262 /* InterfaceDeclaration */ && root.parent.parent.token === 95 /* ExtendsKeyword */; } return false; } @@ -127671,17 +127732,17 @@ node = node.parent; } switch (node.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return !isExpressionNode(node); - case 194 /* ThisType */: + case 195 /* ThisType */: return true; } switch (node.parent.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return true; - case 202 /* ImportType */: + case 203 /* ImportType */: return !node.parent.isTypeOf; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isPartOfTypeNode(node.parent); } return false; @@ -127728,7 +127789,7 @@ } function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 253 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { + if (referenceNode.kind === 254 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -127778,22 +127839,22 @@ } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 299 /* PropertyAssignment */: - case 302 /* EnumMember */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 264 /* ModuleDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 300 /* PropertyAssignment */: + case 303 /* EnumMember */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 265 /* ModuleDeclaration */: return getNameOfDeclaration(node.parent) === node; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return true; - case 198 /* LiteralType */: - return node.parent.parent.kind === 196 /* IndexedAccessType */; + case 199 /* LiteralType */: + return node.parent.parent.kind === 197 /* IndexedAccessType */; default: return false; } @@ -127811,83 +127872,83 @@ return void 0; } switch (node.kind) { - case 308 /* SourceFile */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 264 /* ModuleDeclaration */: + case 309 /* SourceFile */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: return node; } } } function getNodeKind(node) { switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return "module" /* moduleElement */; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return "class" /* classElement */; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; - case 262 /* TypeAliasDeclaration */: - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: + case 263 /* TypeAliasDeclaration */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: return "type" /* typeElement */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return "enum" /* enumElement */; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return "function" /* functionElement */; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return "getter" /* memberGetAccessorElement */; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return "setter" /* memberSetAccessorElement */; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return "method" /* memberFunctionElement */; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: const { initializer } = node; return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return "property" /* memberVariableElement */; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return "index" /* indexSignatureElement */; - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return "construct" /* constructSignatureElement */; - case 176 /* CallSignature */: + case 177 /* CallSignature */: return "call" /* callSignatureElement */; - case 173 /* Constructor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 173 /* ClassStaticBlockDeclaration */: return "constructor" /* constructorImplementationElement */; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return "type parameter" /* typeParameterElement */; - case 302 /* EnumMember */: + case 303 /* EnumMember */: return "enum member" /* enumMemberElement */; - case 166 /* Parameter */: + case 167 /* Parameter */: return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: - case 271 /* NamespaceImport */: - case 277 /* NamespaceExport */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: + case 272 /* NamespaceImport */: + case 278 /* NamespaceExport */: return "alias" /* alias */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const kind = getAssignmentDeclarationKind(node); const { right } = node; switch (kind) { @@ -127915,7 +127976,7 @@ } case 79 /* Identifier */: return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: const scriptKind = getNodeKind(node.expression); return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: @@ -127927,10 +127988,10 @@ } function isThis(node) { switch (node.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return true; case 79 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 166 /* Parameter */; + return identifierIsThisKeyword(node) && node.parent.kind === 167 /* Parameter */; default: return false; } @@ -127979,41 +128040,41 @@ return false; } switch (n.kind) { - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 203 /* ObjectBindingPattern */: - case 184 /* TypeLiteral */: - case 238 /* Block */: - case 265 /* ModuleBlock */: - case 266 /* CaseBlock */: - case 272 /* NamedImports */: - case 276 /* NamedExports */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 185 /* TypeLiteral */: + case 239 /* Block */: + case 266 /* ModuleBlock */: + case 267 /* CaseBlock */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: return nodeEndsWith(n, 19 /* CloseBraceToken */, sourceFile); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 211 /* NewExpression */: + case 212 /* NewExpression */: if (!n.arguments) { return true; } - case 210 /* CallExpression */: - case 214 /* ParenthesizedExpression */: - case 193 /* ParenthesizedType */: + case 211 /* CallExpression */: + case 215 /* ParenthesizedExpression */: + case 194 /* ParenthesizedType */: return nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 177 /* ConstructSignature */: - case 176 /* CallSignature */: - case 216 /* ArrowFunction */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 178 /* ConstructSignature */: + case 177 /* CallSignature */: + case 217 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -128021,60 +128082,60 @@ return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 21 /* CloseParenToken */, sourceFile); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return !!n.body && isCompletedNode(n.body, sourceFile); - case 242 /* IfStatement */: + case 243 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 26 /* SemicolonToken */, sourceFile); - case 206 /* ArrayLiteralExpression */: - case 204 /* ArrayBindingPattern */: - case 209 /* ElementAccessExpression */: - case 164 /* ComputedPropertyName */: - case 186 /* TupleType */: + case 207 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 210 /* ElementAccessExpression */: + case 165 /* ComputedPropertyName */: + case 187 /* TupleType */: return nodeEndsWith(n, 23 /* CloseBracketToken */, sourceFile); - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 23 /* CloseBracketToken */, sourceFile); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return false; - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 244 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 245 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 243 /* DoStatement */: - return hasChildOfKind(n, 115 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 183 /* TypeQuery */: + case 244 /* DoStatement */: + return hasChildOfKind(n, 116 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); + case 184 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 218 /* TypeOfExpression */: - case 217 /* DeleteExpression */: - case 219 /* VoidExpression */: - case 226 /* YieldExpression */: - case 227 /* SpreadElement */: + case 219 /* TypeOfExpression */: + case 218 /* DeleteExpression */: + case 220 /* VoidExpression */: + case 227 /* YieldExpression */: + case 228 /* SpreadElement */: const unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: const lastSpan = lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return nodeIsPresent(n.literal); - case 275 /* ExportDeclaration */: - case 269 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: return nodeIsPresent(n.moduleSpecifier); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -128116,13 +128177,13 @@ return syntaxList; } function isDefaultModifier2(node) { - return node.kind === 88 /* DefaultKeyword */; + return node.kind === 89 /* DefaultKeyword */; } function isClassKeyword(node) { - return node.kind === 84 /* ClassKeyword */; + return node.kind === 85 /* ClassKeyword */; } function isFunctionKeyword(node) { - return node.kind === 98 /* FunctionKeyword */; + return node.kind === 99 /* FunctionKeyword */; } function getAdjustedLocationForClass(node) { if (isNamedDeclaration(node)) { @@ -128176,13 +128237,13 @@ function getAdjustedLocationForDeclaration(node, forRename) { if (!forRename) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return getAdjustedLocationForClass(node); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return getAdjustedLocationForFunction(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return node; } } @@ -128237,19 +128298,19 @@ } function getAdjustedLocation(node, forRename) { const { parent: parent2 } = node; - if (isModifier(node) && (forRename || node.kind !== 88 /* DefaultKeyword */) ? canHaveModifiers(parent2) && contains(parent2.modifiers, node) : node.kind === 84 /* ClassKeyword */ ? isClassDeclaration(parent2) || isClassExpression(node) : node.kind === 98 /* FunctionKeyword */ ? isFunctionDeclaration(parent2) || isFunctionExpression(node) : node.kind === 118 /* InterfaceKeyword */ ? isInterfaceDeclaration(parent2) : node.kind === 92 /* EnumKeyword */ ? isEnumDeclaration(parent2) : node.kind === 154 /* TypeKeyword */ ? isTypeAliasDeclaration(parent2) : node.kind === 143 /* NamespaceKeyword */ || node.kind === 142 /* ModuleKeyword */ ? isModuleDeclaration(parent2) : node.kind === 100 /* ImportKeyword */ ? isImportEqualsDeclaration(parent2) : node.kind === 137 /* GetKeyword */ ? isGetAccessorDeclaration(parent2) : node.kind === 151 /* SetKeyword */ && isSetAccessorDeclaration(parent2)) { + if (isModifier(node) && (forRename || node.kind !== 89 /* DefaultKeyword */) ? canHaveModifiers(parent2) && contains(parent2.modifiers, node) : node.kind === 85 /* ClassKeyword */ ? isClassDeclaration(parent2) || isClassExpression(node) : node.kind === 99 /* FunctionKeyword */ ? isFunctionDeclaration(parent2) || isFunctionExpression(node) : node.kind === 119 /* InterfaceKeyword */ ? isInterfaceDeclaration(parent2) : node.kind === 93 /* EnumKeyword */ ? isEnumDeclaration(parent2) : node.kind === 155 /* TypeKeyword */ ? isTypeAliasDeclaration(parent2) : node.kind === 144 /* NamespaceKeyword */ || node.kind === 143 /* ModuleKeyword */ ? isModuleDeclaration(parent2) : node.kind === 101 /* ImportKeyword */ ? isImportEqualsDeclaration(parent2) : node.kind === 138 /* GetKeyword */ ? isGetAccessorDeclaration(parent2) : node.kind === 152 /* SetKeyword */ && isSetAccessorDeclaration(parent2)) { const location = getAdjustedLocationForDeclaration(parent2, forRename); if (location) { return location; } } - if ((node.kind === 113 /* VarKeyword */ || node.kind === 85 /* ConstKeyword */ || node.kind === 119 /* LetKeyword */) && isVariableDeclarationList(parent2) && parent2.declarations.length === 1) { + if ((node.kind === 114 /* VarKeyword */ || node.kind === 86 /* ConstKeyword */ || node.kind === 120 /* LetKeyword */) && isVariableDeclarationList(parent2) && parent2.declarations.length === 1) { const decl = parent2.declarations[0]; if (isIdentifier(decl.name)) { return decl.name; } } - if (node.kind === 154 /* TypeKeyword */) { + if (node.kind === 155 /* TypeKeyword */) { if (isImportClause(parent2) && parent2.isTypeOnly) { const location = getAdjustedLocationForImportDeclaration(parent2.parent, forRename); if (location) { @@ -128263,7 +128324,7 @@ } } } - if (node.kind === 128 /* AsKeyword */) { + if (node.kind === 129 /* AsKeyword */) { if (isImportSpecifier(parent2) && parent2.propertyName || isExportSpecifier(parent2) && parent2.propertyName || isNamespaceImport(parent2) || isNamespaceExport(parent2)) { return parent2.name; } @@ -128271,13 +128332,13 @@ return parent2.exportClause.name; } } - if (node.kind === 100 /* ImportKeyword */ && isImportDeclaration(parent2)) { + if (node.kind === 101 /* ImportKeyword */ && isImportDeclaration(parent2)) { const location = getAdjustedLocationForImportDeclaration(parent2, forRename); if (location) { return location; } } - if (node.kind === 93 /* ExportKeyword */) { + if (node.kind === 94 /* ExportKeyword */) { if (isExportDeclaration(parent2)) { const location = getAdjustedLocationForExportDeclaration(parent2, forRename); if (location) { @@ -128288,19 +128349,19 @@ return skipOuterExpressions(parent2.expression); } } - if (node.kind === 147 /* RequireKeyword */ && isExternalModuleReference(parent2)) { + if (node.kind === 148 /* RequireKeyword */ && isExternalModuleReference(parent2)) { return parent2.expression; } - if (node.kind === 158 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { + if (node.kind === 159 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { return parent2.moduleSpecifier; } - if ((node.kind === 94 /* ExtendsKeyword */ || node.kind === 117 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) { + if ((node.kind === 95 /* ExtendsKeyword */ || node.kind === 118 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) { const location = getAdjustedLocationForHeritageClause(parent2); if (location) { return location; } } - if (node.kind === 94 /* ExtendsKeyword */) { + if (node.kind === 95 /* ExtendsKeyword */) { if (isTypeParameterDeclaration(parent2) && parent2.constraint && isTypeReferenceNode(parent2.constraint)) { return parent2.constraint.typeName; } @@ -128308,31 +128369,31 @@ return parent2.extendsType.typeName; } } - if (node.kind === 138 /* InferKeyword */ && isInferTypeNode(parent2)) { + if (node.kind === 139 /* InferKeyword */ && isInferTypeNode(parent2)) { return parent2.typeParameter.name; } - if (node.kind === 101 /* InKeyword */ && isTypeParameterDeclaration(parent2) && isMappedTypeNode(parent2.parent)) { + if (node.kind === 102 /* InKeyword */ && isTypeParameterDeclaration(parent2) && isMappedTypeNode(parent2.parent)) { return parent2.name; } - if (node.kind === 141 /* KeyOfKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 141 /* KeyOfKeyword */ && isTypeReferenceNode(parent2.type)) { + if (node.kind === 142 /* KeyOfKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 142 /* KeyOfKeyword */ && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 146 /* ReadonlyKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 146 /* ReadonlyKeyword */ && isArrayTypeNode(parent2.type) && isTypeReferenceNode(parent2.type.elementType)) { + if (node.kind === 147 /* ReadonlyKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 147 /* ReadonlyKeyword */ && isArrayTypeNode(parent2.type) && isTypeReferenceNode(parent2.type.elementType)) { return parent2.type.elementType.typeName; } if (!forRename) { - if (node.kind === 103 /* NewKeyword */ && isNewExpression(parent2) || node.kind === 114 /* VoidKeyword */ && isVoidExpression(parent2) || node.kind === 112 /* TypeOfKeyword */ && isTypeOfExpression(parent2) || node.kind === 133 /* AwaitKeyword */ && isAwaitExpression(parent2) || node.kind === 125 /* YieldKeyword */ && isYieldExpression(parent2) || node.kind === 89 /* DeleteKeyword */ && isDeleteExpression(parent2)) { + if (node.kind === 104 /* NewKeyword */ && isNewExpression(parent2) || node.kind === 115 /* VoidKeyword */ && isVoidExpression(parent2) || node.kind === 113 /* TypeOfKeyword */ && isTypeOfExpression(parent2) || node.kind === 134 /* AwaitKeyword */ && isAwaitExpression(parent2) || node.kind === 126 /* YieldKeyword */ && isYieldExpression(parent2) || node.kind === 90 /* DeleteKeyword */ && isDeleteExpression(parent2)) { if (parent2.expression) { return skipOuterExpressions(parent2.expression); } } - if ((node.kind === 101 /* InKeyword */ || node.kind === 102 /* InstanceOfKeyword */) && isBinaryExpression(parent2) && parent2.operatorToken === node) { + if ((node.kind === 102 /* InKeyword */ || node.kind === 103 /* InstanceOfKeyword */) && isBinaryExpression(parent2) && parent2.operatorToken === node) { return skipOuterExpressions(parent2.right); } - if (node.kind === 128 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { + if (node.kind === 129 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 101 /* InKeyword */ && isForInStatement(parent2) || node.kind === 162 /* OfKeyword */ && isForOfStatement(parent2)) { + if (node.kind === 102 /* InKeyword */ && isForInStatement(parent2) || node.kind === 163 /* OfKeyword */ && isForOfStatement(parent2)) { return skipOuterExpressions(parent2.expression); } } @@ -128519,7 +128580,7 @@ } } } - Debug.assert(startNode2 !== void 0 || n.kind === 308 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); + Debug.assert(startNode2 !== void 0 || n.kind === 309 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); const candidate = findRightmostChildNodeWithTokens( children, /*exclusiveStartPosition*/ @@ -128554,7 +128615,7 @@ for (let i = exclusiveStartPosition - 1; i >= 0; i--) { const child = children[i]; if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 282 /* JsxSelfClosingElement */)) { + if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 283 /* JsxSelfClosingElement */)) { Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); } } else if (nodeHasTokens(children[i], sourceFile)) { @@ -128586,13 +128647,13 @@ if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 11 /* JsxText */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 291 /* JsxExpression */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 292 /* JsxExpression */) { return true; } - if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 291 /* JsxExpression */) { + if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 292 /* JsxExpression */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 284 /* JsxClosingElement */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 285 /* JsxClosingElement */) { return true; } return false; @@ -128620,9 +128681,9 @@ function isInsideJsxElement(sourceFile, position) { function isInsideJsxElementTraversal(node) { while (node) { - if (node.kind >= 282 /* JsxSelfClosingElement */ && node.kind <= 291 /* JsxExpression */ || node.kind === 11 /* JsxText */ || node.kind === 29 /* LessThanToken */ || node.kind === 31 /* GreaterThanToken */ || node.kind === 79 /* Identifier */ || node.kind === 19 /* CloseBraceToken */ || node.kind === 18 /* OpenBraceToken */ || node.kind === 43 /* SlashToken */) { + if (node.kind >= 283 /* JsxSelfClosingElement */ && node.kind <= 292 /* JsxExpression */ || node.kind === 11 /* JsxText */ || node.kind === 29 /* LessThanToken */ || node.kind === 31 /* GreaterThanToken */ || node.kind === 79 /* Identifier */ || node.kind === 19 /* CloseBraceToken */ || node.kind === 18 /* OpenBraceToken */ || node.kind === 43 /* SlashToken */) { node = node.parent; - } else if (node.kind === 281 /* JsxElement */) { + } else if (node.kind === 282 /* JsxElement */) { if (position > node.getStart(sourceFile)) return true; node = node.parent; @@ -128739,11 +128800,11 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 112 /* TypeOfKeyword */: - case 94 /* ExtendsKeyword */: - case 141 /* KeyOfKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 113 /* TypeOfKeyword */: + case 95 /* ExtendsKeyword */: + case 142 /* KeyOfKeyword */: case 24 /* DotToken */: case 51 /* BarToken */: case 57 /* QuestionToken */: @@ -128794,15 +128855,15 @@ result.push("deprecated" /* deprecatedModifier */); if (node.flags & 16777216 /* Ambient */) result.push("declare" /* ambientModifier */); - if (node.kind === 274 /* ExportAssignment */) + if (node.kind === 275 /* ExportAssignment */) result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 180 /* TypeReference */ || node.kind === 210 /* CallExpression */) { + if (node.kind === 181 /* TypeReference */ || node.kind === 211 /* CallExpression */) { return node.typeArguments; } - if (isFunctionLike(node) || node.kind === 260 /* ClassDeclaration */ || node.kind === 261 /* InterfaceDeclaration */) { + if (isFunctionLike(node) || node.kind === 261 /* ClassDeclaration */ || node.kind === 262 /* InterfaceDeclaration */) { return node.typeParameters; } return void 0; @@ -128816,12 +128877,15 @@ } return false; } +function areIntersectedTypesAvoidingStringReduction(checker, t1, t2) { + return !!(t1.flags & 4 /* String */) && checker.isEmptyAnonymousObjectType(t2); +} function isStringAndEmptyAnonymousObjectIntersection(type) { if (!type.isIntersection()) { return false; } const { types, checker } = type; - return types.length === 2 && types[0].flags & 4 /* String */ && checker.isEmptyAnonymousObjectType(types[1]); + return types.length === 2 && (areIntersectedTypesAvoidingStringReduction(checker, types[0], types[1]) || areIntersectedTypesAvoidingStringReduction(checker, types[1], types[0])); } function isPunctuation(kind) { return 18 /* FirstPunctuation */ <= kind && kind <= 78 /* LastPunctuation */; @@ -128831,9 +128895,9 @@ } function isAccessibilityModifier(kind) { switch (kind) { - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: return true; } return false; @@ -128844,14 +128908,14 @@ return result; } function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 206 /* ArrayLiteralExpression */ || node.kind === 207 /* ObjectLiteralExpression */) { - if (node.parent.kind === 223 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 207 /* ArrayLiteralExpression */ || node.kind === 208 /* ObjectLiteralExpression */) { + if (node.parent.kind === 224 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { return true; } - if (node.parent.kind === 247 /* ForOfStatement */ && node.parent.initializer === node) { + if (node.parent.kind === 248 /* ForOfStatement */ && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 299 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 300 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -128917,31 +128981,31 @@ return { span, newText }; } var typeKeywords = [ - 131 /* AnyKeyword */, - 129 /* AssertsKeyword */, - 160 /* BigIntKeyword */, - 134 /* BooleanKeyword */, - 95 /* FalseKeyword */, - 138 /* InferKeyword */, - 141 /* KeyOfKeyword */, - 144 /* NeverKeyword */, - 104 /* NullKeyword */, - 148 /* NumberKeyword */, - 149 /* ObjectKeyword */, - 146 /* ReadonlyKeyword */, - 152 /* StringKeyword */, - 153 /* SymbolKeyword */, - 110 /* TrueKeyword */, - 114 /* VoidKeyword */, - 155 /* UndefinedKeyword */, - 156 /* UniqueKeyword */, - 157 /* UnknownKeyword */ + 132 /* AnyKeyword */, + 130 /* AssertsKeyword */, + 161 /* BigIntKeyword */, + 135 /* BooleanKeyword */, + 96 /* FalseKeyword */, + 139 /* InferKeyword */, + 142 /* KeyOfKeyword */, + 145 /* NeverKeyword */, + 105 /* NullKeyword */, + 149 /* NumberKeyword */, + 150 /* ObjectKeyword */, + 147 /* ReadonlyKeyword */, + 153 /* StringKeyword */, + 154 /* SymbolKeyword */, + 111 /* TrueKeyword */, + 115 /* VoidKeyword */, + 156 /* UndefinedKeyword */, + 157 /* UniqueKeyword */, + 158 /* UnknownKeyword */ ]; function isTypeKeyword(kind) { return contains(typeKeywords, kind); } function isTypeKeywordToken(node) { - return node.kind === 154 /* TypeKeyword */; + return node.kind === 155 /* TypeKeyword */; } function isTypeKeywordTokenOrIdentifier(node) { return isTypeKeywordToken(node) || isIdentifier(node) && node.text === "type"; @@ -128970,7 +129034,7 @@ return type.isTypeParameter() ? type.getConstraint() || type : type; } function getNameFromPropertyName(name) { - return name.kind === 164 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); + return name.kind === 165 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); } function programContainsModules(program) { return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!(s.externalModuleIndicator || s.commonJsModuleIndicator)); @@ -129097,7 +129161,7 @@ } function insertImports(changes, sourceFile, imports, blankLineBetween, preferences) { const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 240 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; + const importKindPredicate = decl.kind === 241 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; const existingImportStatements = filter(sourceFile.statements, importKindPredicate); let sortKind = isArray(imports) ? ts_OrganizeImports_exports.detectImportDeclarationSorting(imports, preferences) : 3 /* Both */; const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); @@ -129664,13 +129728,13 @@ function getContextualTypeFromParent(node, checker, contextFlags) { const parent2 = walkUpParenthesizedExpressions(node.parent); switch (parent2.kind) { - case 211 /* NewExpression */: + case 212 /* NewExpression */: return checker.getContextualType(parent2, contextFlags); - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const { left, operatorToken, right } = parent2; return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node, contextFlags); } - case 292 /* CaseClause */: + case 293 /* CaseClause */: return getSwitchedType(parent2, checker); default: return checker.getContextualType(node, contextFlags); @@ -129696,8 +129760,8 @@ switch (node.kind) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 212 /* TaggedTemplateExpression */: + case 226 /* TemplateExpression */: + case 213 /* TaggedTemplateExpression */: return true; default: return false; @@ -129733,16 +129797,16 @@ return typeIsAccessible ? res : void 0; } function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 176 /* CallSignature */ || kind === 177 /* ConstructSignature */ || kind === 178 /* IndexSignature */ || kind === 168 /* PropertySignature */ || kind === 170 /* MethodSignature */; + return kind === 177 /* CallSignature */ || kind === 178 /* ConstructSignature */ || kind === 179 /* IndexSignature */ || kind === 169 /* PropertySignature */ || kind === 171 /* MethodSignature */; } function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 259 /* FunctionDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 260 /* FunctionDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 264 /* ModuleDeclaration */; + return kind === 265 /* ModuleDeclaration */; } function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 240 /* VariableStatement */ || kind === 241 /* ExpressionStatement */ || kind === 243 /* DoStatement */ || kind === 248 /* ContinueStatement */ || kind === 249 /* BreakStatement */ || kind === 250 /* ReturnStatement */ || kind === 254 /* ThrowStatement */ || kind === 256 /* DebuggerStatement */ || kind === 169 /* PropertyDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 274 /* ExportAssignment */; + return kind === 241 /* VariableStatement */ || kind === 242 /* ExpressionStatement */ || kind === 244 /* DoStatement */ || kind === 249 /* ContinueStatement */ || kind === 250 /* BreakStatement */ || kind === 251 /* ReturnStatement */ || kind === 255 /* ThrowStatement */ || kind === 257 /* DebuggerStatement */ || kind === 170 /* PropertyDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 275 /* ExportAssignment */; } var syntaxMayBeASICandidate = or( syntaxRequiresTrailingCommaOrSemicolonOrASI, @@ -129772,7 +129836,7 @@ } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { return false; } - if (node.kind === 243 /* DoStatement */) { + if (node.kind === 244 /* DoStatement */) { return true; } const topNode = findAncestor(node, (ancestor) => !ancestor.parent); @@ -130726,8 +130790,8 @@ handleToken(); lastNonTriviaToken = token; } - const end = scanner2.getTextPos(); - pushEncodedClassification(scanner2.getTokenPos(), end, offset, classFromKind(token), spans); + const end = scanner2.getTokenEnd(); + pushEncodedClassification(scanner2.getTokenStart(), end, offset, classFromKind(token), spans); if (end >= text.length) { const end2 = getNewEndOfLineState(scanner2, token, lastOrUndefined(templateStack)); if (end2 !== void 0) { @@ -130753,11 +130817,11 @@ angleBracketStack--; } break; - case 131 /* AnyKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: + case 132 /* AnyKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: if (angleBracketStack > 0 && !syntacticClassifierAbsent) { token = 79 /* Identifier */; } @@ -130810,14 +130874,14 @@ 8 /* NumericLiteral */, 9 /* BigIntLiteral */, 13 /* RegularExpressionLiteral */, - 108 /* ThisKeyword */, + 109 /* ThisKeyword */, 45 /* PlusPlusToken */, 46 /* MinusMinusToken */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 19 /* CloseBraceToken */, - 110 /* TrueKeyword */, - 95 /* FalseKeyword */ + 111 /* TrueKeyword */, + 96 /* FalseKeyword */ ], (token) => token, () => true); function getNewEndOfLineState(scanner2, token, lastOnTemplateStack) { switch (token) { @@ -130925,11 +130989,11 @@ return true; } switch (keyword2) { - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: - case 135 /* ConstructorKeyword */: - case 124 /* StaticKeyword */: - case 127 /* AccessorKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: + case 136 /* ConstructorKeyword */: + case 125 /* StaticKeyword */: + case 128 /* AccessorKeyword */: return true; default: return false; @@ -130969,10 +131033,10 @@ case 31 /* GreaterThanToken */: case 32 /* LessThanEqualsToken */: case 33 /* GreaterThanEqualsToken */: - case 102 /* InstanceOfKeyword */: - case 101 /* InKeyword */: - case 128 /* AsKeyword */: - case 150 /* SatisfiesKeyword */: + case 103 /* InstanceOfKeyword */: + case 102 /* InKeyword */: + case 129 /* AsKeyword */: + case 151 /* SatisfiesKeyword */: case 34 /* EqualsEqualsToken */: case 35 /* ExclamationEqualsToken */: case 36 /* EqualsEqualsEqualsToken */: @@ -131054,13 +131118,13 @@ } function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -131207,14 +131271,14 @@ result.push(type); } function classifyLeadingTriviaAndGetTokenStart(token) { - triviaScanner.setTextPos(token.pos); + triviaScanner.resetTokenState(token.pos); while (true) { - const start2 = triviaScanner.getTextPos(); + const start2 = triviaScanner.getTokenEnd(); if (!couldStartTrivia(sourceFile.text, start2)) { return start2; } const kind = triviaScanner.scan(); - const end = triviaScanner.getTextPos(); + const end = triviaScanner.getTokenEnd(); const width = end - start2; if (!isTrivia(kind)) { return start2; @@ -131226,7 +131290,7 @@ case 2 /* SingleLineCommentTrivia */: case 3 /* MultiLineCommentTrivia */: classifyComment(token, kind, start2, width); - triviaScanner.setTextPos(end); + triviaScanner.resetTokenState(end); continue; case 7 /* ConflictMarkerTrivia */: const text = sourceFile.text; @@ -131276,49 +131340,49 @@ pos = tag.tagName.end; let commentStart = tag.tagName.end; switch (tag.kind) { - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: const param = tag; processJSDocParameterTag(param); commentStart = param.isNameFirst && ((_a2 = param.typeExpression) == null ? void 0 : _a2.end) || param.name.end; break; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: const prop = tag; commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; break; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; commentStart = tag.typeParameters.end; break; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 312 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; + commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 313 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; break; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: commentStart = tag.typeExpression.end; break; - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = tag.typeExpression.end; break; - case 346 /* JSDocThisTag */: - case 343 /* JSDocEnumTag */: + case 347 /* JSDocThisTag */: + case 344 /* JSDocEnumTag */: commentStart = tag.typeExpression.end; break; - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; break; - case 350 /* JSDocSeeTag */: + case 351 /* JSDocSeeTag */: commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; break; - case 331 /* JSDocAugmentsTag */: - case 332 /* JSDocImplementsTag */: + case 332 /* JSDocAugmentsTag */: + case 333 /* JSDocImplementsTag */: commentStart = tag.class.end; break; - case 352 /* JSDocThrowsTag */: + case 353 /* JSDocThrowsTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_h = tag.typeExpression) == null ? void 0 : _h.end) || commentStart; @@ -131425,15 +131489,15 @@ } } pushClassification(start2, i - start2, 1 /* comment */); - mergeConflictScanner.setTextPos(i); - while (mergeConflictScanner.getTextPos() < end) { + mergeConflictScanner.resetTokenState(i); + while (mergeConflictScanner.getTokenEnd() < end) { classifyDisabledCodeToken(); } } function classifyDisabledCodeToken() { - const start2 = mergeConflictScanner.getTextPos(); + const start2 = mergeConflictScanner.getTokenEnd(); const tokenKind = mergeConflictScanner.scan(); - const end = mergeConflictScanner.getTextPos(); + const end = mergeConflictScanner.getTokenEnd(); const type = classifyTokenType(tokenKind); if (type) { pushClassification(start2, end - start2, type); @@ -131463,22 +131527,22 @@ } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 284 /* JsxClosingElement */: + case 285 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -131499,11 +131563,11 @@ if (token) { const parent2 = token.parent; if (tokenKind === 63 /* EqualsToken */) { - if (parent2.kind === 257 /* VariableDeclaration */ || parent2.kind === 169 /* PropertyDeclaration */ || parent2.kind === 166 /* Parameter */ || parent2.kind === 288 /* JsxAttribute */) { + if (parent2.kind === 258 /* VariableDeclaration */ || parent2.kind === 170 /* PropertyDeclaration */ || parent2.kind === 167 /* Parameter */ || parent2.kind === 289 /* JsxAttribute */) { return 5 /* operator */; } } - if (parent2.kind === 223 /* BinaryExpression */ || parent2.kind === 221 /* PrefixUnaryExpression */ || parent2.kind === 222 /* PostfixUnaryExpression */ || parent2.kind === 224 /* ConditionalExpression */) { + if (parent2.kind === 224 /* BinaryExpression */ || parent2.kind === 222 /* PrefixUnaryExpression */ || parent2.kind === 223 /* PostfixUnaryExpression */ || parent2.kind === 225 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -131513,7 +131577,7 @@ } else if (tokenKind === 9 /* BigIntLiteral */) { return 25 /* bigintLiteral */; } else if (tokenKind === 10 /* StringLiteral */) { - return token && token.parent.kind === 288 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 289 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 13 /* RegularExpressionLiteral */) { return 6 /* stringLiteral */; } else if (isTemplateLiteralKind(tokenKind)) { @@ -131523,32 +131587,32 @@ } else if (tokenKind === 79 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 166 /* Parameter */: + case 167 /* Parameter */: if (token.parent.name === token) { return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -131631,50 +131695,50 @@ } function getHighlightSpans(node, sourceFile) { switch (node.kind) { - case 99 /* IfKeyword */: - case 91 /* ElseKeyword */: + case 100 /* IfKeyword */: + case 92 /* ElseKeyword */: return isIfStatement(node.parent) ? getIfElseOccurrences(node.parent, sourceFile) : void 0; - case 105 /* ReturnKeyword */: + case 106 /* ReturnKeyword */: return useParent(node.parent, isReturnStatement, getReturnOccurrences); - case 109 /* ThrowKeyword */: + case 110 /* ThrowKeyword */: return useParent(node.parent, isThrowStatement, getThrowOccurrences); - case 111 /* TryKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: - const tryStatement = node.kind === 83 /* CatchKeyword */ ? node.parent.parent : node.parent; + case 112 /* TryKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: + const tryStatement = node.kind === 84 /* CatchKeyword */ ? node.parent.parent : node.parent; return useParent(tryStatement, isTryStatement, getTryCatchFinallyOccurrences); - case 107 /* SwitchKeyword */: + case 108 /* SwitchKeyword */: return useParent(node.parent, isSwitchStatement, getSwitchCaseDefaultOccurrences); - case 82 /* CaseKeyword */: - case 88 /* DefaultKeyword */: { + case 83 /* CaseKeyword */: + case 89 /* DefaultKeyword */: { if (isDefaultClause(node.parent) || isCaseClause(node.parent)) { return useParent(node.parent.parent.parent, isSwitchStatement, getSwitchCaseDefaultOccurrences); } return void 0; } - case 81 /* BreakKeyword */: - case 86 /* ContinueKeyword */: + case 82 /* BreakKeyword */: + case 87 /* ContinueKeyword */: return useParent(node.parent, isBreakOrContinueStatement, getBreakOrContinueStatementOccurrences); - case 97 /* ForKeyword */: - case 115 /* WhileKeyword */: - case 90 /* DoKeyword */: + case 98 /* ForKeyword */: + case 116 /* WhileKeyword */: + case 91 /* DoKeyword */: return useParent(node.parent, (n) => isIterationStatement( n, /*lookInLabeledStatements*/ true ), getLoopBreakContinueOccurrences); - case 135 /* ConstructorKeyword */: - return getFromAllDeclarations(isConstructorDeclaration, [135 /* ConstructorKeyword */]); - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: - return getFromAllDeclarations(isAccessor, [137 /* GetKeyword */, 151 /* SetKeyword */]); - case 133 /* AwaitKeyword */: + case 136 /* ConstructorKeyword */: + return getFromAllDeclarations(isConstructorDeclaration, [136 /* ConstructorKeyword */]); + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: + return getFromAllDeclarations(isAccessor, [138 /* GetKeyword */, 152 /* SetKeyword */]); + case 134 /* AwaitKeyword */: return useParent(node.parent, isAwaitExpression, getAsyncAndAwaitOccurrences); - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return highlightSpans(getAsyncAndAwaitOccurrences(node)); - case 125 /* YieldKeyword */: + case 126 /* YieldKeyword */: return highlightSpans(getYieldOccurrences(node)); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return void 0; default: return isModifierKind(node.kind) && (isDeclaration(node.parent) || isVariableStatement(node.parent)) ? highlightSpans(getModifierOccurrences(node.kind, node.parent)) : void 0; @@ -131707,7 +131771,7 @@ let child = throwStatement; while (child.parent) { const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 308 /* SourceFile */) { + if (isFunctionBlock(parent2) || parent2.kind === 309 /* SourceFile */) { return parent2; } if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { @@ -131737,15 +131801,15 @@ function getBreakOrContinueOwner(statement) { return findAncestor(statement, (node) => { switch (node.kind) { - case 252 /* SwitchStatement */: - if (statement.kind === 248 /* ContinueStatement */) { + case 253 /* SwitchStatement */: + if (statement.kind === 249 /* ContinueStatement */) { return false; } - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 244 /* WhileStatement */: - case 243 /* DoStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 245 /* WhileStatement */: + case 244 /* DoStatement */: return !statement.label || isLabeledBy(node, statement.label.escapedText); default: return isFunctionLike(node) && "quit"; @@ -131758,24 +131822,24 @@ function getNodesToSearchForModifier(declaration, modifierFlag) { const container = declaration.parent; switch (container.kind) { - case 265 /* ModuleBlock */: - case 308 /* SourceFile */: - case 238 /* Block */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 266 /* ModuleBlock */: + case 309 /* SourceFile */: + case 239 /* Block */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; } - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 184 /* TypeLiteral */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 185 /* TypeLiteral */: const nodes = container.members; if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); @@ -131786,7 +131850,7 @@ return [...nodes, container]; } return nodes; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return void 0; default: Debug.assertNever(container, "Invalid container kind."); @@ -131801,11 +131865,11 @@ } function getLoopBreakContinueOccurrences(loopNode) { const keywords = []; - if (pushKeywordIf(keywords, loopNode.getFirstToken(), 97 /* ForKeyword */, 115 /* WhileKeyword */, 90 /* DoKeyword */)) { - if (loopNode.kind === 243 /* DoStatement */) { + if (pushKeywordIf(keywords, loopNode.getFirstToken(), 98 /* ForKeyword */, 116 /* WhileKeyword */, 91 /* DoKeyword */)) { + if (loopNode.kind === 244 /* DoStatement */) { const loopTokens = loopNode.getChildren(); for (let i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 115 /* WhileKeyword */)) { + if (pushKeywordIf(keywords, loopTokens[i], 116 /* WhileKeyword */)) { break; } } @@ -131813,7 +131877,7 @@ } forEach(aggregateAllBreakAndContinueStatements(loopNode.statement), (statement) => { if (ownsBreakOrContinueStatement(loopNode, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 81 /* BreakKeyword */, 86 /* ContinueKeyword */); + pushKeywordIf(keywords, statement.getFirstToken(), 82 /* BreakKeyword */, 87 /* ContinueKeyword */); } }); return keywords; @@ -131822,13 +131886,13 @@ const owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -131836,12 +131900,12 @@ } function getSwitchCaseDefaultOccurrences(switchStatement) { const keywords = []; - pushKeywordIf(keywords, switchStatement.getFirstToken(), 107 /* SwitchKeyword */); + pushKeywordIf(keywords, switchStatement.getFirstToken(), 108 /* SwitchKeyword */); forEach(switchStatement.caseBlock.clauses, (clause) => { - pushKeywordIf(keywords, clause.getFirstToken(), 82 /* CaseKeyword */, 88 /* DefaultKeyword */); + pushKeywordIf(keywords, clause.getFirstToken(), 83 /* CaseKeyword */, 89 /* DefaultKeyword */); forEach(aggregateAllBreakAndContinueStatements(clause), (statement) => { if (ownsBreakOrContinueStatement(switchStatement, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 81 /* BreakKeyword */); + pushKeywordIf(keywords, statement.getFirstToken(), 82 /* BreakKeyword */); } }); }); @@ -131849,13 +131913,13 @@ } function getTryCatchFinallyOccurrences(tryStatement, sourceFile) { const keywords = []; - pushKeywordIf(keywords, tryStatement.getFirstToken(), 111 /* TryKeyword */); + pushKeywordIf(keywords, tryStatement.getFirstToken(), 112 /* TryKeyword */); if (tryStatement.catchClause) { - pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 83 /* CatchKeyword */); + pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 84 /* CatchKeyword */); } if (tryStatement.finallyBlock) { - const finallyKeyword = findChildOfKind(tryStatement, 96 /* FinallyKeyword */, sourceFile); - pushKeywordIf(keywords, finallyKeyword, 96 /* FinallyKeyword */); + const finallyKeyword = findChildOfKind(tryStatement, 97 /* FinallyKeyword */, sourceFile); + pushKeywordIf(keywords, finallyKeyword, 97 /* FinallyKeyword */); } return keywords; } @@ -131866,11 +131930,11 @@ } const keywords = []; forEach(aggregateOwnedThrowStatements(owner), (throwStatement2) => { - keywords.push(findChildOfKind(throwStatement2, 109 /* ThrowKeyword */, sourceFile)); + keywords.push(findChildOfKind(throwStatement2, 110 /* ThrowKeyword */, sourceFile)); }); if (isFunctionBlock(owner)) { forEachReturnStatement(owner, (returnStatement) => { - keywords.push(findChildOfKind(returnStatement, 105 /* ReturnKeyword */, sourceFile)); + keywords.push(findChildOfKind(returnStatement, 106 /* ReturnKeyword */, sourceFile)); }); } return keywords; @@ -131882,10 +131946,10 @@ } const keywords = []; forEachReturnStatement(cast(func.body, isBlock), (returnStatement2) => { - keywords.push(findChildOfKind(returnStatement2, 105 /* ReturnKeyword */, sourceFile)); + keywords.push(findChildOfKind(returnStatement2, 106 /* ReturnKeyword */, sourceFile)); }); forEach(aggregateOwnedThrowStatements(func.body), (throwStatement) => { - keywords.push(findChildOfKind(throwStatement, 109 /* ThrowKeyword */, sourceFile)); + keywords.push(findChildOfKind(throwStatement, 110 /* ThrowKeyword */, sourceFile)); }); return keywords; } @@ -131897,13 +131961,13 @@ const keywords = []; if (func.modifiers) { func.modifiers.forEach((modifier) => { - pushKeywordIf(keywords, modifier, 132 /* AsyncKeyword */); + pushKeywordIf(keywords, modifier, 133 /* AsyncKeyword */); }); } forEachChild(func, (child) => { traverseWithoutCrossingFunction(child, (node2) => { if (isAwaitExpression(node2)) { - pushKeywordIf(keywords, node2.getFirstToken(), 133 /* AwaitKeyword */); + pushKeywordIf(keywords, node2.getFirstToken(), 134 /* AwaitKeyword */); } }); }); @@ -131918,7 +131982,7 @@ forEachChild(func, (child) => { traverseWithoutCrossingFunction(child, (node2) => { if (isYieldExpression(node2)) { - pushKeywordIf(keywords, node2.getFirstToken(), 125 /* YieldKeyword */); + pushKeywordIf(keywords, node2.getFirstToken(), 126 /* YieldKeyword */); } }); }); @@ -131934,7 +131998,7 @@ const keywords = getIfElseKeywords(ifStatement, sourceFile); const result = []; for (let i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 91 /* ElseKeyword */ && i < keywords.length - 1) { + if (keywords[i].kind === 92 /* ElseKeyword */ && i < keywords.length - 1) { const elseKeyword = keywords[i]; const ifKeyword = keywords[i + 1]; let shouldCombineElseAndIf = true; @@ -131965,9 +132029,9 @@ } while (true) { const children = ifStatement.getChildren(sourceFile); - pushKeywordIf(keywords, children[0], 99 /* IfKeyword */); + pushKeywordIf(keywords, children[0], 100 /* IfKeyword */); for (let i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 91 /* ElseKeyword */)) { + if (pushKeywordIf(keywords, children[i], 92 /* ElseKeyword */)) { break; } } @@ -132785,7 +132849,7 @@ } function getFileReference() { const fileName = scanner.getTokenValue(); - const pos = scanner.getTokenPos(); + const pos = scanner.getTokenStart(); return { fileName, pos, end: pos + fileName.length }; } function recordAmbientExternalModule() { @@ -132805,9 +132869,9 @@ } function tryConsumeDeclare() { let token = scanner.getToken(); - if (token === 136 /* DeclareKeyword */) { + if (token === 137 /* DeclareKeyword */) { token = nextToken(); - if (token === 142 /* ModuleKeyword */) { + if (token === 143 /* ModuleKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordAmbientExternalModule(); @@ -132822,7 +132886,7 @@ return false; } let token = scanner.getToken(); - if (token === 100 /* ImportKeyword */) { + if (token === 101 /* ImportKeyword */) { token = nextToken(); if (token === 20 /* OpenParenToken */) { token = nextToken(); @@ -132834,10 +132898,10 @@ recordModuleName(); return true; } else { - if (token === 154 /* TypeKeyword */) { + if (token === 155 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); - return token2 !== 158 /* FromKeyword */ && (token2 === 41 /* AsteriskToken */ || token2 === 18 /* OpenBraceToken */ || token2 === 79 /* Identifier */ || isKeyword(token2)); + return token2 !== 159 /* FromKeyword */ && (token2 === 41 /* AsteriskToken */ || token2 === 18 /* OpenBraceToken */ || token2 === 79 /* Identifier */ || isKeyword(token2)); }); if (skipTypeKeyword) { token = nextToken(); @@ -132845,7 +132909,7 @@ } if (token === 79 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -132871,7 +132935,7 @@ } if (token === 19 /* CloseBraceToken */) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -132880,11 +132944,11 @@ } } else if (token === 41 /* AsteriskToken */) { token = nextToken(); - if (token === 128 /* AsKeyword */) { + if (token === 129 /* AsKeyword */) { token = nextToken(); if (token === 79 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -132900,10 +132964,10 @@ } function tryConsumeExport() { let token = scanner.getToken(); - if (token === 93 /* ExportKeyword */) { + if (token === 94 /* ExportKeyword */) { markAsExternalModuleIfTopLevel(); token = nextToken(); - if (token === 154 /* TypeKeyword */) { + if (token === 155 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); return token2 === 41 /* AsteriskToken */ || token2 === 18 /* OpenBraceToken */; @@ -132919,7 +132983,7 @@ } if (token === 19 /* CloseBraceToken */) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -132928,15 +132992,15 @@ } } else if (token === 41 /* AsteriskToken */) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); } } - } else if (token === 100 /* ImportKeyword */) { + } else if (token === 101 /* ImportKeyword */) { token = nextToken(); - if (token === 154 /* TypeKeyword */) { + if (token === 155 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); return token2 === 79 /* Identifier */ || isKeyword(token2); @@ -132963,7 +133027,7 @@ } function tryConsumeRequireCall(skipCurrentToken, allowTemplateLiterals = false) { let token = skipCurrentToken ? nextToken() : scanner.getToken(); - if (token === 147 /* RequireKeyword */) { + if (token === 148 /* RequireKeyword */) { token = nextToken(); if (token === 20 /* OpenParenToken */) { token = nextToken(); @@ -133020,7 +133084,7 @@ switch (token) { case 1 /* EndOfFileToken */: break loop; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: tryConsumeImport(); break; case 15 /* TemplateHead */: @@ -133295,13 +133359,13 @@ function containsTopLevelCommonjs(sourceFile) { return sourceFile.statements.some((statement) => { switch (statement.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall( propertyAccessLeftHandSide(decl.initializer), /*checkArgumentIsStringLiteralLike*/ true )); - case 241 /* ExpressionStatement */: { + case 242 /* ExpressionStatement */: { const { expression } = statement; if (!isBinaryExpression(expression)) return isRequireCall( @@ -133322,10 +133386,10 @@ } function importNameForConvertToDefaultImport(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 271 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 268 /* ImportEqualsDeclaration */: + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 272 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; + case 269 /* ImportEqualsDeclaration */: return node.name; default: return void 0; @@ -133384,23 +133448,23 @@ if (node.arguments.length < maxArguments) return true; return maxArguments === 1 || some(node.arguments, (arg) => { - return arg.kind === 104 /* NullKeyword */ || isIdentifier(arg) && arg.text === "undefined"; + return arg.kind === 105 /* NullKeyword */ || isIdentifier(arg) && arg.text === "undefined"; }); } function isFixablePromiseArgument(arg, checker) { switch (arg.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: const functionFlags = getFunctionFlags(arg); if (functionFlags & 1 /* Generator */) { return false; } - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return true; case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: { + case 209 /* PropertyAccessExpression */: { const symbol = checker.getSymbolAtLocation(arg); if (!symbol) { return false; @@ -133434,10 +133498,10 @@ } function canBeConvertedToAsync(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: return false; @@ -133604,9 +133668,9 @@ } function shouldKeepItem(declaration, checker) { switch (declaration.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 268 /* ImportEqualsDeclaration */: + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 269 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); return importer.escapedName !== imported.escapedName; @@ -133616,7 +133680,7 @@ } function tryAddSingleDeclarationName(declaration, containers) { const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 164 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); + return !!name && (pushLiteral(name, containers) || name.kind === 165 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); } function tryAddComputedPropertyName(expression, containers) { return pushLiteral(expression, containers) || isPropertyAccessExpression(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers); @@ -133627,7 +133691,7 @@ function getContainers(declaration) { const containers = []; const name = getNameOfDeclaration(declaration); - if (name && name.kind === 164 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { + if (name && name.kind === 165 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { return emptyArray; } containers.shift(); @@ -133798,7 +133862,7 @@ } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 223 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + return !hasDynamicName(node) || node.kind !== 224 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -133806,7 +133870,7 @@ return; } switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: const ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (const param of ctr.parameters) { @@ -133815,32 +133879,32 @@ } } break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 171 /* MethodSignature */: if (hasNavigationBarName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (hasNavigationBarName(node)) { addNodeWithRecursiveInitializer(node); } break; - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (hasNavigationBarName(node)) { addLeafNode(node); } break; - case 270 /* ImportClause */: + case 271 /* ImportClause */: const importClause = node; if (importClause.name) { addLeafNode(importClause.name); } const { namedBindings } = importClause; if (namedBindings) { - if (namedBindings.kind === 271 /* NamespaceImport */) { + if (namedBindings.kind === 272 /* NamespaceImport */) { addLeafNode(namedBindings); } else { for (const element of namedBindings.elements) { @@ -133849,16 +133913,16 @@ } } break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: addNodeWithRecursiveChild(node, node.name); break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: const { expression } = node; isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: - case 257 /* VariableDeclaration */: { + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: + case 258 /* VariableDeclaration */: { const child = node; if (isBindingPattern(child.name)) { addChildrenRecursively(child.name); @@ -133867,18 +133931,18 @@ } break; } - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: const nameNode = node.name; if (nameNode && isIdentifier(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); break; - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: startNode(node); for (const member of node.members) { if (!isComputedProperty(member)) { @@ -133887,19 +133951,19 @@ } endNode(); break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: startNode(node); for (const member of node.members) { addChildrenRecursively(member); } endNode(); break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const expression2 = node.expression; const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; if (child) { @@ -133911,16 +133975,16 @@ } break; } - case 278 /* ExportSpecifier */: - case 268 /* ImportEqualsDeclaration */: - case 178 /* IndexSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 262 /* TypeAliasDeclaration */: + case 279 /* ExportSpecifier */: + case 269 /* ImportEqualsDeclaration */: + case 179 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 263 /* TypeAliasDeclaration */: addLeafNode(node); break; - case 210 /* CallExpression */: - case 223 /* BinaryExpression */: { + case 211 /* CallExpression */: + case 224 /* BinaryExpression */: { const special = getAssignmentDeclarationKind(node); switch (special) { case 1 /* ExportsProperty */: @@ -134142,12 +134206,12 @@ return false; } switch (a.kind) { - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return isStatic(a) === isStatic(b); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); default: return true; @@ -134164,7 +134228,7 @@ if (!a.body || !b.body) { return a.body === b.body; } - return a.body.kind === b.body.kind && (a.body.kind !== 264 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); + return a.body.kind === b.body.kind && (a.body.kind !== 265 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); } function merge(target, source) { target.additionalNodes = target.additionalNodes || []; @@ -134185,7 +134249,7 @@ return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); } function tryGetName(node) { - if (node.kind === 264 /* ModuleDeclaration */) { + if (node.kind === 265 /* ModuleDeclaration */) { return getModuleName(node); } const declName = getNameOfDeclaration(node); @@ -134194,16 +134258,16 @@ return propertyName && unescapeLeadingUnderscores(propertyName); } switch (node.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 228 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 229 /* ClassExpression */: return getFunctionOrClassName(node); default: return void 0; } } function getItemName(node, name) { - if (node.kind === 264 /* ModuleDeclaration */) { + if (node.kind === 265 /* ModuleDeclaration */) { return cleanText(getModuleName(node)); } if (name) { @@ -134213,27 +134277,27 @@ } } switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: if (getSyntacticModifierFlags(node) & 1024 /* Default */) { return "default"; } return getFunctionOrClassName(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return "constructor"; - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return "new()"; - case 176 /* CallSignature */: + case 177 /* CallSignature */: return "()"; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return "[]"; default: return ""; @@ -134258,19 +134322,19 @@ return true; } switch (navigationBarNodeKind(item)) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 263 /* EnumDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 308 /* SourceFile */: - case 262 /* TypeAliasDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 264 /* EnumDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 309 /* SourceFile */: + case 263 /* TypeAliasDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: return true; - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -134280,10 +134344,10 @@ return false; } switch (navigationBarNodeKind(item2.parent)) { - case 265 /* ModuleBlock */: - case 308 /* SourceFile */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: + case 266 /* ModuleBlock */: + case 309 /* SourceFile */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: return true; default: return false; @@ -134342,7 +134406,7 @@ } function getFullyQualifiedModuleName(moduleDeclaration) { const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 264 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 265 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } @@ -134352,13 +134416,13 @@ return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 164 /* ComputedPropertyName */; + return !member.name || member.name.kind === 165 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 308 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); + return node.kind === 309 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); } function getModifiers2(node) { - if (node.parent && node.parent.kind === 257 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 258 /* VariableDeclaration */) { node = node.parent; } return getNodeModifiers(node); @@ -134403,9 +134467,9 @@ } function isFunctionOrClassExpression(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: return true; default: return false; @@ -134491,8 +134555,8 @@ if (!children.length) { return void 0; } - const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 353 /* LastJSDocNode */); - return child.kind < 163 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + const child = find(children, (kid) => kid.kind < 313 /* FirstJSDocNode */ || kid.kind > 354 /* LastJSDocNode */); + return child.kind < 164 /* FirstNode */ ? child : child.getFirstToken(sourceFile); } getLastToken(sourceFile) { this.assertHasRealPosition(); @@ -134501,7 +134565,7 @@ if (!child) { return void 0; } - return child.kind < 163 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 164 /* FirstNode */ ? child : child.getLastToken(sourceFile); } forEachChild(cbNode, cbNodeArray) { return forEachChild(this, cbNode, cbNodeArray); @@ -134538,10 +134602,10 @@ return children; } function addSyntheticNodes(nodes, pos, end, parent2) { - scanner.setTextPos(pos); + scanner.resetTokenState(pos); while (pos < end) { const token = scanner.scan(); - const textPos = scanner.getTextPos(); + const textPos = scanner.getTokenEnd(); if (textPos <= end) { if (token === 79 /* Identifier */) { if (hasTabstop(parent2)) { @@ -134558,7 +134622,7 @@ } } function createSyntaxList(nodes, parent2) { - const list = createNode(354 /* SyntaxList */, nodes.pos, nodes.end, parent2); + const list = createNode(355 /* SyntaxList */, nodes.pos, nodes.end, parent2); list._children = []; let pos = nodes.pos; for (const node of nodes) { @@ -134875,7 +134939,7 @@ var _a2; if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 174 /* GetAccessor */ || declaration.kind === 175 /* SetAccessor */) { + if (declaration.kind === 175 /* GetAccessor */ || declaration.kind === 176 /* SetAccessor */) { return symbol.getContextualJsDocTags(declaration, checker); } return ((_a2 = symbol.declarations) == null ? void 0 : _a2.length) === 1 ? symbol.getJsDocTags() : void 0; @@ -134898,7 +134962,7 @@ const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 174 /* GetAccessor */ || declaration.kind === 175 /* SetAccessor */) { + if (declaration.kind === 175 /* GetAccessor */ || declaration.kind === 176 /* SetAccessor */) { return symbol.getContextualDocumentationComment(declaration, checker); } return symbol.getDocumentationComment(checker); @@ -134912,7 +134976,7 @@ } function findBaseOfDeclaration(checker, declaration, cb) { var _a2; - const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 173 /* Constructor */ ? declaration.parent.parent : declaration.parent; + const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 174 /* Constructor */ ? declaration.parent.parent : declaration.parent; if (!classOrInterfaceDeclaration) return; const isStaticMember = hasStaticModifier(declaration); @@ -134926,7 +134990,7 @@ var SourceFileObject = class extends NodeObject { constructor(kind, pos, end) { super(kind, pos, end); - this.kind = 308 /* SourceFile */; + this.kind = 309 /* SourceFile */; } update(newText, textChangeRange) { return updateSourceFile(this, newText, textChangeRange); @@ -134982,10 +135046,10 @@ } function visit(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: const functionDeclaration = node; const declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -135001,29 +135065,29 @@ } forEachChild(node, visit); break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 264 /* ModuleDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 278 /* ExportSpecifier */: - case 273 /* ImportSpecifier */: - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 184 /* TypeLiteral */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 279 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 185 /* TypeLiteral */: addDeclaration(node); forEachChild(node, visit); break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { break; } - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: { + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: { const decl = node; if (isBindingPattern(decl.name)) { forEachChild(decl.name, visit); @@ -135033,12 +135097,12 @@ visit(decl.initializer); } } - case 302 /* EnumMember */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 303 /* EnumMember */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: addDeclaration(node); break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDeclaration = node; if (exportDeclaration.exportClause) { if (isNamedExports(exportDeclaration.exportClause)) { @@ -135048,14 +135112,14 @@ } } break; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: const importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause.name); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 272 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { forEach(importClause.namedBindings.elements, visit); @@ -135063,7 +135127,7 @@ } } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) !== 0 /* None */) { addDeclaration(node); } @@ -135698,15 +135762,15 @@ switch (node.kind) { case 79 /* Identifier */: return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 208 /* PropertyAccessExpression */: - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: return !isInComment(sourceFile, position); - case 108 /* ThisKeyword */: - case 194 /* ThisType */: - case 106 /* SuperKeyword */: - case 199 /* NamedTupleMember */: + case 109 /* ThisKeyword */: + case 195 /* ThisType */: + case 107 /* SuperKeyword */: + case 200 /* NamedTupleMember */: return true; - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return isImportMeta(node); default: return false; @@ -135804,15 +135868,15 @@ return void 0; } switch (node.kind) { - case 208 /* PropertyAccessExpression */: - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: case 10 /* StringLiteral */: - case 95 /* FalseKeyword */: - case 110 /* TrueKeyword */: - case 104 /* NullKeyword */: - case 106 /* SuperKeyword */: - case 108 /* ThisKeyword */: - case 194 /* ThisType */: + case 96 /* FalseKeyword */: + case 111 /* TrueKeyword */: + case 105 /* NullKeyword */: + case 107 /* SuperKeyword */: + case 109 /* ThisKeyword */: + case 195 /* ThisType */: case 79 /* Identifier */: break; default: @@ -135823,7 +135887,7 @@ if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 264 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 265 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { break; @@ -136450,7 +136514,7 @@ }); } function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 280 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); + return isDeclarationName(node) || node.parent.kind === 281 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); @@ -136461,11 +136525,11 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - if (node.parent.kind === 164 /* ComputedPropertyName */) { + if (node.parent.kind === 165 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; } case 79 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 207 /* ObjectLiteralExpression */ || node.parent.parent.kind === 289 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; + return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 208 /* ObjectLiteralExpression */ || node.parent.parent.kind === 290 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; } return void 0; } @@ -136506,7 +136570,7 @@ return discriminatedPropertySymbols; } function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 209 /* ElementAccessExpression */ && node.parent.argumentExpression === node; + return node && node.parent && node.parent.kind === 210 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { if (sys) { @@ -137534,89 +137598,89 @@ if (node) { const { parent: parent2 } = node; switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 257 /* VariableDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 258 /* VariableDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return spanInVariableDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return spanInParameterDeclaration(node); - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 238 /* Block */: + case 239 /* Block */: if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return spanInBlock(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return spanInBlock(node.block); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return textSpan(node.expression); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return spanInNode(node.statement); - case 256 /* DebuggerStatement */: + case 257 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return spanInNode(node.statement); - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return spanInForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return spanInInitializerOfForLike(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return spanInNode(node.statements[0]); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return spanInBlock(node.tryBlock); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return textSpan(node, node.expression); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return textSpan(node, node.expression); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return textSpan(node, node.moduleReference); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (getModuleInstanceState(node) !== 1 /* Instantiated */) { return void 0; } - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 205 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 206 /* BindingElement */: return textSpan(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return spanInNode(node.statement); - case 167 /* Decorator */: + case 168 /* Decorator */: return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return spanInBindingPattern(node); - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return void 0; case 26 /* SemicolonToken */: case 1 /* EndOfFileToken */: @@ -137638,22 +137702,22 @@ case 31 /* GreaterThanToken */: case 29 /* LessThanToken */: return spanInGreaterThanOrLessThanToken(node); - case 115 /* WhileKeyword */: + case 116 /* WhileKeyword */: return spanInWhileKeyword(node); - case 91 /* ElseKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 92 /* ElseKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return spanInNextNode(node); - case 162 /* OfKeyword */: + case 163 /* OfKeyword */: return spanInOfKeyword(node); default: if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 79 /* Identifier */ || node.kind === 227 /* SpreadElement */ || node.kind === 299 /* PropertyAssignment */ || node.kind === 300 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { + if ((node.kind === 79 /* Identifier */ || node.kind === 228 /* SpreadElement */ || node.kind === 300 /* PropertyAssignment */ || node.kind === 301 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { return textSpan(node); } - if (node.kind === 223 /* BinaryExpression */) { + if (node.kind === 224 /* BinaryExpression */) { const { left, operatorToken } = node; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern( @@ -137669,19 +137733,19 @@ } if (isExpressionNode(node)) { switch (parent2.kind) { - case 243 /* DoStatement */: + case 244 /* DoStatement */: return spanInPreviousNode(node); - case 167 /* Decorator */: + case 168 /* Decorator */: return spanInNode(node.parent); - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: return textSpan(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (node.parent.operatorToken.kind === 27 /* CommaToken */) { return textSpan(node); } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (node.parent.body === node) { return textSpan(node); } @@ -137689,25 +137753,25 @@ } } switch (node.parent.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } break; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: if (node.parent.type === node) { return spanInNextNode(node.parent.type); } break; - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: { + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: { const { initializer, type } = node.parent; if (initializer === node || type === node || isAssignmentOperator(node.kind)) { return spanInPreviousNode(node); } break; } - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const { left } = node.parent; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { return spanInPreviousNode(node); @@ -137730,14 +137794,14 @@ } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 246 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 247 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } const parent2 = variableDeclaration.parent; if (isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } - if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 247 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 248 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -137764,7 +137828,7 @@ } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 260 /* ClassDeclaration */ && functionDeclaration.kind !== 173 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 261 /* ClassDeclaration */ && functionDeclaration.kind !== 174 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -137784,22 +137848,22 @@ } function spanInBlock(block) { switch (block.parent.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return void 0; } - case 244 /* WhileStatement */: - case 242 /* IfStatement */: - case 246 /* ForInStatement */: + case 245 /* WhileStatement */: + case 243 /* IfStatement */: + case 247 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 258 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 259 /* VariableDeclarationList */) { const variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -137822,64 +137886,64 @@ function spanInBindingPattern(bindingPattern) { const firstBindingElement = forEach( bindingPattern.elements, - (element) => element.kind !== 229 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 230 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 205 /* BindingElement */) { + if (bindingPattern.parent.kind === 206 /* BindingElement */) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 204 /* ArrayBindingPattern */ && node2.kind !== 203 /* ObjectBindingPattern */); - const elements = node2.kind === 206 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; + Debug.assert(node2.kind !== 205 /* ArrayBindingPattern */ && node2.kind !== 204 /* ObjectBindingPattern */); + const elements = node2.kind === 207 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; const firstBindingElement = forEach( elements, - (element) => element.kind !== 229 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 230 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node2.parent.kind === 223 /* BinaryExpression */ ? node2.parent : node2); + return textSpan(node2.parent.kind === 224 /* BinaryExpression */ ? node2.parent : node2); } function spanInOpenBraceToken(node2) { switch (node2.parent.kind) { - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: const enumDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const classDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); } return spanInNode(node2.parent); } function spanInCloseBraceToken(node2) { switch (node2.parent.kind) { - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { return void 0; } - case 263 /* EnumDeclaration */: - case 260 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 261 /* ClassDeclaration */: return textSpan(node2); - case 238 /* Block */: + case 239 /* Block */: if (isFunctionBlock(node2.parent)) { return textSpan(node2); } - case 295 /* CatchClause */: + case 296 /* CatchClause */: return spanInNode(lastOrUndefined(node2.parent.statements)); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: const caseBlock = node2.parent; const lastClause = lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(lastOrUndefined(lastClause.statements)); } return void 0; - case 203 /* ObjectBindingPattern */: + case 204 /* ObjectBindingPattern */: const bindingPattern = node2.parent; return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -137892,7 +137956,7 @@ } function spanInCloseBracketToken(node2) { switch (node2.parent.kind) { - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: const bindingPattern = node2.parent; return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -137904,57 +137968,57 @@ } } function spanInOpenParenToken(node2) { - if (node2.parent.kind === 243 /* DoStatement */ || // Go to while keyword and do action instead - node2.parent.kind === 210 /* CallExpression */ || node2.parent.kind === 211 /* NewExpression */) { + if (node2.parent.kind === 244 /* DoStatement */ || // Go to while keyword and do action instead + node2.parent.kind === 211 /* CallExpression */ || node2.parent.kind === 212 /* NewExpression */) { return spanInPreviousNode(node2); } - if (node2.parent.kind === 214 /* ParenthesizedExpression */) { + if (node2.parent.kind === 215 /* ParenthesizedExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInCloseParenToken(node2) { switch (node2.parent.kind) { - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: - case 244 /* WhileStatement */: - case 243 /* DoStatement */: - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 214 /* ParenthesizedExpression */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: + case 245 /* WhileStatement */: + case 244 /* DoStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 215 /* ParenthesizedExpression */: return spanInPreviousNode(node2); default: return spanInNode(node2.parent); } } function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 299 /* PropertyAssignment */ || node2.parent.kind === 166 /* Parameter */) { + if (isFunctionLike(node2.parent) || node2.parent.kind === 300 /* PropertyAssignment */ || node2.parent.kind === 167 /* Parameter */) { return spanInPreviousNode(node2); } return spanInNode(node2.parent); } function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 213 /* TypeAssertionExpression */) { + if (node2.parent.kind === 214 /* TypeAssertionExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInWhileKeyword(node2) { - if (node2.parent.kind === 243 /* DoStatement */) { + if (node2.parent.kind === 244 /* DoStatement */) { return textSpanEndingAtNextToken(node2, node2.parent.expression); } return spanInNode(node2.parent); } function spanInOfKeyword(node2) { - if (node2.parent.kind === 247 /* ForOfStatement */) { + if (node2.parent.kind === 248 /* ForOfStatement */) { return spanInNextNode(node2); } return spanInNode(node2.parent); @@ -137994,7 +138058,7 @@ return Debug.checkDefined(node.modifiers && find(node.modifiers, isDefaultModifier3)); } function isDefaultModifier3(node) { - return node.kind === 88 /* DefaultKeyword */; + return node.kind === 89 /* DefaultKeyword */; } function getSymbolOfCallHierarchyDeclaration(typeChecker, node) { const location = getCallHierarchyDeclarationReferenceNode(node); @@ -138043,16 +138107,16 @@ return; } switch (node.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - if (node.parent.kind === 207 /* ObjectLiteralExpression */) { + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + if (node.parent.kind === 208 /* ObjectLiteralExpression */) { return (_a2 = getAssignedName(node.parent)) == null ? void 0 : _a2.getText(); } return (_b = getNameOfDeclaration(node.parent)) == null ? void 0 : _b.getText(); - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { return node.parent.parent.name.getText(); } @@ -138134,7 +138198,7 @@ } return void 0; } - if (location.kind === 124 /* StaticKeyword */ && isClassStaticBlockDeclaration(location.parent)) { + if (location.kind === 125 /* StaticKeyword */ && isClassStaticBlockDeclaration(location.parent)) { location = location.parent; continue; } @@ -138270,55 +138334,55 @@ } switch (node.kind) { case 79 /* Identifier */: - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return; - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: recordCallSite(node); return; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: collect(node.expression); return; - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: collect(node.name); collect(node.initializer); return; - case 210 /* CallExpression */: + case 211 /* CallExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 211 /* NewExpression */: + case 212 /* NewExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: recordCallSite(node); collect(node.tag); collect(node.template); return; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: recordCallSite(node); collect(node.tagName); collect(node.attributes); return; - case 167 /* Decorator */: + case 168 /* Decorator */: recordCallSite(node); collect(node.expression); return; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: recordCallSite(node); forEachChild(node, collect); break; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: collect(node.expression); return; } @@ -138371,25 +138435,25 @@ const callSites = []; const collect = createCallSiteCollector(program, callSites); switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: collectCallSitesOfSourceFile(node, collect); break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: collectCallSitesOfModuleDeclaration(node, collect); break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: collectCallSitesOfClassLikeDeclaration(node, collect); break; - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: collectCallSitesOfClassStaticBlockDeclaration(node, collect); break; default: @@ -138490,13 +138554,13 @@ let inJSXElement = false; function visit(node) { switch (node.kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { @@ -138633,25 +138697,25 @@ return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node; } var tokenFromDeclarationMapping = /* @__PURE__ */ new Map([ - [257 /* VariableDeclaration */, 7 /* variable */], - [166 /* Parameter */, 6 /* parameter */], - [169 /* PropertyDeclaration */, 9 /* property */], - [264 /* ModuleDeclaration */, 3 /* namespace */], - [263 /* EnumDeclaration */, 1 /* enum */], - [302 /* EnumMember */, 8 /* enumMember */], - [260 /* ClassDeclaration */, 0 /* class */], - [171 /* MethodDeclaration */, 11 /* member */], - [259 /* FunctionDeclaration */, 10 /* function */], - [215 /* FunctionExpression */, 10 /* function */], - [170 /* MethodSignature */, 11 /* member */], - [174 /* GetAccessor */, 9 /* property */], - [175 /* SetAccessor */, 9 /* property */], - [168 /* PropertySignature */, 9 /* property */], - [261 /* InterfaceDeclaration */, 2 /* interface */], - [262 /* TypeAliasDeclaration */, 5 /* type */], - [165 /* TypeParameter */, 4 /* typeParameter */], - [299 /* PropertyAssignment */, 9 /* property */], - [300 /* ShorthandPropertyAssignment */, 9 /* property */] + [258 /* VariableDeclaration */, 7 /* variable */], + [167 /* Parameter */, 6 /* parameter */], + [170 /* PropertyDeclaration */, 9 /* property */], + [265 /* ModuleDeclaration */, 3 /* namespace */], + [264 /* EnumDeclaration */, 1 /* enum */], + [303 /* EnumMember */, 8 /* enumMember */], + [261 /* ClassDeclaration */, 0 /* class */], + [172 /* MethodDeclaration */, 11 /* member */], + [260 /* FunctionDeclaration */, 10 /* function */], + [216 /* FunctionExpression */, 10 /* function */], + [171 /* MethodSignature */, 11 /* member */], + [175 /* GetAccessor */, 9 /* property */], + [176 /* SetAccessor */, 9 /* property */], + [169 /* PropertySignature */, 9 /* property */], + [262 /* InterfaceDeclaration */, 2 /* interface */], + [263 /* TypeAliasDeclaration */, 5 /* type */], + [166 /* TypeParameter */, 4 /* typeParameter */], + [300 /* PropertyAssignment */, 9 /* property */], + [301 /* ShorthandPropertyAssignment */, 9 /* property */] ]); // src/services/_namespaces/ts.codefix.ts @@ -138807,7 +138871,7 @@ }) }); function makeChange(changeTracker, sourceFile, assertion) { - const replacement = isAsExpression(assertion) ? factory.createAsExpression(assertion.expression, factory.createKeywordTypeNode(157 /* UnknownKeyword */)) : factory.createTypeAssertion(factory.createKeywordTypeNode(157 /* UnknownKeyword */), assertion.expression); + const replacement = isAsExpression(assertion) ? factory.createAsExpression(assertion.expression, factory.createKeywordTypeNode(158 /* UnknownKeyword */)) : factory.createTypeAssertion(factory.createKeywordTypeNode(158 /* UnknownKeyword */), assertion.expression); changeTracker.replaceNode(sourceFile, assertion.expression, replacement); } function getAssertion(sourceFile, pos) { @@ -139016,7 +139080,7 @@ } const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 240 /* VariableStatement */); + const variableStatement = getAncestor(declaration, 241 /* VariableStatement */); if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; @@ -139075,7 +139139,7 @@ checker.getTypeAtLocation(errorNode).flags & 1 /* Any */; } function isInsideAwaitableBody(node) { - return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 259 /* FunctionDeclaration */ || ancestor.parent.kind === 215 /* FunctionExpression */ || ancestor.parent.kind === 216 /* ArrowFunction */ || ancestor.parent.kind === 171 /* MethodDeclaration */)); + return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 260 /* FunctionDeclaration */ || ancestor.parent.kind === 216 /* FunctionExpression */ || ancestor.parent.kind === 217 /* ArrowFunction */ || ancestor.parent.kind === 172 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -139083,7 +139147,7 @@ const asyncIter = checker.getAsyncIterableType(); if (asyncIter && checker.isTypeAssignableTo(exprType, asyncIter)) { const forOf = insertionSite.parent; - changeTracker.replaceNode(sourceFile, forOf, factory.updateForOfStatement(forOf, factory.createToken(133 /* AwaitKeyword */), forOf.initializer, forOf.expression, forOf.statement)); + changeTracker.replaceNode(sourceFile, forOf, factory.updateForOfStatement(forOf, factory.createToken(134 /* AwaitKeyword */), forOf.initializer, forOf.expression, forOf.statement)); return; } } @@ -139191,16 +139255,16 @@ } function applyChange(changeTracker, initializer, sourceFile, fixedNodes) { if (!fixedNodes || tryAddToSet(fixedNodes, initializer)) { - changeTracker.insertModifierBefore(sourceFile, 85 /* ConstKeyword */, initializer); + changeTracker.insertModifierBefore(sourceFile, 86 /* ConstKeyword */, initializer); } } function isPossiblyPartOfDestructuring(node) { switch (node.kind) { case 79 /* Identifier */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return true; default: return false; @@ -139217,7 +139281,7 @@ function isPossiblyPartOfCommaSeperatedInitializer(node) { switch (node.kind) { case 79 /* Identifier */: - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: case 27 /* CommaToken */: return true; default: @@ -139259,8 +139323,8 @@ return; } const declaration = token.parent; - if (declaration.kind === 169 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { - changeTracker.insertModifierBefore(sourceFile, 136 /* DeclareKeyword */, declaration); + if (declaration.kind === 170 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { + changeTracker.insertModifierBefore(sourceFile, 137 /* DeclareKeyword */, declaration); } } @@ -139403,7 +139467,7 @@ const d = add.valueDeclaration; if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ - ...d.type.kind === 189 /* UnionType */ ? d.type.types : [d.type], + ...d.type.kind === 190 /* UnionType */ ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") ]); changes.replaceNode(d.getSourceFile(), d.type, t); @@ -139471,26 +139535,26 @@ } } function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 257 /* VariableDeclaration */ || node.kind === 168 /* PropertySignature */ || node.kind === 169 /* PropertyDeclaration */; + return isFunctionLikeDeclaration(node) || node.kind === 258 /* VariableDeclaration */ || node.kind === 169 /* PropertySignature */ || node.kind === 170 /* PropertyDeclaration */; } function transformJSDocType(node) { switch (node.kind) { - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: return factory.createTypeReferenceNode("any", emptyArray); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return transformJSDocOptionalType(node); - case 318 /* JSDocNonNullableType */: + case 319 /* JSDocNonNullableType */: return transformJSDocType(node.type); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return transformJSDocNullableType(node); - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: return transformJSDocVariadicType(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return transformJSDocFunctionType(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return transformJSDocTypeReference(node); - case 325 /* JSDocTypeLiteral */: + case 326 /* JSDocTypeLiteral */: return transformJSDocTypeLiteral(node); default: const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); @@ -139504,7 +139568,7 @@ void 0, isIdentifier(tag.name) ? tag.name : tag.name.right, isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(57 /* QuestionToken */) : void 0, - tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ))); setEmitFlags(typeNode, 1 /* SingleLine */); return typeNode; @@ -139520,11 +139584,11 @@ } function transformJSDocFunctionType(node) { var _a2; - return factory.createFunctionTypeNode(emptyArray, node.parameters.map(transformJSDocParameter), (_a2 = node.type) != null ? _a2 : factory.createKeywordTypeNode(131 /* AnyKeyword */)); + return factory.createFunctionTypeNode(emptyArray, node.parameters.map(transformJSDocParameter), (_a2 = node.type) != null ? _a2 : factory.createKeywordTypeNode(132 /* AnyKeyword */)); } function transformJSDocParameter(node) { const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 321 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; + const isRest = node.type.kind === 322 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; const name = node.name || (isRest ? "rest" : "arg" + index); const dotdotdot = isRest ? factory.createToken(25 /* DotDotDotToken */) : node.dotDotDotToken; return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer); @@ -139565,10 +139629,10 @@ void 0, /*dotDotDotToken*/ void 0, - node.typeArguments[0].kind === 148 /* NumberKeyword */ ? "n" : "s", + node.typeArguments[0].kind === 149 /* NumberKeyword */ ? "n" : "s", /*questionToken*/ void 0, - factory.createTypeReferenceNode(node.typeArguments[0].kind === 148 /* NumberKeyword */ ? "number" : "string", []), + factory.createTypeReferenceNode(node.typeArguments[0].kind === 149 /* NumberKeyword */ ? "number" : "string", []), /*initializer*/ void 0 ); @@ -139631,7 +139695,7 @@ ); } } else { - createClassElement(member, [factory.createToken(124 /* StaticKeyword */)], memberElements); + createClassElement(member, [factory.createToken(125 /* StaticKeyword */)], memberElements); } }); } @@ -139691,7 +139755,7 @@ })) { return; } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 241 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; + const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 242 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; changes.delete(sourceFile, nodeToDelete); if (!assignmentExpr) { members.push(factory.createPropertyDeclaration( @@ -139754,7 +139818,7 @@ return createArrowFunctionExpressionMember(members2, expression, name); } function createFunctionExpressionMember(members2, functionExpression, name) { - const fullModifiers = concatenate(modifiers, getModifierKindFromSource(functionExpression, 132 /* AsyncKeyword */)); + const fullModifiers = concatenate(modifiers, getModifierKindFromSource(functionExpression, 133 /* AsyncKeyword */)); const method = factory.createMethodDeclaration( fullModifiers, /*asteriskToken*/ @@ -139776,12 +139840,12 @@ function createArrowFunctionExpressionMember(members2, arrowFunction, name) { const arrowFunctionBody = arrowFunction.body; let bodyBlock; - if (arrowFunctionBody.kind === 238 /* Block */) { + if (arrowFunctionBody.kind === 239 /* Block */) { bodyBlock = arrowFunctionBody; } else { bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); } - const fullModifiers = concatenate(modifiers, getModifierKindFromSource(arrowFunction, 132 /* AsyncKeyword */)); + const fullModifiers = concatenate(modifiers, getModifierKindFromSource(arrowFunction, 133 /* AsyncKeyword */)); const method = factory.createMethodDeclaration( fullModifiers, /*asteriskToken*/ @@ -139815,7 +139879,7 @@ initializer.body )); } - const modifiers = getModifierKindFromSource(node.parent.parent, 93 /* ExportKeyword */); + const modifiers = getModifierKindFromSource(node.parent.parent, 94 /* ExportKeyword */); const cls = factory.createClassDeclaration( modifiers, node.name, @@ -139837,7 +139901,7 @@ node.body )); } - const modifiers = getModifierKindFromSource(node, 93 /* ExportKeyword */); + const modifiers = getModifierKindFromSource(node, 94 /* ExportKeyword */); const cls = factory.createClassDeclaration( modifiers, node.name, @@ -139912,7 +139976,7 @@ return; } const pos = skipTrivia(sourceFile.text, moveRangePastModifiers(functionToConvert).pos); - changes.insertModifierAt(sourceFile, pos, 132 /* AsyncKeyword */, { suffix: " " }); + changes.insertModifierAt(sourceFile, pos, 133 /* AsyncKeyword */, { suffix: " " }); for (const returnStatement of returnStatements) { forEachChild(returnStatement, function visit(node) { if (isCallExpression(node)) { @@ -140093,7 +140157,7 @@ return silentFail(); } function isNullOrUndefined2({ checker }, node) { - if (node.kind === 104 /* NullKeyword */) + if (node.kind === 105 /* NullKeyword */) return true; if (isIdentifier(node) && !isGeneratedIdentifier(node) && idText(node) === "undefined") { const symbol = checker.getSymbolAtLocation(node); @@ -140331,9 +140395,9 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, inputArgName, parent2, transformer) { var _a2; switch (func.kind) { - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: break; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: case 79 /* Identifier */: if (!inputArgName) { break; @@ -140358,8 +140422,8 @@ continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); } return varDeclOrAssignment; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: { + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: { const funcBody = func.body; const returnType2 = (_a2 = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a2.getReturnType(); if (isBlock(funcBody)) { @@ -140595,7 +140659,7 @@ } const importNode = importFromModuleSpecifier(moduleSpecifier); switch (importNode.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: changes.replaceNode(importingFile, importNode, makeImport( importNode.name, /*namedImports*/ @@ -140604,7 +140668,7 @@ quotePreference )); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isRequireCall( importNode, /*checkArgumentIsStringLiteralLike*/ @@ -140673,13 +140737,13 @@ } function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) { switch (statement.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); return false; - case 241 /* ExpressionStatement */: { + case 242 /* ExpressionStatement */: { const { expression } = statement; switch (expression.kind) { - case 210 /* CallExpression */: { + case 211 /* CallExpression */: { if (isRequireCall( expression, /*checkArgumentIsStringLiteralLike*/ @@ -140696,7 +140760,7 @@ } return false; } - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const { operatorToken } = expression; return operatorToken.kind === 63 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify); } @@ -140750,8 +140814,8 @@ } function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: { + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: { const tmp = makeUniqueName(propertyName, identifiers); return convertedImports([ makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), @@ -140799,15 +140863,15 @@ function tryChangeModuleExportsObject(object, useSitesToUnqualify) { const statements = mapAllOrFail(object.properties, (prop) => { switch (prop.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return void 0; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 171 /* MethodDeclaration */: - return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(93 /* ExportKeyword */)], prop, useSitesToUnqualify); + case 172 /* MethodDeclaration */: + return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(94 /* ExportKeyword */)], prop, useSitesToUnqualify); default: Debug.assertNever(prop, `Convert to ES6 got invalid prop kind ${prop.kind}`); } @@ -140865,7 +140929,7 @@ function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sourceFile, changes) { const name = left.name.text; if ((isFunctionExpression(right) || isArrowFunction(right) || isClassExpression(right)) && (!right.name || right.name.text === name)) { - changes.replaceRange(sourceFile, { pos: left.getStart(sourceFile), end: right.getStart(sourceFile) }, factory.createToken(93 /* ExportKeyword */), { suffix: " " }); + changes.replaceRange(sourceFile, { pos: left.getStart(sourceFile), end: right.getStart(sourceFile) }, factory.createToken(94 /* ExportKeyword */), { suffix: " " }); if (!right.name) changes.insertName(sourceFile, right, name); const semi = findChildOfKind(parent2, 26 /* SemicolonToken */, sourceFile); @@ -140876,23 +140940,23 @@ sourceFile, left.expression, findChildOfKind(left, 24 /* DotToken */, sourceFile), - [factory.createToken(93 /* ExportKeyword */), factory.createToken(85 /* ConstKeyword */)], + [factory.createToken(94 /* ExportKeyword */), factory.createToken(86 /* ConstKeyword */)], { joiner: " ", suffix: " " } ); } } function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { - const modifiers = [factory.createToken(93 /* ExportKeyword */)]; + const modifiers = [factory.createToken(94 /* ExportKeyword */)]; switch (exported.kind) { - case 215 /* FunctionExpression */: { + case 216 /* FunctionExpression */: { const { name: expressionName } = exported; if (expressionName && expressionName.text !== name) { return exportConst(); } } - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); default: return exportConst(); @@ -140917,7 +140981,7 @@ replaceNode ); function replaceNode(original) { - if (original.kind === 208 /* PropertyAccessExpression */) { + if (original.kind === 209 /* PropertyAccessExpression */) { const replacement = useSitesToUnqualify.get(original); useSitesToUnqualify.delete(original); return replacement; @@ -140926,7 +140990,7 @@ } function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: { + case 204 /* ObjectBindingPattern */: { const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier(e.propertyName) || !isIdentifier(e.name) ? void 0 : makeImportSpecifier(e.propertyName && e.propertyName.text, e.name.text)); if (importSpecifiers) { return convertedImports([makeImport( @@ -140938,7 +141002,7 @@ )]); } } - case 204 /* ArrayBindingPattern */: { + case 205 /* ArrayBindingPattern */: { const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); return convertedImports([ makeImport( @@ -141025,11 +141089,11 @@ function isFreeIdentifier(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return parent2.name !== node; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return parent2.propertyName !== node; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return parent2.propertyName !== node; default: return true; @@ -141183,7 +141247,7 @@ const exportDeclaration = exportClause.parent; const typeExportSpecifiers = getTypeExportSpecifiers(exportSpecifier, context); if (typeExportSpecifiers.length === exportClause.elements.length) { - changes.insertModifierBefore(context.sourceFile, 154 /* TypeKeyword */, exportClause); + changes.insertModifierBefore(context.sourceFile, 155 /* TypeKeyword */, exportClause); } else { const valueExportDeclaration = factory.updateExportDeclaration( exportDeclaration, @@ -141404,10 +141468,10 @@ const typeName = (_a2 = tag.name) == null ? void 0 : _a2.getText(); if (!typeName) return; - if (typeExpression.kind === 325 /* JSDocTypeLiteral */) { + if (typeExpression.kind === 326 /* JSDocTypeLiteral */) { return createInterfaceForTypeLiteral(typeName, typeExpression); } - if (typeExpression.kind === 312 /* JSDocTypeExpression */) { + if (typeExpression.kind === 313 /* JSDocTypeExpression */) { return createTypeAliasForTypeExpression(typeName, typeExpression); } } @@ -142020,11 +142084,11 @@ function getNamespaceLikeImportText(declaration) { var _a2, _b, _c; switch (declaration.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return (_a2 = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a2.text; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return declaration.name.text; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); @@ -142044,11 +142108,11 @@ } function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, compilerOptions) { return firstDefined(existingImports, ({ declaration, importKind, symbol, targetFlags }) => { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 268 /* ImportEqualsDeclaration */) { + if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 269 /* ImportEqualsDeclaration */) { return void 0; } - if (declaration.kind === 257 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 203 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; + if (declaration.kind === 258 /* VariableDeclaration */) { + return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 204 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; } const { importClause } = declaration; if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier)) @@ -142068,7 +142132,7 @@ if (importKind === 1 /* Default */ && (name || // Cannot add a default import to a declaration that already has one addAsTypeOnly === 2 /* Required */ && namedBindings)) return void 0; - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 271 /* NamespaceImport */) + if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 272 /* NamespaceImport */) return void 0; return { kind: 2 /* AddToExisting */, @@ -142088,7 +142152,7 @@ if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); } - } else if (i.kind === 269 /* ImportDeclaration */ || i.kind === 268 /* ImportEqualsDeclaration */) { + } else if (i.kind === 270 /* ImportDeclaration */ || i.kind === 269 /* ImportEqualsDeclaration */) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); @@ -142541,7 +142605,7 @@ case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile, preferences); - return promotedDeclaration.kind === 273 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; + return promotedDeclaration.kind === 274 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; } default: return Debug.assertNever(fix, `Unexpected fix kind ${fix.kind}`); @@ -142549,12 +142613,12 @@ } function getModuleSpecifierText(promotedDeclaration) { var _a2, _b; - return promotedDeclaration.kind === 268 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a2 = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; + return promotedDeclaration.kind === 269 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a2 = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; } function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceFile, preferences) { const convertExistingToTypeOnly = importNameElisionDisabled(compilerOptions); switch (aliasDeclaration.kind) { - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences); if (aliasDeclaration.parent.elements.length > 1 && sortKind) { @@ -142578,13 +142642,13 @@ promoteImportClause(aliasDeclaration.parent.parent); return aliasDeclaration.parent.parent; } - case 270 /* ImportClause */: + case 271 /* ImportClause */: promoteImportClause(aliasDeclaration); return aliasDeclaration; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: promoteImportClause(aliasDeclaration.parent); return aliasDeclaration.parent; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); return aliasDeclaration; default: @@ -142595,13 +142659,13 @@ if (convertExistingToTypeOnly) { const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { - if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 273 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { + if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 274 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { changes.delete(sourceFile, aliasDeclaration); changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); } for (const element of namedImports.elements) { if (element !== aliasDeclaration && !element.isTypeOnly) { - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, element); + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, element); } } } @@ -142610,7 +142674,7 @@ } function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, compilerOptions, preferences) { var _a2; - if (clause.kind === 203 /* ObjectBindingPattern */) { + if (clause.kind === 204 /* ObjectBindingPattern */) { if (defaultImport) { addElementToBindingPattern(clause, defaultImport.name, "default"); } @@ -142679,7 +142743,7 @@ changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(clause, sourceFile)); if (convertExistingToTypeOnly && existingSpecifiers) { for (const specifier of existingSpecifiers) { - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, specifier); + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, specifier); } } } @@ -143067,7 +143131,7 @@ const lastDecorator = findLast(modifiers, isDecorator); const modifierPos = abstractModifier ? abstractModifier.end : staticModifier ? staticModifier.end : accessibilityModifier ? accessibilityModifier.end : lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : classElement.getStart(sourceFile); const options = accessibilityModifier || staticModifier || abstractModifier ? { prefix: " " } : { suffix: " " }; - changeTracker.insertModifierAt(sourceFile, modifierPos, 161 /* OverrideKeyword */, options); + changeTracker.insertModifierAt(sourceFile, modifierPos, 162 /* OverrideKeyword */, options); } function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { const classElement = findContainerClassElementLike(sourceFile, pos); @@ -143081,13 +143145,13 @@ } function isClassElementLikeHasJSDoc(node) { switch (node.kind) { - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; - case 166 /* Parameter */: + case 167 /* Parameter */: return isParameterPropertyDeclaration(node, node.parent); default: return false; @@ -143171,7 +143235,7 @@ /*includeClassComputedPropertyName*/ false ))) { - const fnKeyword = Debug.checkDefined(findChildOfKind(fn, 98 /* FunctionKeyword */, sourceFile)); + const fnKeyword = Debug.checkDefined(findChildOfKind(fn, 99 /* FunctionKeyword */, sourceFile)); const { name } = fn; const body = Debug.checkDefined(fn.body); if (isFunctionExpression(fn)) { @@ -143185,7 +143249,7 @@ changes.insertText(sourceFile, body.pos, " =>"); return [Diagnostics.Convert_function_expression_0_to_arrow_function, name ? name.text : ANONYMOUS]; } else { - changes.replaceNode(sourceFile, fnKeyword, factory.createToken(85 /* ConstKeyword */)); + changes.replaceNode(sourceFile, fnKeyword, factory.createToken(86 /* ConstKeyword */)); changes.insertText(sourceFile, name.end, " = "); changes.insertText(sourceFile, body.pos, " =>"); return [Diagnostics.Convert_function_declaration_0_to_arrow_function, name.text]; @@ -143387,7 +143451,7 @@ }); function getNamedTupleMember(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 199 /* NamedTupleMember */); + return findAncestor(token, (t) => t.kind === 200 /* NamedTupleMember */); } function doChange10(changes, sourceFile, namedTupleMember) { if (!namedTupleMember) { @@ -143396,10 +143460,10 @@ let unwrappedType = namedTupleMember.type; let sawOptional = false; let sawRest = false; - while (unwrappedType.kind === 187 /* OptionalType */ || unwrappedType.kind === 188 /* RestType */ || unwrappedType.kind === 193 /* ParenthesizedType */) { - if (unwrappedType.kind === 187 /* OptionalType */) { + while (unwrappedType.kind === 188 /* OptionalType */ || unwrappedType.kind === 189 /* RestType */ || unwrappedType.kind === 194 /* ParenthesizedType */) { + if (unwrappedType.kind === 188 /* OptionalType */) { sawOptional = true; - } else if (unwrappedType.kind === 188 /* RestType */) { + } else if (unwrappedType.kind === 189 /* RestType */) { sawRest = true; } unwrappedType = unwrappedType.type; @@ -143469,7 +143533,7 @@ containingType = checker.getNonNullableType(containingType); } suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); - } else if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 101 /* InKeyword */ && parent2.left === node && isPrivateIdentifier(node)) { + } else if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 102 /* InKeyword */ && parent2.left === node && isPrivateIdentifier(node)) { const receiverType = checker.getTypeAtLocation(parent2.right); suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, receiverType); } else if (isQualifiedName(parent2) && parent2.right === node) { @@ -143738,19 +143802,19 @@ } function getVariableLikeInitializer(declaration) { switch (declaration.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: - case 299 /* PropertyAssignment */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: + case 300 /* PropertyAssignment */: return declaration.initializer; - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 300 /* ShorthandPropertyAssignment */: - case 168 /* PropertySignature */: - case 302 /* EnumMember */: - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: + case 301 /* ShorthandPropertyAssignment */: + case 169 /* PropertySignature */: + case 303 /* EnumMember */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: return void 0; } } @@ -144006,7 +144070,7 @@ function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { const tokenName = token.text; if (makeStatic) { - if (classDeclaration.kind === 228 /* ClassExpression */) { + if (classDeclaration.kind === 229 /* ClassExpression */) { return; } const className = classDeclaration.name.getText(); @@ -144059,7 +144123,7 @@ } function getTypeNode2(checker, node, token) { let typeNode; - if (token.parent.parent.kind === 223 /* BinaryExpression */) { + if (token.parent.parent.kind === 224 /* BinaryExpression */) { const binaryExpression = token.parent.parent; const otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left; const widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression))); @@ -144073,7 +144137,7 @@ 1 /* NoTruncation */ ) : void 0; } - return typeNode || factory.createKeywordTypeNode(131 /* AnyKeyword */); + return typeNode || factory.createKeywordTypeNode(132 /* AnyKeyword */); } function addPropertyDeclaration(changeTracker, sourceFile, node, tokenName, typeNode, modifierFlags) { const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0; @@ -144110,7 +144174,7 @@ return res; } function createAddIndexSignatureAction(context, sourceFile, node, tokenName, typeNode) { - const stringTypeNode = factory.createKeywordTypeNode(152 /* StringKeyword */); + const stringTypeNode = factory.createKeywordTypeNode(153 /* StringKeyword */); const indexingParameter = factory.createParameterDeclaration( /*modifiers*/ void 0, @@ -144150,7 +144214,7 @@ } function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 171 /* MethodDeclaration */ : 170 /* MethodSignature */; + const kind = isClassLike(parentDeclaration) ? 172 /* MethodDeclaration */ : 171 /* MethodSignature */; const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); if (containingMethodDeclaration) { @@ -144179,8 +144243,8 @@ function addFunctionDeclaration(changes, context, info) { const quotePreference = getQuotePreference(context.sourceFile, context.preferences); const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(259 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( - 259 /* FunctionDeclaration */, + const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(260 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( + 260 /* FunctionDeclaration */, context, quotePreference, info.signature, @@ -144329,7 +144393,7 @@ if (signature === void 0) return createUndefined(); const func = createSignatureDeclarationFromSignature( - 215 /* FunctionExpression */, + 216 /* FunctionExpression */, context, quotePreference, signature[0], @@ -144586,7 +144650,7 @@ } function getNodes(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - if (token.kind !== 108 /* ThisKeyword */) + if (token.kind !== 109 /* ThisKeyword */) return void 0; const constructor = getContainingFunction(token); const superCall = findSuperCall(constructor.body); @@ -144805,11 +144869,11 @@ const token = getTokenAtPosition(sourceFile, pos); const heritageClauses = getContainingClass(token).heritageClauses; const extendsToken = heritageClauses[0].getFirstToken(); - return extendsToken.kind === 94 /* ExtendsKeyword */ ? { extendsToken, heritageClauses } : void 0; + return extendsToken.kind === 95 /* ExtendsKeyword */ ? { extendsToken, heritageClauses } : void 0; } function doChanges2(changes, sourceFile, extendsToken, heritageClauses) { - changes.replaceNode(sourceFile, extendsToken, factory.createToken(117 /* ImplementsKeyword */)); - if (heritageClauses.length === 2 && heritageClauses[0].token === 94 /* ExtendsKeyword */ && heritageClauses[1].token === 117 /* ImplementsKeyword */) { + changes.replaceNode(sourceFile, extendsToken, factory.createToken(118 /* ImplementsKeyword */)); + if (heritageClauses.length === 2 && heritageClauses[0].token === 95 /* ExtendsKeyword */ && heritageClauses[1].token === 118 /* ImplementsKeyword */) { const implementsToken = heritageClauses[1].getFirstToken(); const implementsFullStart = implementsToken.getFullStart(); changes.replaceRange(sourceFile, { pos: implementsFullStart, end: implementsFullStart }, factory.createToken(27 /* CommaToken */)); @@ -145008,7 +145072,7 @@ const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); if (!importDeclaration) return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 273 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); + const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 274 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); const typeOnlyChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => doTypeOnlyImportChange(t, context.sourceFile, importDeclaration, context.program)); let actions2; if (namespaceChanges.length) { @@ -145023,18 +145087,18 @@ }); function getImportDeclaration(sourceFile, program, start2) { const identifier = tryCast(getTokenAtPosition(sourceFile, start2), isIdentifier); - if (!identifier || identifier.parent.kind !== 180 /* TypeReference */) + if (!identifier || identifier.parent.kind !== 181 /* TypeReference */) return; const checker = program.getTypeChecker(); const symbol = checker.getSymbolAtLocation(identifier); return find((symbol == null ? void 0 : symbol.declarations) || emptyArray, or(isImportClause, isImportSpecifier, isImportEqualsDeclaration)); } function doTypeOnlyImportChange(changes, sourceFile, importDeclaration, program) { - if (importDeclaration.kind === 268 /* ImportEqualsDeclaration */) { - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, importDeclaration.name); + if (importDeclaration.kind === 269 /* ImportEqualsDeclaration */) { + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, importDeclaration.name); return; } - const importClause = importDeclaration.kind === 270 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; + const importClause = importDeclaration.kind === 271 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; if (importClause.name && importClause.namedBindings) { return; } @@ -145046,7 +145110,7 @@ if (importsValue) { return; } - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, importClause); + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, importClause); } function doNamespaceImportChange(changes, sourceFile, importDeclaration, program) { ts_refactor_exports.doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, importDeclaration.parent); @@ -145122,7 +145186,7 @@ ]; } const result = []; - if (token.kind === 138 /* InferKeyword */) { + if (token.kind === 139 /* InferKeyword */) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => changeInferToUnknown(t, sourceFile, token)); const name = cast(token.parent, isInferTypeNode).typeParameter.name.text; result.push(createCodeFixAction(fixName3, changes, [Diagnostics.Replace_infer_0_with_unknown, name], fixIdInfer, Diagnostics.Replace_all_unused_infer_with_unknown)); @@ -145180,7 +145244,7 @@ break; } case fixIdDelete: { - if (token.kind === 138 /* InferKeyword */ || isImport(token)) { + if (token.kind === 139 /* InferKeyword */ || isImport(token)) { break; } else if (isJSDocTemplateTag(token)) { changes.delete(sourceFile, token); @@ -145212,7 +145276,7 @@ break; } case fixIdInfer: - if (token.kind === 138 /* InferKeyword */) { + if (token.kind === 139 /* InferKeyword */) { changeInferToUnknown(changes, sourceFile, token); } break; @@ -145223,7 +145287,7 @@ } }); function changeInferToUnknown(changes, sourceFile, token) { - changes.replaceNode(sourceFile, token.parent, factory.createKeywordTypeNode(157 /* UnknownKeyword */)); + changes.replaceNode(sourceFile, token.parent, factory.createKeywordTypeNode(158 /* UnknownKeyword */)); } function createDeleteFix(changes, diag2) { return createCodeFixAction(fixName3, changes, diag2, fixIdDelete, Diagnostics.Delete_all_unused_declarations); @@ -145232,16 +145296,16 @@ changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } function isImport(token) { - return token.kind === 100 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 273 /* ImportSpecifier */ || token.parent.kind === 270 /* ImportClause */); + return token.kind === 101 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 274 /* ImportSpecifier */ || token.parent.kind === 271 /* ImportClause */); } function tryGetFullImport(token) { - return token.kind === 100 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; + return token.kind === 101 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; } function canDeleteEntireVariableStatement(sourceFile, token) { return isVariableDeclarationList(token.parent) && first(token.parent.getChildren(sourceFile)) === token; } function deleteEntireVariableStatement(changes, sourceFile, node) { - changes.delete(sourceFile, node.parent.kind === 240 /* VariableStatement */ ? node.parent : node); + changes.delete(sourceFile, node.parent.kind === 241 /* VariableStatement */ ? node.parent : node); } function deleteDestructuringElements(changes, sourceFile, node) { forEach(node.elements, (n) => changes.delete(sourceFile, n)); @@ -145267,7 +145331,7 @@ function tryPrefixDeclaration(changes, errorCode, sourceFile, token) { if (errorCode === Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code) return; - if (token.kind === 138 /* InferKeyword */) { + if (token.kind === 139 /* InferKeyword */) { token = cast(token.parent, isInferTypeNode).typeParameter.name; } if (isIdentifier(token) && canPrefix(token)) { @@ -145283,14 +145347,14 @@ } function canPrefix(token) { switch (token.parent.kind) { - case 166 /* Parameter */: - case 165 /* TypeParameter */: + case 167 /* Parameter */: + case 166 /* TypeParameter */: return true; - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { const varDecl = token.parent; switch (varDecl.parent.parent.kind) { - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: return true; } } @@ -145339,8 +145403,8 @@ function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { const { parent: parent2 } = parameter; switch (parent2.kind) { - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: const index = parent2.parameters.indexOf(parameter); const referent = isMethodDeclaration(parent2) ? parent2.name : parent2; const entries = ts_FindAllReferences_exports.Core.getReferencedSymbolsForNode(parent2.pos, referent, program, sourceFiles, cancellationToken); @@ -145358,18 +145422,18 @@ } } return true; - case 259 /* FunctionDeclaration */: { + case 260 /* FunctionDeclaration */: { if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { return isLastParameter(parent2, parameter, isFixAll); } return true; } - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return isLastParameter(parent2, parameter, isFixAll); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return false; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return true; default: return Debug.failBadSyntaxKind(parent2); @@ -145419,7 +145483,7 @@ const container = (isBlock(statement.parent) ? statement.parent : statement).parent; if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { - case 242 /* IfStatement */: + case 243 /* IfStatement */: if (container.elseStatement) { if (isBlock(statement.parent)) { break; @@ -145428,8 +145492,8 @@ } return; } - case 244 /* WhileStatement */: - case 245 /* ForStatement */: + case 245 /* WhileStatement */: + case 246 /* ForStatement */: changes.delete(sourceFile, container); return; } @@ -145497,7 +145561,7 @@ const { typeNode, type } = info; const original = typeNode.getText(sourceFile); const actions2 = [fix(type, fixIdPlain, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)]; - if (typeNode.kind === 317 /* JSDocNullableType */) { + if (typeNode.kind === 318 /* JSDocNullableType */) { actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); } return actions2; @@ -145515,7 +145579,7 @@ if (!info) return; const { typeNode, type } = info; - const fixedType = typeNode.kind === 317 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; + const fixedType = typeNode.kind === 318 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; doChange21(changes, sourceFile, typeNode, fixedType, checker); }); } @@ -145536,22 +145600,22 @@ } function isTypeContainer(node) { switch (node.kind) { - case 231 /* AsExpression */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 259 /* FunctionDeclaration */: - case 174 /* GetAccessor */: - case 178 /* IndexSignature */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 175 /* SetAccessor */: - case 262 /* TypeAliasDeclaration */: - case 213 /* TypeAssertionExpression */: - case 257 /* VariableDeclaration */: + case 232 /* AsExpression */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 260 /* FunctionDeclaration */: + case 175 /* GetAccessor */: + case 179 /* IndexSignature */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 176 /* SetAccessor */: + case 263 /* TypeAliasDeclaration */: + case 214 /* TypeAssertionExpression */: + case 258 /* VariableDeclaration */: return true; default: return false; @@ -145654,14 +145718,14 @@ } let insertBefore; switch (containingFunction.kind) { - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: insertBefore = containingFunction.name; break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - insertBefore = findChildOfKind(containingFunction, 98 /* FunctionKeyword */, sourceFile); + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + insertBefore = findChildOfKind(containingFunction, 99 /* FunctionKeyword */, sourceFile); break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: const kind = containingFunction.typeParameters ? 29 /* LessThanToken */ : 20 /* OpenParenToken */; insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); break; @@ -145680,7 +145744,7 @@ changes.replaceNode(sourceFile, returnType, factory.createTypeReferenceNode("Promise", factory.createNodeArray([returnType]))); } } - changes.insertModifierBefore(sourceFile, 132 /* AsyncKeyword */, insertBefore); + changes.insertModifierBefore(sourceFile, 133 /* AsyncKeyword */, insertBefore); } // src/services/codefixes/fixPropertyOverrideAccessor.ts @@ -145838,7 +145902,7 @@ return errorCode; } function doChange25(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, preferences) { - if (!isParameterPropertyModifier(token.kind) && token.kind !== 79 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 108 /* ThisKeyword */) { + if (!isParameterPropertyModifier(token.kind) && token.kind !== 79 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 109 /* ThisKeyword */) { return void 0; } const { parent: parent2 } = token; @@ -145991,7 +146055,7 @@ function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 168 /* PropertySignature */) { + if (isInJSFile(sourceFile) && declaration.kind !== 169 /* PropertySignature */) { const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; if (!parent2) { return; @@ -146102,17 +146166,17 @@ function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { let searchToken; switch (containingFunction.kind) { - case 173 /* Constructor */: - searchToken = findChildOfKind(containingFunction, 135 /* ConstructorKeyword */, sourceFile); + case 174 /* Constructor */: + searchToken = findChildOfKind(containingFunction, 136 /* ConstructorKeyword */, sourceFile); break; - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: const parent2 = containingFunction.parent; searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; break; - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: searchToken = containingFunction.name; break; } @@ -146248,44 +146312,44 @@ node = node.parent; } switch (node.parent.kind) { - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: inferTypeFromExpressionStatement(node, usage); break; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: usage.isNumber = true; break; - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: inferTypeFromPrefixUnaryExpression(node.parent, usage); break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: inferTypeFromBinaryExpression(node, node.parent, usage); break; - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: inferTypeFromSwitchStatementLabel(node.parent, usage); break; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: if (node.parent.expression === node) { inferTypeFromCallExpression(node.parent, usage); } else { inferTypeFromContextualType(node, usage); } break; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: inferTypeFromPropertyAccessExpression(node.parent, usage); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: inferTypeFromPropertyElementExpression(node.parent, node, usage); break; - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: inferTypeFromPropertyAssignment(node.parent, usage); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: inferTypeFromPropertyDeclaration(node.parent, usage); break; - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { const { name, initializer } = node.parent; if (node === name) { if (initializer) { @@ -146375,14 +146439,14 @@ case 35 /* ExclamationEqualsToken */: addCandidateType(usage, checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left)); break; - case 101 /* InKeyword */: + case 102 /* InKeyword */: if (node === parent2.left) { usage.isString = true; } break; case 56 /* BarBarToken */: case 60 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 257 /* VariableDeclaration */ || isAssignmentExpression( + if (node === parent2.left && (node.parent.parent.kind === 258 /* VariableDeclaration */ || isAssignmentExpression( node.parent.parent, /*excludeCompoundAssignment*/ true @@ -146392,7 +146456,7 @@ break; case 55 /* AmpersandAmpersandToken */: case 27 /* CommaToken */: - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: break; } } @@ -146410,7 +146474,7 @@ } } calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 210 /* CallExpression */) { + if (parent2.kind === 211 /* CallExpression */) { (usage.calls || (usage.calls = [])).push(call); } else { (usage.constructs || (usage.constructs = [])).push(call); @@ -146879,7 +146943,7 @@ const declaration = declarations == null ? void 0 : declarations[0]; const checker = context.program.getTypeChecker(); const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); - const kind = (_a2 = declaration == null ? void 0 : declaration.kind) != null ? _a2 : 168 /* PropertySignature */; + const kind = (_a2 = declaration == null ? void 0 : declaration.kind) != null ? _a2 : 169 /* PropertySignature */; const declarationName = getSynthesizedDeepClone( getNameOfDeclaration(declaration), /*includeTrivia*/ @@ -146896,8 +146960,8 @@ const ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient; const quotePreference = getQuotePreference(sourceFile, preferences); switch (kind) { - case 168 /* PropertySignature */: - case 169 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 170 /* PropertyDeclaration */: const flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : void 0; let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { @@ -146916,8 +146980,8 @@ void 0 )); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { Debug.assertIsDefined(declarations); let typeNode2 = checker.typeToTypeNode( type, @@ -146965,8 +147029,8 @@ } break; } - case 170 /* MethodSignature */: - case 171 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 172 /* MethodDeclaration */: Debug.assertIsDefined(declarations); const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); if (!some(signatures)) { @@ -146993,7 +147057,7 @@ break; } function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(171 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); + const method = createSignatureDeclarationFromSignature(172 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); if (method) addClassElement(method); } @@ -147003,7 +147067,7 @@ modifiers2 = combine(modifiers2, factory.createModifiersFromModifierFlags(modifierFlags)); } if (shouldAddOverrideKeyword()) { - modifiers2 = append(modifiers2, factory.createToken(161 /* OverrideKeyword */)); + modifiers2 = append(modifiers2, factory.createToken(162 /* OverrideKeyword */)); } return modifiers2 && factory.createNodeArray(modifiers2); } @@ -147164,7 +147228,7 @@ tracker ); switch (kind) { - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return factory.createMethodDeclaration( modifiers, asteriskToken, @@ -147176,7 +147240,7 @@ type, createStubbedMethodBody(quotePreference) ); - case 170 /* MethodSignature */: + case 171 /* MethodSignature */: return factory.createMethodSignature( modifiers, name, @@ -147184,9 +147248,9 @@ void 0, typeParameters, parameters, - type === void 0 ? factory.createKeywordTypeNode(157 /* UnknownKeyword */) : type + type === void 0 ? factory.createKeywordTypeNode(158 /* UnknownKeyword */) : type ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return factory.createFunctionDeclaration( modifiers, asteriskToken, @@ -147303,7 +147367,7 @@ /*questionToken*/ minArgumentCount !== void 0 && i >= minArgumentCount ? factory.createToken(57 /* QuestionToken */) : void 0, /*type*/ - inJs ? void 0 : (types == null ? void 0 : types[i]) || factory.createKeywordTypeNode(157 /* UnknownKeyword */), + inJs ? void 0 : (types == null ? void 0 : types[i]) || factory.createKeywordTypeNode(158 /* UnknownKeyword */), /*initializer*/ void 0 ); @@ -147343,7 +147407,7 @@ maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", /*questionToken*/ maxNonRestArgs >= minArgumentCount ? factory.createToken(57 /* QuestionToken */) : void 0, - factory.createArrayTypeNode(factory.createKeywordTypeNode(157 /* UnknownKeyword */)), + factory.createArrayTypeNode(factory.createKeywordTypeNode(158 /* UnknownKeyword */)), /*initializer*/ void 0 ); @@ -147578,7 +147642,7 @@ isStatic: hasStaticModifier(declaration), isReadonly: hasEffectiveReadonlyModifier(declaration), type: getDeclarationType(declaration, program), - container: declaration.kind === 166 /* Parameter */ ? declaration.parent.parent : declaration.parent, + container: declaration.kind === 167 /* Parameter */ ? declaration.parent.parent : declaration.parent, originalName: declaration.name.text, declaration, fieldName, @@ -147673,10 +147737,10 @@ if (!constructor.body) return; constructor.body.forEachChild(function recur(node) { - if (isElementAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */ && isStringLiteral(node.argumentExpression) && node.argumentExpression.text === originalName && isWriteAccess(node)) { + if (isElementAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */ && isStringLiteral(node.argumentExpression) && node.argumentExpression.text === originalName && isWriteAccess(node)) { changeTracker.replaceNode(file, node.argumentExpression, factory.createStringLiteral(fieldName)); } - if (isPropertyAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */ && node.name.text === originalName && isWriteAccess(node)) { + if (isPropertyAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */ && node.name.text === originalName && isWriteAccess(node)) { changeTracker.replaceNode(file, node.name, factory.createIdentifier(fieldName)); } if (!isFunctionLike(node) && !isClassLike(node)) { @@ -147691,7 +147755,7 @@ const type = typeChecker.getTypeFromTypeNode(typeNode); if (!typeChecker.isTypeAssignableTo(typeChecker.getUndefinedType(), type)) { const types = isUnionTypeNode(typeNode) ? typeNode.types : [typeNode]; - return factory.createUnionTypeNode([...types, factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]); + return factory.createUnionTypeNode([...types, factory.createKeywordTypeNode(156 /* UndefinedKeyword */)]); } } return typeNode; @@ -147752,7 +147816,7 @@ }); function getActionsForUsageOfInvalidImport(context) { const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 210 /* CallExpression */ : 211 /* NewExpression */; + const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 211 /* CallExpression */ : 212 /* NewExpression */; const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); if (!node) { return []; @@ -147880,7 +147944,7 @@ return createCodeFixAction(fixName6, changes, [Diagnostics.Add_undefined_type_to_property_0, info.prop.name.getText()], fixIdAddUndefinedType, Diagnostics.Add_undefined_type_to_all_uninitialized_properties); } function addUndefinedType(changeTracker, sourceFile, info) { - const undefinedTypeNode = factory.createKeywordTypeNode(155 /* UndefinedKeyword */); + const undefinedTypeNode = factory.createKeywordTypeNode(156 /* UndefinedKeyword */); const types = isUnionTypeNode(info.type) ? info.type.types.concat(undefinedTypeNode) : [info.type, undefinedTypeNode]; const unionTypeNode = factory.createUnionTypeNode(types); if (info.isJs) { @@ -148122,8 +148186,8 @@ }); function getImportTypeNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - Debug.assert(token.kind === 100 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 202 /* ImportType */, "Token parent should be an ImportType"); + Debug.assert(token.kind === 101 /* ImportKeyword */, "This token should be an ImportKeyword"); + Debug.assert(token.parent.kind === 203 /* ImportType */, "Token parent should be an ImportType"); return token.parent; } function doChange29(changes, sourceFile, importType) { @@ -148242,7 +148306,7 @@ parameter.type ); const mappedIntersectionType = factory.createMappedTypeNode( - hasEffectiveReadonlyModifier(indexSignature) ? factory.createModifier(146 /* ReadonlyKeyword */) : void 0, + hasEffectiveReadonlyModifier(indexSignature) ? factory.createModifier(147 /* ReadonlyKeyword */) : void 0, mappedTypeParameter, /*nameType*/ void 0, @@ -148298,7 +148362,7 @@ } }); function makeChange10(changeTracker, sourceFile, span) { - const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 133 /* AwaitKeyword */); + const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 134 /* AwaitKeyword */); const awaitExpression = awaitKeyword && tryCast(awaitKeyword.parent, isAwaitExpression); if (!awaitExpression) { return; @@ -148313,7 +148377,7 @@ ); if (isIdentifier(leftMostExpression)) { const precedingToken = findPrecedingToken(awaitExpression.parent.pos, sourceFile); - if (precedingToken && precedingToken.kind !== 103 /* NewKeyword */) { + if (precedingToken && precedingToken.kind !== 104 /* NewKeyword */) { expressionToReplace = awaitExpression.parent; } } @@ -148414,13 +148478,13 @@ const declaration = tryCast((_a2 = symbol == null ? void 0 : symbol.valueDeclaration) == null ? void 0 : _a2.parent, isVariableDeclarationList); if (declaration === void 0) return; - const constToken = findChildOfKind(declaration, 85 /* ConstKeyword */, sourceFile); + const constToken = findChildOfKind(declaration, 86 /* ConstKeyword */, sourceFile); if (constToken === void 0) return; return { symbol, token: constToken }; } function doChange32(changes, sourceFile, token) { - changes.replaceNode(sourceFile, token, factory.createToken(119 /* LetKeyword */)); + changes.replaceNode(sourceFile, token, factory.createToken(120 /* LetKeyword */)); } // src/services/codefixes/fixExpectedComma.ts @@ -148494,7 +148558,7 @@ const typeArguments = getEffectiveTypeArguments(decl.parent.parent); if (some(typeArguments)) { const typeArgument = typeArguments[0]; - const needsParens = !isUnionTypeNode(typeArgument) && !isParenthesizedTypeNode(typeArgument) && isParenthesizedTypeNode(factory.createUnionTypeNode([typeArgument, factory.createKeywordTypeNode(114 /* VoidKeyword */)]).types[0]); + const needsParens = !isUnionTypeNode(typeArgument) && !isParenthesizedTypeNode(typeArgument) && isParenthesizedTypeNode(factory.createUnionTypeNode([typeArgument, factory.createKeywordTypeNode(115 /* VoidKeyword */)]).types[0]); if (needsParens) { changes.insertText(sourceFile, typeArgument.pos, "("); } @@ -148700,7 +148764,7 @@ if (stringCompletions) { return stringCompletions; } - if (previousToken && isBreakOrContinueStatement(previousToken.parent) && (previousToken.kind === 81 /* BreakKeyword */ || previousToken.kind === 86 /* ContinueKeyword */ || previousToken.kind === 79 /* Identifier */)) { + if (previousToken && isBreakOrContinueStatement(previousToken.parent) && (previousToken.kind === 82 /* BreakKeyword */ || previousToken.kind === 87 /* ContinueKeyword */ || previousToken.kind === 79 /* Identifier */)) { return getLabelCompletionAtPosition(previousToken.parent); } const completionData = getCompletionData( @@ -148842,7 +148906,7 @@ } function keywordFiltersFromSyntaxKind(keywordCompletion) { switch (keywordCompletion) { - case 154 /* TypeKeyword */: + case 155 /* TypeKeyword */: return 8 /* TypeKeyword */; default: Debug.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters"); @@ -149068,14 +149132,14 @@ } function typeNodeToExpression(typeNode, languageVersion, quotePreference) { switch (typeNode.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: const typeName = typeNode.typeName; return entityNameToExpression(typeName, languageVersion, quotePreference); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: const objectExpression = typeNodeToExpression(typeNode.objectType, languageVersion, quotePreference); const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference); return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression); - case 198 /* LiteralType */: + case 199 /* LiteralType */: const literal = typeNode.literal; switch (literal.kind) { case 10 /* StringLiteral */: @@ -149084,12 +149148,12 @@ return factory.createNumericLiteral(literal.text, literal.numericLiteralFlags); } return void 0; - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference); return exp && (isIdentifier(exp) ? exp : factory.createParenthesizedExpression(exp)); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference); - case 202 /* ImportType */: + case 203 /* ImportType */: Debug.fail(`We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.`); } return void 0; @@ -149124,12 +149188,12 @@ function getJsxClosingTagCompletion(location, sourceFile) { const jsxClosingElement = findAncestor(location, (node) => { switch (node.kind) { - case 284 /* JsxClosingElement */: + case 285 /* JsxClosingElement */: return true; case 43 /* SlashToken */: case 31 /* GreaterThanToken */: case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return false; default: return "quit"; @@ -149483,10 +149547,10 @@ const quotePreference = getQuotePreference(sourceFile, preferences); const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (declaration.kind) { - case 168 /* PropertySignature */: - case 169 /* PropertyDeclaration */: - case 170 /* MethodSignature */: - case 171 /* MethodDeclaration */: { + case 169 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 171 /* MethodSignature */: + case 172 /* MethodDeclaration */: { let effectiveType = type.flags & 1048576 /* Union */ && type.types.length < 10 ? checker.getUnionType(type.types, 2 /* Subtype */) : type; if (effectiveType.flags & 1048576 /* Union */) { const functionTypes = filter(effectiveType.types, (type2) => checker.getSignaturesOfType(type2, 0 /* Call */).length > 0); @@ -149723,8 +149787,8 @@ true ); const isImportSpecifierTypeOnly = importStatementCompletion.couldBeTypeOnlyImportSpecifier; - const topLevelTypeOnlyText = importStatementCompletion.isTopLevelTypeOnly ? ` ${tokenToString(154 /* TypeKeyword */)} ` : " "; - const importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? `${tokenToString(154 /* TypeKeyword */)} ` : ""; + const topLevelTypeOnlyText = importStatementCompletion.isTopLevelTypeOnly ? ` ${tokenToString(155 /* TypeKeyword */)} ` : " "; + const importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? `${tokenToString(155 /* TypeKeyword */)} ` : ""; const suffix = useSemicolons ? ";" : ""; switch (importKind) { case 3 /* CommonJS */: @@ -150109,18 +150173,18 @@ return getContextualTypeFromParent(previousToken, checker); case 63 /* EqualsToken */: switch (parent2.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return checker.getContextualType(parent2.initializer); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return checker.getTypeAtLocation(parent2.left); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return checker.getContextualTypeForJsxAttribute(parent2); default: return void 0; } - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: return checker.getContextualType(parent2); - case 82 /* CaseKeyword */: + case 83 /* CaseKeyword */: const caseClause = tryCast(parent2, isCaseClause); return caseClause ? getSwitchedType(caseClause, checker) : void 0; case 18 /* OpenBraceToken */: @@ -150151,7 +150215,7 @@ } function isModuleSymbol(symbol) { var _a2; - return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 308 /* SourceFile */)); + return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 309 /* SourceFile */)); } function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { const typeChecker = program.getTypeChecker(); @@ -150183,7 +150247,7 @@ const typeExpression = tryGetTypeExpressionFromTag(tag); if (typeExpression) { currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 351 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { + if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 352 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); } } @@ -150241,7 +150305,7 @@ isRightOfDot = contextToken.kind === 24 /* DotToken */; isRightOfQuestionDot = contextToken.kind === 28 /* QuestionDotToken */; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); @@ -150249,68 +150313,68 @@ return void 0; } break; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: node = parent2.left; break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: node = parent2.name; break; - case 202 /* ImportType */: + case 203 /* ImportType */: node = parent2; break; - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: node = parent2.getFirstToken(sourceFile); - Debug.assert(node.kind === 100 /* ImportKeyword */ || node.kind === 103 /* NewKeyword */); + Debug.assert(node.kind === 101 /* ImportKeyword */ || node.kind === 104 /* NewKeyword */); break; default: return void 0; } } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 208 /* PropertyAccessExpression */) { + if (parent2 && parent2.kind === 209 /* PropertyAccessExpression */) { contextToken = parent2; parent2 = parent2.parent; } if (currentToken.parent === location) { switch (currentToken.kind) { case 31 /* GreaterThanToken */: - if (currentToken.parent.kind === 281 /* JsxElement */ || currentToken.parent.kind === 283 /* JsxOpeningElement */) { + if (currentToken.parent.kind === 282 /* JsxElement */ || currentToken.parent.kind === 284 /* JsxOpeningElement */) { location = currentToken; } break; case 43 /* SlashToken */: - if (currentToken.parent.kind === 282 /* JsxSelfClosingElement */) { + if (currentToken.parent.kind === 283 /* JsxSelfClosingElement */) { location = currentToken; } break; } } switch (parent2.kind) { - case 284 /* JsxClosingElement */: + case 285 /* JsxClosingElement */: if (contextToken.kind === 43 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (!binaryExpressionMayBeOpenTag(parent2)) { break; } - case 282 /* JsxSelfClosingElement */: - case 281 /* JsxElement */: - case 283 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: + case 282 /* JsxElement */: + case 284 /* JsxOpeningElement */: isJsxIdentifierExpected = true; if (contextToken.kind === 29 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } break; - case 291 /* JsxExpression */: - case 290 /* JsxSpreadAttribute */: - if (previousToken.kind === 19 /* CloseBraceToken */ || previousToken.kind === 79 /* Identifier */ && previousToken.parent.kind === 288 /* JsxAttribute */) { + case 292 /* JsxExpression */: + case 291 /* JsxSpreadAttribute */: + if (previousToken.kind === 19 /* CloseBraceToken */ || previousToken.kind === 79 /* Identifier */ && previousToken.parent.kind === 289 /* JsxAttribute */) { isJsxIdentifierExpected = true; } break; - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: if (parent2.initializer === previousToken && previousToken.end < position) { isJsxIdentifierExpected = true; break; @@ -150398,15 +150462,15 @@ }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: - case 345 /* JSDocReturnTag */: - case 347 /* JSDocTypeTag */: - case 349 /* JSDocTypedefTag */: - case 352 /* JSDocThrowsTag */: - case 353 /* JSDocSatisfiesTag */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 346 /* JSDocReturnTag */: + case 348 /* JSDocTypeTag */: + case 350 /* JSDocTypedefTag */: + case 353 /* JSDocThrowsTag */: + case 354 /* JSDocSatisfiesTag */: return true; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return !!tag.constraint; default: return false; @@ -150415,7 +150479,7 @@ function tryGetTypeExpressionFromTag(tag) { if (isTagWithTypeExpression(tag)) { const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 312 /* JSDocTypeExpression */ ? typeExpression : void 0; + return typeExpression && typeExpression.kind === 313 /* JSDocTypeExpression */ ? typeExpression : void 0; } if (isJSDocAugmentsTag(tag) || isJSDocImplementsTag(tag)) { return tag.class; @@ -150425,7 +150489,7 @@ function getTypeScriptMemberSymbols() { completionKind = 2 /* PropertyAccess */; const isImportType = isLiteralImportTypeNode(node); - const isTypeLocation = insideJsDocTagTypeExpression || isImportType && !node.isTypeOf || isPartOfTypeNode(node.parent) || isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); + const isTypeLocation = isImportType && !node.isTypeOf || isPartOfTypeNode(node.parent) || isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); const isRhsOfImportDeclaration = isInRightSideOfInternalImportEqualsDeclaration(node); if (isEntityName(node) || isImportType || isPropertyAccessExpression(node)) { const isNamespaceName = isModuleDeclaration(node.parent); @@ -150445,13 +150509,13 @@ } : isRhsOfImportDeclaration ? ( // Any kind is allowed when dotting off namespace in internal import equals declaration (symbol2) => isValidTypeAccess(symbol2) || isValidValueAccess(symbol2) - ) : isTypeLocation ? isValidTypeAccess : isValidValueAccess; + ) : isTypeLocation || insideJsDocTagTypeExpression ? isValidTypeAccess : isValidValueAccess; for (const exportedSymbol of exportedSymbols) { if (isValidAccess(exportedSymbol)) { symbols.push(exportedSymbol); } } - if (!isTypeLocation && symbol.declarations && symbol.declarations.some((d) => d.kind !== 308 /* SourceFile */ && d.kind !== 264 /* ModuleDeclaration */ && d.kind !== 263 /* EnumDeclaration */)) { + if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 309 /* SourceFile */ && d.kind !== 265 /* ModuleDeclaration */ && d.kind !== 264 /* EnumDeclaration */)) { let type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); let insertQuestionDot = false; if (type.isNullableType()) { @@ -150494,7 +150558,7 @@ if (isRightOfQuestionDot && some(type.getCallSignatures())) { isNewIdentifierLocation = true; } - const propertyAccess = node.kind === 202 /* ImportType */ ? node : node.parent; + const propertyAccess = node.kind === 203 /* ImportType */ ? node : node.parent; if (inCheckedFile) { for (const symbol of type.getApparentProperties()) { if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) { @@ -150650,7 +150714,7 @@ } } } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 308 /* SourceFile */) { + if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 309 /* SourceFile */) { const thisType = typeChecker.tryGetThisTypeAt( scopeNode, /*includeGlobalThis*/ @@ -150685,10 +150749,10 @@ } function isSnippetScope(scopeNode) { switch (scopeNode.kind) { - case 308 /* SourceFile */: - case 225 /* TemplateExpression */: - case 291 /* JsxExpression */: - case 238 /* Block */: + case 309 /* SourceFile */: + case 226 /* TemplateExpression */: + case 292 /* JsxExpression */: + case 239 /* Block */: return true; default: return isStatement(scopeNode); @@ -150698,24 +150762,24 @@ return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 112 /* TypeOfKeyword */ && (contextToken2.parent.kind === 183 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 129 /* AssertsKeyword */ && contextToken2.parent.kind === 179 /* TypePredicate */); + return contextToken2 && (contextToken2.kind === 113 /* TypeOfKeyword */ && (contextToken2.parent.kind === 184 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 130 /* AssertsKeyword */ && contextToken2.parent.kind === 180 /* TypePredicate */); } function isContextTokenTypeLocation(contextToken2) { if (contextToken2) { const parentKind = contextToken2.parent.kind; switch (contextToken2.kind) { case 58 /* ColonToken */: - return parentKind === 169 /* PropertyDeclaration */ || parentKind === 168 /* PropertySignature */ || parentKind === 166 /* Parameter */ || parentKind === 257 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); + return parentKind === 170 /* PropertyDeclaration */ || parentKind === 169 /* PropertySignature */ || parentKind === 167 /* Parameter */ || parentKind === 258 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); case 63 /* EqualsToken */: - return parentKind === 262 /* TypeAliasDeclaration */; - case 128 /* AsKeyword */: - return parentKind === 231 /* AsExpression */; + return parentKind === 263 /* TypeAliasDeclaration */; + case 129 /* AsKeyword */: + return parentKind === 232 /* AsExpression */; case 29 /* LessThanToken */: - return parentKind === 180 /* TypeReference */ || parentKind === 213 /* TypeAssertionExpression */; - case 94 /* ExtendsKeyword */: - return parentKind === 165 /* TypeParameter */; - case 150 /* SatisfiesKeyword */: - return parentKind === 235 /* SatisfiesExpression */; + return parentKind === 181 /* TypeReference */ || parentKind === 214 /* TypeAssertionExpression */; + case 95 /* ExtendsKeyword */: + return parentKind === 166 /* TypeParameter */; + case 151 /* SatisfiesKeyword */: + return parentKind === 236 /* SatisfiesExpression */; } } return false; @@ -150893,14 +150957,14 @@ return true; } if (contextToken2.kind === 31 /* GreaterThanToken */ && contextToken2.parent) { - if (location === contextToken2.parent && (location.kind === 283 /* JsxOpeningElement */ || location.kind === 282 /* JsxSelfClosingElement */)) { + if (location === contextToken2.parent && (location.kind === 284 /* JsxOpeningElement */ || location.kind === 283 /* JsxSelfClosingElement */)) { return false; } - if (contextToken2.parent.kind === 283 /* JsxOpeningElement */) { - return location.parent.kind !== 283 /* JsxOpeningElement */; + if (contextToken2.parent.kind === 284 /* JsxOpeningElement */) { + return location.parent.kind !== 284 /* JsxOpeningElement */; } - if (contextToken2.parent.kind === 284 /* JsxClosingElement */ || contextToken2.parent.kind === 282 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 281 /* JsxElement */; + if (contextToken2.parent.kind === 285 /* JsxClosingElement */ || contextToken2.parent.kind === 283 /* JsxSelfClosingElement */) { + return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 282 /* JsxElement */; } } return false; @@ -150911,29 +150975,29 @@ const tokenKind = keywordForNode(contextToken); switch (tokenKind) { case 27 /* CommaToken */: - return containingNodeKind === 210 /* CallExpression */ || containingNodeKind === 173 /* Constructor */ || containingNodeKind === 211 /* NewExpression */ || containingNodeKind === 206 /* ArrayLiteralExpression */ || containingNodeKind === 223 /* BinaryExpression */ || containingNodeKind === 181 /* FunctionType */ || containingNodeKind === 207 /* ObjectLiteralExpression */; + return containingNodeKind === 211 /* CallExpression */ || containingNodeKind === 174 /* Constructor */ || containingNodeKind === 212 /* NewExpression */ || containingNodeKind === 207 /* ArrayLiteralExpression */ || containingNodeKind === 224 /* BinaryExpression */ || containingNodeKind === 182 /* FunctionType */ || containingNodeKind === 208 /* ObjectLiteralExpression */; case 20 /* OpenParenToken */: - return containingNodeKind === 210 /* CallExpression */ || containingNodeKind === 173 /* Constructor */ || containingNodeKind === 211 /* NewExpression */ || containingNodeKind === 214 /* ParenthesizedExpression */ || containingNodeKind === 193 /* ParenthesizedType */; + return containingNodeKind === 211 /* CallExpression */ || containingNodeKind === 174 /* Constructor */ || containingNodeKind === 212 /* NewExpression */ || containingNodeKind === 215 /* ParenthesizedExpression */ || containingNodeKind === 194 /* ParenthesizedType */; case 22 /* OpenBracketToken */: - return containingNodeKind === 206 /* ArrayLiteralExpression */ || containingNodeKind === 178 /* IndexSignature */ || containingNodeKind === 164 /* ComputedPropertyName */; - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 100 /* ImportKeyword */: + return containingNodeKind === 207 /* ArrayLiteralExpression */ || containingNodeKind === 179 /* IndexSignature */ || containingNodeKind === 165 /* ComputedPropertyName */; + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 101 /* ImportKeyword */: return true; case 24 /* DotToken */: - return containingNodeKind === 264 /* ModuleDeclaration */; + return containingNodeKind === 265 /* ModuleDeclaration */; case 18 /* OpenBraceToken */: - return containingNodeKind === 260 /* ClassDeclaration */ || containingNodeKind === 207 /* ObjectLiteralExpression */; + return containingNodeKind === 261 /* ClassDeclaration */ || containingNodeKind === 208 /* ObjectLiteralExpression */; case 63 /* EqualsToken */: - return containingNodeKind === 257 /* VariableDeclaration */ || containingNodeKind === 223 /* BinaryExpression */; + return containingNodeKind === 258 /* VariableDeclaration */ || containingNodeKind === 224 /* BinaryExpression */; case 15 /* TemplateHead */: - return containingNodeKind === 225 /* TemplateExpression */; + return containingNodeKind === 226 /* TemplateExpression */; case 16 /* TemplateMiddle */: - return containingNodeKind === 236 /* TemplateSpan */; - case 132 /* AsyncKeyword */: - return containingNodeKind === 171 /* MethodDeclaration */ || containingNodeKind === 300 /* ShorthandPropertyAssignment */; + return containingNodeKind === 237 /* TemplateSpan */; + case 133 /* AsyncKeyword */: + return containingNodeKind === 172 /* MethodDeclaration */ || containingNodeKind === 301 /* ShorthandPropertyAssignment */; case 41 /* AsteriskToken */: - return containingNodeKind === 171 /* MethodDeclaration */; + return containingNodeKind === 172 /* MethodDeclaration */; } if (isClassMemberCompletionKeyword(tokenKind)) { return true; @@ -150971,7 +151035,7 @@ completionKind = 0 /* ObjectPropertyDeclaration */; let typeMembers; let existingMembers; - if (objectLikeContainer.kind === 207 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 208 /* ObjectLiteralExpression */) { const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker); if (instantiatedType === void 0) { if (objectLikeContainer.flags & 33554432 /* InWithStatement */) { @@ -150993,16 +151057,16 @@ } } } else { - Debug.assert(objectLikeContainer.kind === 203 /* ObjectBindingPattern */); + Debug.assert(objectLikeContainer.kind === 204 /* ObjectBindingPattern */); isNewIdentifierLocation = false; const rootDeclaration = getRootDeclaration(objectLikeContainer.parent); if (!isVariableLike(rootDeclaration)) return Debug.fail("Root declaration is not variable-like."); - let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 247 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 166 /* Parameter */) { + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 248 /* ForOfStatement */; + if (!canGetType && rootDeclaration.kind === 167 /* Parameter */) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 171 /* MethodDeclaration */ || rootDeclaration.parent.kind === 175 /* SetAccessor */) { + } else if (rootDeclaration.parent.kind === 172 /* MethodDeclaration */ || rootDeclaration.parent.kind === 176 /* SetAccessor */) { canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -151028,7 +151092,7 @@ const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); symbols = concatenate(symbols, filteredMembers); setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 207 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { + if (objectLikeContainer.kind === 208 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { transformObjectLiteralMembersSortText(symbolsStartIndex); collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); } @@ -151044,10 +151108,10 @@ if (!isTypeKeywordTokenOrIdentifier(contextToken)) { keywordFilters = 8 /* TypeKeyword */; } - const { moduleSpecifier } = namedImportsOrExports.kind === 272 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 273 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; if (!moduleSpecifier) { isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 272 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; + return namedImportsOrExports.kind === 273 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; } const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); if (!moduleSpecifierSymbol) { @@ -151172,11 +151236,11 @@ case 30 /* LessThanSlashToken */: case 43 /* SlashToken */: case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: - case 289 /* JsxAttributes */: - case 288 /* JsxAttribute */: - case 290 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 282 /* JsxSelfClosingElement */ || parent2.kind === 283 /* JsxOpeningElement */)) { + case 209 /* PropertyAccessExpression */: + case 290 /* JsxAttributes */: + case 289 /* JsxAttribute */: + case 291 /* JsxSpreadAttribute */: + if (parent2 && (parent2.kind === 283 /* JsxSelfClosingElement */ || parent2.kind === 284 /* JsxOpeningElement */)) { if (contextToken2.kind === 31 /* GreaterThanToken */) { const precedingToken = findPrecedingToken( contextToken2.pos, @@ -151188,20 +151252,20 @@ break; } return parent2; - } else if (parent2.kind === 288 /* JsxAttribute */) { + } else if (parent2.kind === 289 /* JsxAttribute */) { return parent2.parent.parent; } break; case 10 /* StringLiteral */: - if (parent2 && (parent2.kind === 288 /* JsxAttribute */ || parent2.kind === 290 /* JsxSpreadAttribute */)) { + if (parent2 && (parent2.kind === 289 /* JsxAttribute */ || parent2.kind === 291 /* JsxSpreadAttribute */)) { return parent2.parent.parent; } break; case 19 /* CloseBraceToken */: - if (parent2 && parent2.kind === 291 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 288 /* JsxAttribute */) { + if (parent2 && parent2.kind === 292 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 289 /* JsxAttribute */) { return parent2.parent.parent.parent; } - if (parent2 && parent2.kind === 290 /* JsxSpreadAttribute */) { + if (parent2 && parent2.kind === 291 /* JsxSpreadAttribute */) { return parent2.parent.parent; } break; @@ -151214,59 +151278,59 @@ const containingNodeKind = parent2.kind; switch (contextToken2.kind) { case 27 /* CommaToken */: - return containingNodeKind === 257 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 240 /* VariableStatement */ || containingNodeKind === 263 /* EnumDeclaration */ || // enum a { foo, | - isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 261 /* InterfaceDeclaration */ || // interface A= contextToken2.pos; case 24 /* DotToken */: - return containingNodeKind === 204 /* ArrayBindingPattern */; + return containingNodeKind === 205 /* ArrayBindingPattern */; case 58 /* ColonToken */: - return containingNodeKind === 205 /* BindingElement */; + return containingNodeKind === 206 /* BindingElement */; case 22 /* OpenBracketToken */: - return containingNodeKind === 204 /* ArrayBindingPattern */; + return containingNodeKind === 205 /* ArrayBindingPattern */; case 20 /* OpenParenToken */: - return containingNodeKind === 295 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); + return containingNodeKind === 296 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); case 18 /* OpenBraceToken */: - return containingNodeKind === 263 /* EnumDeclaration */; + return containingNodeKind === 264 /* EnumDeclaration */; case 29 /* LessThanToken */: - return containingNodeKind === 260 /* ClassDeclaration */ || // class A< | - containingNodeKind === 228 /* ClassExpression */ || // var C = class D< | - containingNodeKind === 261 /* InterfaceDeclaration */ || // interface A< | - containingNodeKind === 262 /* TypeAliasDeclaration */ || // type List< | + return containingNodeKind === 261 /* ClassDeclaration */ || // class A< | + containingNodeKind === 229 /* ClassExpression */ || // var C = class D< | + containingNodeKind === 262 /* InterfaceDeclaration */ || // interface A< | + containingNodeKind === 263 /* TypeAliasDeclaration */ || // type List< | isFunctionLikeKind(containingNodeKind); - case 124 /* StaticKeyword */: - return containingNodeKind === 169 /* PropertyDeclaration */ && !isClassLike(parent2.parent); + case 125 /* StaticKeyword */: + return containingNodeKind === 170 /* PropertyDeclaration */ && !isClassLike(parent2.parent); case 25 /* DotDotDotToken */: - return containingNodeKind === 166 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 204 /* ArrayBindingPattern */; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - return containingNodeKind === 166 /* Parameter */ && !isConstructorDeclaration(parent2.parent); - case 128 /* AsKeyword */: - return containingNodeKind === 273 /* ImportSpecifier */ || containingNodeKind === 278 /* ExportSpecifier */ || containingNodeKind === 271 /* NamespaceImport */; - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: + return containingNodeKind === 167 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 205 /* ArrayBindingPattern */; + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + return containingNodeKind === 167 /* Parameter */ && !isConstructorDeclaration(parent2.parent); + case 129 /* AsKeyword */: + return containingNodeKind === 274 /* ImportSpecifier */ || containingNodeKind === 279 /* ExportSpecifier */ || containingNodeKind === 272 /* NamespaceImport */; + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: return !isFromObjectTypeDeclaration(contextToken2); case 79 /* Identifier */: - if (containingNodeKind === 273 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { + if (containingNodeKind === 274 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { return false; } break; - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: - case 118 /* InterfaceKeyword */: - case 98 /* FunctionKeyword */: - case 113 /* VarKeyword */: - case 100 /* ImportKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: - case 138 /* InferKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: + case 119 /* InterfaceKeyword */: + case 99 /* FunctionKeyword */: + case 114 /* VarKeyword */: + case 101 /* ImportKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: + case 139 /* InferKeyword */: return true; - case 154 /* TypeKeyword */: - return containingNodeKind !== 273 /* ImportSpecifier */; + case 155 /* TypeKeyword */: + return containingNodeKind !== 274 /* ImportSpecifier */; case 41 /* AsteriskToken */: return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); } @@ -151279,28 +151343,28 @@ } } switch (keywordForNode(contextToken2)) { - case 126 /* AbstractKeyword */: - case 84 /* ClassKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 92 /* EnumKeyword */: - case 98 /* FunctionKeyword */: - case 118 /* InterfaceKeyword */: - case 119 /* LetKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 124 /* StaticKeyword */: - case 113 /* VarKeyword */: + case 127 /* AbstractKeyword */: + case 85 /* ClassKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 93 /* EnumKeyword */: + case 99 /* FunctionKeyword */: + case 119 /* InterfaceKeyword */: + case 120 /* LetKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 125 /* StaticKeyword */: + case 114 /* VarKeyword */: return true; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return isPropertyDeclaration(contextToken2.parent); } const ancestorClassLike = findAncestor(contextToken2.parent, isClassLike); if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { return false; } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 169 /* PropertyDeclaration */); + const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 170 /* PropertyDeclaration */); if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { return false; @@ -151314,7 +151378,7 @@ return contextToken2.kind !== 63 /* EqualsToken */ && (contextToken2.kind === 26 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); } function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 173 /* Constructor */; + return isFunctionLikeKind(kind) && kind !== 174 /* Constructor */; } function isDotOfNumericLiteral(contextToken2) { if (contextToken2.kind === 8 /* NumericLiteral */) { @@ -151324,7 +151388,7 @@ return false; } function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 258 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); + return node2.parent.kind === 259 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); } function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (existingMembers.length === 0) { @@ -151333,7 +151397,7 @@ const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set(); const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 299 /* PropertyAssignment */ && m.kind !== 300 /* ShorthandPropertyAssignment */ && m.kind !== 205 /* BindingElement */ && m.kind !== 171 /* MethodDeclaration */ && m.kind !== 174 /* GetAccessor */ && m.kind !== 175 /* SetAccessor */ && m.kind !== 301 /* SpreadAssignment */) { + if (m.kind !== 300 /* PropertyAssignment */ && m.kind !== 301 /* ShorthandPropertyAssignment */ && m.kind !== 206 /* BindingElement */ && m.kind !== 172 /* MethodDeclaration */ && m.kind !== 175 /* GetAccessor */ && m.kind !== 176 /* SetAccessor */ && m.kind !== 302 /* SpreadAssignment */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -151413,7 +151477,7 @@ function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 169 /* PropertyDeclaration */ && m.kind !== 171 /* MethodDeclaration */ && m.kind !== 174 /* GetAccessor */ && m.kind !== 175 /* SetAccessor */) { + if (m.kind !== 170 /* PropertyDeclaration */ && m.kind !== 172 /* MethodDeclaration */ && m.kind !== 175 /* GetAccessor */ && m.kind !== 176 /* SetAccessor */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -151439,7 +151503,7 @@ if (isCurrentlyEditingNode(attr)) { continue; } - if (attr.kind === 288 /* JsxAttribute */) { + if (attr.kind === 289 /* JsxAttribute */) { seenNames.add(attr.name.escapedText); } else if (isJsxSpreadAttribute(attr)) { setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); @@ -151465,7 +151529,7 @@ break; case 41 /* AsteriskToken */: return isMethodDeclaration(parent2) ? tryCast(parent2.parent, isObjectLiteralExpression) : void 0; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return tryCast(parent2.parent, isObjectLiteralExpression); case 79 /* Identifier */: return contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent) ? contextToken.parent.parent : void 0; @@ -151529,7 +151593,7 @@ var _keywordCompletions = []; var allKeywordsCompletions = memoize(() => { const res = []; - for (let i = 81 /* FirstKeyword */; i <= 162 /* LastKeyword */; i++) { + for (let i = 82 /* FirstKeyword */; i <= 163 /* LastKeyword */; i++) { res.push({ name: tokenToString(i), kind: "keyword" /* keyword */, @@ -151552,7 +151616,7 @@ case 0 /* None */: return false; case 1 /* All */: - return isFunctionLikeBodyKeyword(kind) || kind === 136 /* DeclareKeyword */ || kind === 142 /* ModuleKeyword */ || kind === 154 /* TypeKeyword */ || kind === 143 /* NamespaceKeyword */ || kind === 126 /* AbstractKeyword */ || isTypeKeyword(kind) && kind !== 155 /* UndefinedKeyword */; + return isFunctionLikeBodyKeyword(kind) || kind === 137 /* DeclareKeyword */ || kind === 143 /* ModuleKeyword */ || kind === 155 /* TypeKeyword */ || kind === 144 /* NamespaceKeyword */ || kind === 127 /* AbstractKeyword */ || isTypeKeyword(kind) && kind !== 156 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); case 2 /* ClassElementKeywords */: @@ -151562,11 +151626,11 @@ case 4 /* ConstructorParameterKeywords */: return isParameterPropertyModifier(kind); case 6 /* TypeAssertionKeywords */: - return isTypeKeyword(kind) || kind === 85 /* ConstKeyword */; + return isTypeKeyword(kind) || kind === 86 /* ConstKeyword */; case 7 /* TypeKeywords */: return isTypeKeyword(kind); case 8 /* TypeKeyword */: - return kind === 154 /* TypeKeyword */; + return kind === 155 /* TypeKeyword */; default: return Debug.assertNever(keywordFilter); } @@ -151574,58 +151638,58 @@ } function isTypeScriptOnlyKeyword(kind) { switch (kind) { - case 126 /* AbstractKeyword */: - case 131 /* AnyKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 136 /* DeclareKeyword */: - case 92 /* EnumKeyword */: - case 159 /* GlobalKeyword */: - case 117 /* ImplementsKeyword */: - case 138 /* InferKeyword */: - case 118 /* InterfaceKeyword */: - case 140 /* IsKeyword */: - case 141 /* KeyOfKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 144 /* NeverKeyword */: - case 148 /* NumberKeyword */: - case 149 /* ObjectKeyword */: - case 161 /* OverrideKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 146 /* ReadonlyKeyword */: - case 152 /* StringKeyword */: - case 153 /* SymbolKeyword */: - case 154 /* TypeKeyword */: - case 156 /* UniqueKeyword */: - case 157 /* UnknownKeyword */: + case 127 /* AbstractKeyword */: + case 132 /* AnyKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 137 /* DeclareKeyword */: + case 93 /* EnumKeyword */: + case 160 /* GlobalKeyword */: + case 118 /* ImplementsKeyword */: + case 139 /* InferKeyword */: + case 119 /* InterfaceKeyword */: + case 141 /* IsKeyword */: + case 142 /* KeyOfKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 145 /* NeverKeyword */: + case 149 /* NumberKeyword */: + case 150 /* ObjectKeyword */: + case 162 /* OverrideKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 147 /* ReadonlyKeyword */: + case 153 /* StringKeyword */: + case 154 /* SymbolKeyword */: + case 155 /* TypeKeyword */: + case 157 /* UniqueKeyword */: + case 158 /* UnknownKeyword */: return true; default: return false; } } function isInterfaceOrTypeLiteralCompletionKeyword(kind) { - return kind === 146 /* ReadonlyKeyword */; + return kind === 147 /* ReadonlyKeyword */; } function isClassMemberCompletionKeyword(kind) { switch (kind) { - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 135 /* ConstructorKeyword */: - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 161 /* OverrideKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 136 /* ConstructorKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 162 /* OverrideKeyword */: return true; default: return isClassMemberModifier(kind); } } function isFunctionLikeBodyKeyword(kind) { - return kind === 132 /* AsyncKeyword */ || kind === 133 /* AwaitKeyword */ || kind === 128 /* AsKeyword */ || kind === 150 /* SatisfiesKeyword */ || kind === 154 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); + return kind === 133 /* AsyncKeyword */ || kind === 134 /* AwaitKeyword */ || kind === 129 /* AsKeyword */ || kind === 151 /* SatisfiesKeyword */ || kind === 155 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); } function keywordForNode(node) { var _a2; @@ -151640,7 +151704,7 @@ const currentLine = file.getLineAndCharacterOfPosition(position).line; if ((isImportDeclaration(parent2) || isExportDeclaration(parent2) && parent2.moduleSpecifier) && contextToken === parent2.moduleSpecifier && tokenLine === currentLine) { entries.push({ - name: tokenToString(130 /* AssertKeyword */), + name: tokenToString(131 /* AssertKeyword */), kind: "keyword" /* keyword */, kindModifiers: "" /* none */, sortText: SortText.GlobalsOrKeywords @@ -151666,7 +151730,7 @@ function getApparentProperties(type, node, checker) { if (!type.isUnion()) return type.getApparentProperties(); - return checker.getAllPossiblePropertiesOfTypes(filter(type.types, (memberType) => !(memberType.flags & 134348796 /* Primitive */ || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties())))); + return checker.getAllPossiblePropertiesOfTypes(filter(type.types, (memberType) => !(memberType.flags & 402784252 /* Primitive */ || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties())))); } function containsNonPublicProperties(props) { return some(props, (p) => !!(getDeclarationModifierFlagsFromSymbol(p) & 24 /* NonPublicAccessibilityModifier */)); @@ -151677,7 +151741,7 @@ function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { var _a2; switch (location.kind) { - case 354 /* SyntaxList */: + case 355 /* SyntaxList */: return tryCast(location.parent, isObjectTypeDeclaration); case 1 /* EndOfFileToken */: const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration); @@ -151700,7 +151764,7 @@ } if (!contextToken) return void 0; - if (location.kind === 135 /* ConstructorKeyword */ || isIdentifier(contextToken) && isPropertyDeclaration(contextToken.parent) && isClassLike(location)) { + if (location.kind === 136 /* ConstructorKeyword */ || isIdentifier(contextToken) && isPropertyDeclaration(contextToken.parent) && isClassLike(location)) { return findAncestor(contextToken, isClassLike); } switch (contextToken.kind) { @@ -151736,7 +151800,7 @@ case 26 /* SemicolonToken */: case 27 /* CommaToken */: case 79 /* Identifier */: - if (parent2.kind === 168 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 169 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { return parent2.parent; } break; @@ -151753,11 +151817,11 @@ if (!t) return void 0; switch (node.kind) { - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 190 /* IntersectionType */: - case 184 /* TypeLiteral */: - case 189 /* UnionType */: + case 191 /* IntersectionType */: + case 185 /* TypeLiteral */: + case 190 /* UnionType */: return t; } } @@ -151780,7 +151844,7 @@ case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 43 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 308 /* SourceFile */; + return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 309 /* SourceFile */; default: return Debug.assertNever(triggerCharacter); } @@ -151849,7 +151913,7 @@ return { isKeywordOnlyCompletion, keywordCompletion, - isNewIdentifierLocation: !!(candidate || keywordCompletion === 154 /* TypeKeyword */), + isNewIdentifierLocation: !!(candidate || keywordCompletion === 155 /* TypeKeyword */), isTopLevelTypeOnly: !!((_b = (_a2 = tryCast(candidate, isImportDeclaration)) == null ? void 0 : _a2.importClause) == null ? void 0 : _b.isTypeOnly) || !!((_c = tryCast(candidate, isImportEqualsDeclaration)) == null ? void 0 : _c.isTypeOnly), couldBeTypeOnlyImportSpecifier: !!candidate && couldBeTypeOnlyImportSpecifier(candidate, contextToken), replacementSpan: getSingleLineReplacementSpanForImportCompletionNode(candidate) @@ -151857,20 +151921,20 @@ function getCandidate() { const parent2 = contextToken.parent; if (isImportEqualsDeclaration(parent2)) { - keywordCompletion = contextToken.kind === 154 /* TypeKeyword */ ? void 0 : 154 /* TypeKeyword */; + keywordCompletion = contextToken.kind === 155 /* TypeKeyword */ ? void 0 : 155 /* TypeKeyword */; return isModuleSpecifierMissingOrEmpty(parent2.moduleReference) ? parent2 : void 0; } if (couldBeTypeOnlyImportSpecifier(parent2, contextToken) && canCompleteFromNamedBindings(parent2.parent)) { return parent2; } if (isNamedImports(parent2) || isNamespaceImport(parent2)) { - if (!parent2.parent.isTypeOnly && (contextToken.kind === 18 /* OpenBraceToken */ || contextToken.kind === 100 /* ImportKeyword */ || contextToken.kind === 27 /* CommaToken */)) { - keywordCompletion = 154 /* TypeKeyword */; + if (!parent2.parent.isTypeOnly && (contextToken.kind === 18 /* OpenBraceToken */ || contextToken.kind === 101 /* ImportKeyword */ || contextToken.kind === 27 /* CommaToken */)) { + keywordCompletion = 155 /* TypeKeyword */; } if (canCompleteFromNamedBindings(parent2)) { if (contextToken.kind === 19 /* CloseBraceToken */ || contextToken.kind === 79 /* Identifier */) { isKeywordOnlyCompletion = true; - keywordCompletion = 158 /* FromKeyword */; + keywordCompletion = 159 /* FromKeyword */; } else { return parent2.parent.parent; } @@ -151878,11 +151942,11 @@ return void 0; } if (isImportKeyword(contextToken) && isSourceFile(parent2)) { - keywordCompletion = 154 /* TypeKeyword */; + keywordCompletion = 155 /* TypeKeyword */; return contextToken; } if (isImportKeyword(contextToken) && isImportDeclaration(parent2)) { - keywordCompletion = 154 /* TypeKeyword */; + keywordCompletion = 155 /* TypeKeyword */; return isModuleSpecifierMissingOrEmpty(parent2.moduleSpecifier) ? parent2 : void 0; } return void 0; @@ -151897,8 +151961,8 @@ if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); } - Debug.assert(top.kind !== 100 /* ImportKeyword */ && top.kind !== 273 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 269 /* ImportDeclaration */ ? (_c = getPotentiallyInvalidImportSpecifier((_b = top.importClause) == null ? void 0 : _b.namedBindings)) != null ? _c : top.moduleSpecifier : top.moduleReference; + Debug.assert(top.kind !== 101 /* ImportKeyword */ && top.kind !== 274 /* ImportSpecifier */); + const potentialSplitPoint = top.kind === 270 /* ImportDeclaration */ ? (_c = getPotentiallyInvalidImportSpecifier((_b = top.importClause) == null ? void 0 : _b.namedBindings)) != null ? _c : top.moduleSpecifier : top.moduleReference; const withoutModuleSpecifier = { pos: top.getFirstToken().getStart(), end: potentialSplitPoint.pos @@ -152156,26 +152220,26 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeChecker, compilerOptions, host, preferences) { const parent2 = walkUpParentheses(node.parent); switch (parent2.kind) { - case 198 /* LiteralType */: { + case 199 /* LiteralType */: { const grandParent = walkUpParentheses(parent2.parent); switch (grandParent.kind) { - case 230 /* ExpressionWithTypeArguments */: - case 180 /* TypeReference */: { + case 231 /* ExpressionWithTypeArguments */: + case 181 /* TypeReference */: { const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); if (typeArgument) { return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; } return void 0; } - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: const { indexType, objectType } = grandParent; if (!rangeContainsPosition(indexType, position)) { return void 0; } return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType)); - case 202 /* ImportType */: + case 203 /* ImportType */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - case 189 /* UnionType */: { + case 190 /* UnionType */: { if (!isTypeReferenceNode(grandParent.parent)) { return void 0; } @@ -152187,30 +152251,30 @@ return void 0; } } - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker, parent2.parent); } return fromContextualType() || fromContextualType(0 /* None */); - case 209 /* ElementAccessExpression */: { + case 210 /* ElementAccessExpression */: { const { expression, argumentExpression } = parent2; if (node === skipParentheses(argumentExpression)) { return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression)); } return void 0; } - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 288 /* JsxAttribute */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 289 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 288 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); + const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 289 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(); } - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 280 /* ExternalModuleReference */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 281 /* ExternalModuleReference */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - case 292 /* CaseClause */: + case 293 /* CaseClause */: const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses); const contextualTypes = fromContextualType(); if (!contextualTypes) { @@ -152231,9 +152295,9 @@ } function walkUpParentheses(node) { switch (node.kind) { - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return walkUpParenthesizedTypes(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return walkUpParenthesizedExpressions(node); default: return node; @@ -152914,14 +152978,14 @@ if (cancellationToken) cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(direct)) { handleImportCall(direct); break; } if (!isAvailableThroughGlobal) { const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 257 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent2.kind === 258 /* VariableDeclaration */) { const { name } = parent2; if (name.kind === 79 /* Identifier */) { directImports.push(name); @@ -152932,7 +152996,7 @@ break; case 79 /* Identifier */: break; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: handleNamespaceImport( direct, direct.name, @@ -152941,10 +153005,10 @@ false ); break; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 271 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 272 /* NamespaceImport */) { handleNamespaceImport( direct, namedBindings.name, @@ -152957,10 +153021,10 @@ addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 277 /* NamespaceExport */) { + } else if (direct.exportClause.kind === 278 /* NamespaceExport */) { addIndirectUser( getSourceFileLikeForImportDeclaration(direct), /** addTransitiveDependencies */ @@ -152970,7 +153034,7 @@ directImports.push(direct); } break; - case 202 /* ImportType */: + case 203 /* ImportType */: if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { addIndirectUser( direct.getSourceFile(), @@ -153011,7 +153075,7 @@ directImports.push(importDeclaration); } else if (!isAvailableThroughGlobal) { const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 308 /* SourceFile */ || sourceFileLike.kind === 264 /* ModuleDeclaration */); + Debug.assert(sourceFileLike.kind === 309 /* SourceFile */ || sourceFileLike.kind === 265 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUser( sourceFileLike, @@ -153065,7 +153129,7 @@ } return { importSearches, singleReferences }; function handleImport(decl) { - if (decl.kind === 268 /* ImportEqualsDeclaration */) { + if (decl.kind === 269 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } @@ -153075,7 +153139,7 @@ handleNamespaceImportLike(decl); return; } - if (decl.kind === 202 /* ImportType */) { + if (decl.kind === 203 /* ImportType */) { if (decl.qualifier) { const firstIdentifier = getFirstIdentifier(decl.qualifier); if (firstIdentifier.escapedText === symbolName(exportSymbol)) { @@ -153089,7 +153153,7 @@ if (decl.moduleSpecifier.kind !== 10 /* StringLiteral */) { return; } - if (decl.kind === 275 /* ExportDeclaration */) { + if (decl.kind === 276 /* ExportDeclaration */) { if (decl.exportClause && isNamedExports(decl.exportClause)) { searchForNamedImport(decl.exportClause); } @@ -153098,10 +153162,10 @@ const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: handleNamespaceImportLike(namedBindings.name); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { searchForNamedImport(namedBindings); } @@ -153135,7 +153199,7 @@ addSearch(name, checker.getSymbolAtLocation(name)); } } else { - const localSymbol = element.kind === 278 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); + const localSymbol = element.kind === 279 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); } } @@ -153159,7 +153223,7 @@ const checker = program.getTypeChecker(); for (const referencingFile of sourceFiles) { const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 308 /* SourceFile */) { + if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 309 /* SourceFile */) { for (const ref of referencingFile.referencedFiles) { if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { refs.push({ kind: "reference", referencingFile, ref }); @@ -153201,7 +153265,7 @@ return map2; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 308 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( + return forEach(sourceFileLike.kind === 309 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( // TODO: GH#18217 action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action) )); @@ -153214,15 +153278,15 @@ } else { forEachPossibleImportOrExportStatement(sourceFile, (statement) => { switch (statement.kind) { - case 275 /* ExportDeclaration */: - case 269 /* ImportDeclaration */: { + case 276 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: { const decl = statement; if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; } - case 268 /* ImportEqualsDeclaration */: { + case 269 /* ImportEqualsDeclaration */: { const decl = statement; if (isExternalModuleImportEquals(decl)) { action(decl, decl.moduleReference.expression); @@ -153240,7 +153304,7 @@ const { parent: parent2 } = node; const grandparent = parent2.parent; if (symbol.exportSymbol) { - if (parent2.kind === 208 /* PropertyAccessExpression */) { + if (parent2.kind === 209 /* PropertyAccessExpression */) { return ((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport( grandparent, /*useLhsSymbol*/ @@ -153357,15 +153421,15 @@ function isNodeImport(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return parent2.name === node && isExternalModuleImportEquals(parent2); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return !parent2.propertyName; - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: Debug.assert(parent2.name === node); return true; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); default: return false; @@ -153396,21 +153460,21 @@ return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { return node.getSourceFile(); } const { parent: parent2 } = node; - if (parent2.kind === 308 /* SourceFile */) { + if (parent2.kind === 309 /* SourceFile */) { return parent2; } - Debug.assert(parent2.kind === 265 /* ModuleBlock */); + Debug.assert(parent2.kind === 266 /* ModuleBlock */); return cast(parent2.parent, isAmbientModuleDeclaration); } function isAmbientModuleDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; + return node.kind === 265 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; } function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 280 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; + return eq.moduleReference.kind === 281 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; } // src/services/findAllReferences.ts @@ -153474,7 +153538,7 @@ if (node.parent.name === node || // node is name of declaration, use parent isConstructorDeclaration(node.parent) || isExportAssignment(node.parent) || // Property name of the import export specifier or binding pattern, use parent (isImportOrExportSpecifier(node.parent) || isBindingElement(node.parent)) && node.parent.propertyName === node || // Is default export - node.kind === 88 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) { + node.kind === 89 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) { return getContextNode(node.parent); } return void 0; @@ -153483,28 +153547,28 @@ if (!node) return void 0; switch (node.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getContextNode(node.parent.parent); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent; - case 278 /* ExportSpecifier */: - case 271 /* NamespaceImport */: + case 279 /* ExportSpecifier */: + case 272 /* NamespaceImport */: return node.parent.parent; - case 270 /* ImportClause */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 278 /* NamespaceExport */: return node.parent; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isExpressionStatement(node.parent) ? node.parent : node; - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: return { start: node.initializer, end: node.expression }; - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( findAncestor( node.parent, @@ -153543,13 +153607,13 @@ )); } function isDefinitionForReference(node) { - return node.kind === 88 /* DefaultKeyword */ || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 135 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent); + return node.kind === 89 /* DefaultKeyword */ || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 136 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent); } function getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) { const node = getTouchingPropertyName(sourceFile, position); let referenceEntries; const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 208 /* PropertyAccessExpression */ || node.parent.kind === 205 /* BindingElement */ || node.parent.kind === 209 /* ElementAccessExpression */ || node.kind === 106 /* SuperKeyword */) { + if (node.parent.kind === 209 /* PropertyAccessExpression */ || node.parent.kind === 206 /* BindingElement */ || node.parent.kind === 210 /* ElementAccessExpression */ || node.kind === 107 /* SuperKeyword */) { referenceEntries = entries && [...entries]; } else if (entries) { const queue = createQueue(entries); @@ -153570,15 +153634,15 @@ return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return void 0; } const checker = program.getTypeChecker(); - if (node.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 301 /* ShorthandPropertyAssignment */) { const result = []; Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); return result; - } else if (node.kind === 106 /* SuperKeyword */ || isSuperProperty(node.parent)) { + } else if (node.kind === 107 /* SuperKeyword */ || isSuperProperty(node.parent)) { const symbol = checker.getSymbolAtLocation(node); return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)]; } else { @@ -153765,12 +153829,12 @@ const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); if (symbol) { return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 207 /* ObjectLiteralExpression */) { + } else if (node.kind === 208 /* ObjectLiteralExpression */) { return { kind: "interface" /* interfaceElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("object literal"), punctuationPart(21 /* CloseParenToken */)] }; - } else if (node.kind === 228 /* ClassExpression */) { + } else if (node.kind === 229 /* ClassExpression */) { return { kind: "local class" /* localClassElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(21 /* CloseParenToken */)] @@ -153814,13 +153878,13 @@ } function isWriteAccessForReference(node) { const decl = getDeclarationFromName(node); - return !!decl && declarationIsWriteAccess(decl) || node.kind === 88 /* DefaultKeyword */ || isWriteAccess(node); + return !!decl && declarationIsWriteAccess(decl) || node.kind === 89 /* DefaultKeyword */ || isWriteAccess(node); } function isDeclarationOfSymbol(node, target) { var _a2; if (!target) return false; - const source = getDeclarationFromName(node) || (node.kind === 88 /* DefaultKeyword */ ? node.parent : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent : node.kind === 135 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent) ? node.parent.parent : void 0); + const source = getDeclarationFromName(node) || (node.kind === 89 /* DefaultKeyword */ ? node.parent : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent : node.kind === 136 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent) ? node.parent.parent : void 0); const commonjsSource = source && isBinaryExpression(source) ? source.left : void 0; return !!(source && ((_a2 = target.declarations) == null ? void 0 : _a2.some((d) => d === source || d === commonjsSource))); } @@ -153828,46 +153892,46 @@ if (!!(decl.flags & 16777216 /* Ambient */)) return true; switch (decl.kind) { - case 223 /* BinaryExpression */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 88 /* DefaultKeyword */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 278 /* ExportSpecifier */: - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 261 /* InterfaceDeclaration */: - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: - case 288 /* JsxAttribute */: - case 264 /* ModuleDeclaration */: - case 267 /* NamespaceExportDeclaration */: - case 271 /* NamespaceImport */: - case 277 /* NamespaceExport */: - case 166 /* Parameter */: - case 300 /* ShorthandPropertyAssignment */: - case 262 /* TypeAliasDeclaration */: - case 165 /* TypeParameter */: + case 224 /* BinaryExpression */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 89 /* DefaultKeyword */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 279 /* ExportSpecifier */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 262 /* InterfaceDeclaration */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 289 /* JsxAttribute */: + case 265 /* ModuleDeclaration */: + case 268 /* NamespaceExportDeclaration */: + case 272 /* NamespaceImport */: + case 278 /* NamespaceExport */: + case 167 /* Parameter */: + case 301 /* ShorthandPropertyAssignment */: + case 263 /* TypeAliasDeclaration */: + case 166 /* TypeParameter */: return true; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return !!decl.body; - case 257 /* VariableDeclaration */: - case 169 /* PropertyDeclaration */: + case 258 /* VariableDeclaration */: + case 170 /* PropertyDeclaration */: return !!decl.initializer || isCatchClause(decl.parent); - case 170 /* MethodSignature */: - case 168 /* PropertySignature */: - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: + case 171 /* MethodSignature */: + case 169 /* PropertySignature */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: return false; default: return Debug.failBadSyntaxKind(decl); @@ -154086,9 +154150,9 @@ if (symbol.declarations) { for (const decl of symbol.declarations) { switch (decl.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { references.push(nodeEntry(decl.name)); } @@ -154103,7 +154167,7 @@ for (const decl of exported.declarations) { const sourceFile = decl.getSourceFile(); if (sourceFilesSet.has(sourceFile.fileName)) { - const node = isBinaryExpression(decl) && isPropertyAccessExpression(decl.left) ? decl.left.expression : isExportAssignment(decl) ? Debug.checkDefined(findChildOfKind(decl, 93 /* ExportKeyword */, sourceFile)) : getNameOfDeclaration(decl) || decl; + const node = isBinaryExpression(decl) && isPropertyAccessExpression(decl.left) ? decl.left.expression : isExportAssignment(decl) ? Debug.checkDefined(findChildOfKind(decl, 94 /* ExportKeyword */, sourceFile)) : getNameOfDeclaration(decl) || decl; references.push(nodeEntry(node)); } } @@ -154111,21 +154175,21 @@ return references.length ? [{ definition: { type: 0 /* Symbol */, symbol }, references }] : emptyArray; } function isReadonlyTypeOperator(node) { - return node.kind === 146 /* ReadonlyKeyword */ && isTypeOperatorNode(node.parent) && node.parent.operator === 146 /* ReadonlyKeyword */; + return node.kind === 147 /* ReadonlyKeyword */ && isTypeOperatorNode(node.parent) && node.parent.operator === 147 /* ReadonlyKeyword */; } function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) { if (isTypeKeyword(node.kind)) { - if (node.kind === 114 /* VoidKeyword */ && isVoidExpression(node.parent)) { + if (node.kind === 115 /* VoidKeyword */ && isVoidExpression(node.parent)) { return void 0; } - if (node.kind === 146 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { + if (node.kind === 147 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { return void 0; } return getAllReferencesForKeyword( sourceFiles, node.kind, cancellationToken, - node.kind === 146 /* ReadonlyKeyword */ ? isReadonlyTypeOperator : void 0 + node.kind === 147 /* ReadonlyKeyword */ ? isReadonlyTypeOperator : void 0 ); } if (isImportMeta(node.parent) && node.parent.name === node) { @@ -154143,7 +154207,7 @@ if (isThis(node)) { return getReferencesForThisKeyword(node, sourceFiles, cancellationToken); } - if (node.kind === 106 /* SuperKeyword */) { + if (node.kind === 107 /* SuperKeyword */) { return getReferencesForSuperKeyword(node); } return void 0; @@ -154177,7 +154241,7 @@ /*alwaysGetReferences*/ true ); - } else if (node && node.kind === 88 /* DefaultKeyword */ && symbol.escapedName === "default" /* Default */ && symbol.parent) { + } else if (node && node.kind === 89 /* DefaultKeyword */ && symbol.escapedName === "default" /* Default */ && symbol.parent) { addReference(node, symbol, state); searchForImportsOfExport(node, symbol, { exportingModuleSymbol: symbol.parent, exportKind: 1 /* Default */ }, state); } else { @@ -154212,8 +154276,8 @@ } function getSpecialSearchKind(node) { switch (node.kind) { - case 173 /* Constructor */: - case 135 /* ConstructorKeyword */: + case 174 /* Constructor */: + case 136 /* ConstructorKeyword */: return 1 /* Constructor */; case 79 /* Identifier */: if (isClassLike(node.parent)) { @@ -154421,7 +154485,7 @@ } function getSymbolScope(symbol) { const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 215 /* FunctionExpression */ || valueDeclaration.kind === 228 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 216 /* FunctionExpression */ || valueDeclaration.kind === 229 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -154430,7 +154494,7 @@ if (flags & (4 /* Property */ | 8192 /* Method */)) { const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { - return getAncestor(privateDeclaration, 260 /* ClassDeclaration */); + return getAncestor(privateDeclaration, 261 /* ClassDeclaration */); } return void 0; } @@ -154447,7 +154511,7 @@ if (scope && scope !== container) { return void 0; } - if (!container || container.kind === 308 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 309 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { return void 0; } scope = container; @@ -154571,7 +154635,7 @@ } case 8 /* NumericLiteral */: return isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === searchSymbolName.length; - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return "default".length === searchSymbolName.length; default: return false; @@ -154741,7 +154805,7 @@ } function addReference(referenceLocation, relatedSymbol, state) { const { kind, symbol } = "kind" in relatedSymbol ? relatedSymbol : { kind: void 0, symbol: relatedSymbol }; - if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 88 /* DefaultKeyword */) { + if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 89 /* DefaultKeyword */) { return; } const addRef = state.referenceAdder(symbol); @@ -154757,7 +154821,7 @@ } const pusher = () => state.referenceAdder(search.symbol); if (isClassLike(referenceLocation.parent)) { - Debug.assert(referenceLocation.kind === 88 /* DefaultKeyword */ || referenceLocation.parent.name === referenceLocation); + Debug.assert(referenceLocation.kind === 89 /* DefaultKeyword */ || referenceLocation.parent.name === referenceLocation); findOwnConstructorReferences(search.symbol, sourceFile, pusher()); } else { const classExtending = tryGetClassByExtendingIdentifier(referenceLocation); @@ -154780,7 +154844,7 @@ } if (member.body) { member.body.forEachChild(function cb(node) { - if (node.kind === 108 /* ThisKeyword */) { + if (node.kind === 109 /* ThisKeyword */) { addRef(node); } else if (!isFunctionLike(node) && !isClassLike(node)) { node.forEachChild(cb); @@ -154793,18 +154857,18 @@ const constructorSymbol = getClassConstructorSymbol(classSymbol); if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { - const ctrKeyword = findChildOfKind(decl, 135 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 173 /* Constructor */ && !!ctrKeyword); + const ctrKeyword = findChildOfKind(decl, 136 /* ConstructorKeyword */, sourceFile); + Debug.assert(decl.kind === 174 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } } if (classSymbol.exports) { classSymbol.exports.forEach((member) => { const decl = member.valueDeclaration; - if (decl && decl.kind === 171 /* MethodDeclaration */) { + if (decl && decl.kind === 172 /* MethodDeclaration */) { const body = decl.body; if (body) { - forEachDescendantOfKind(body, 108 /* ThisKeyword */, (thisKeyword) => { + forEachDescendantOfKind(body, 109 /* ThisKeyword */, (thisKeyword) => { if (isNewExpressionTarget(thisKeyword)) { addNode(thisKeyword); } @@ -154823,10 +154887,10 @@ return; } for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 173 /* Constructor */); + Debug.assert(decl.kind === 174 /* Constructor */); const body = decl.body; if (body) { - forEachDescendantOfKind(body, 106 /* SuperKeyword */, (node) => { + forEachDescendantOfKind(body, 107 /* SuperKeyword */, (node) => { if (isCallExpressionTarget(node)) { addNode(node); } @@ -154858,7 +154922,7 @@ if (refNode.kind !== 79 /* Identifier */) { return; } - if (refNode.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 301 /* ShorthandPropertyAssignment */) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); } const containingClass = getContainingClassIfInHeritageClause(refNode); @@ -154873,7 +154937,7 @@ addIfImplementation(typeHavingNode.initializer); } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { const body = typeHavingNode.body; - if (body.kind === 238 /* Block */) { + if (body.kind === 239 /* Block */) { forEachReturnStatement(body, (returnStatement) => { if (returnStatement.expression) addIfImplementation(returnStatement.expression); @@ -154895,13 +154959,13 @@ } function isImplementationExpression(node) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 206 /* ArrayLiteralExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 207 /* ArrayLiteralExpression */: return true; default: return false; @@ -154935,13 +154999,13 @@ } let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -154950,7 +155014,7 @@ } const sourceFile = searchSpaceNode.getSourceFile(); const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, "super", searchSpaceNode), (node) => { - if (node.kind !== 106 /* SuperKeyword */) { + if (node.kind !== 107 /* SuperKeyword */) { return; } const container = getSuperContainer( @@ -154963,7 +155027,7 @@ return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; } function isParameterName(node) { - return node.kind === 79 /* Identifier */ && node.parent.kind === 166 /* Parameter */ && node.parent.name === node; + return node.kind === 79 /* Identifier */ && node.parent.kind === 167 /* Parameter */ && node.parent.name === node; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { let searchSpaceNode = getThisContainer( @@ -154975,32 +155039,32 @@ ); let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isObjectLiteralMethod(searchSpaceNode)) { staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; } - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { return void 0; } - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: break; default: return void 0; } - const references = flatMap(searchSpaceNode.kind === 308 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { + const references = flatMap(searchSpaceNode.kind === 309 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { cancellationToken.throwIfCancellationRequested(); return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { if (!isThis(node)) { @@ -155016,18 +155080,18 @@ if (!canHaveSymbol(container)) return false; switch (searchSpaceNode.kind) { - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return searchSpaceNode.symbol === container.symbol; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: - case 207 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 208 /* ObjectLiteralExpression */: return container.parent && canHaveSymbol(container.parent) && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 308 /* SourceFile */: - return container.kind === 308 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); + case 309 /* SourceFile */: + return container.kind === 309 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); } }); }).map((n) => nodeEntry(n)); @@ -155151,7 +155215,7 @@ Debug.assert(paramProps.length === 2 && !!(paramProps[0].flags & 1 /* FunctionScopedVariable */) && !!(paramProps[1].flags & 4 /* Property */)); return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } - const exportSpecifier = getDeclarationOfKind(symbol, 278 /* ExportSpecifier */); + const exportSpecifier = getDeclarationOfKind(symbol, 279 /* ExportSpecifier */); if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); if (localSymbol) { @@ -155192,7 +155256,7 @@ ) || (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */) && allowBaseTypes(rootSymbol) ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, (base) => cbSymbol(sym, rootSymbol, base, kind)) : void 0)); } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol2, checker2) { - const bindingElement = getDeclarationOfKind(symbol2, 205 /* BindingElement */); + const bindingElement = getDeclarationOfKind(symbol2, 206 /* BindingElement */); if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { return getPropertySymbolFromBindingElement(checker2, bindingElement); } @@ -155319,7 +155383,7 @@ } const { parent: parent2 } = node; const typeChecker = program.getTypeChecker(); - if (node.kind === 161 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { + if (node.kind === 162 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { return getDefinitionFromOverriddenMember(typeChecker, node) || emptyArray; } if (isJumpStatementTarget(node)) { @@ -155333,16 +155397,16 @@ void 0 )] : void 0; } - if (node.kind === 105 /* ReturnKeyword */) { + if (node.kind === 106 /* ReturnKeyword */) { const functionDeclaration = findAncestor(node.parent, (n) => isClassStaticBlockDeclaration(n) ? "quit" : isFunctionLikeDeclaration(n)); return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; } - if (node.kind === 133 /* AwaitKeyword */) { + if (node.kind === 134 /* AwaitKeyword */) { const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n)); - const isAsyncFunction2 = functionDeclaration && some(functionDeclaration.modifiers, (node2) => node2.kind === 132 /* AsyncKeyword */); + const isAsyncFunction2 = functionDeclaration && some(functionDeclaration.modifiers, (node2) => node2.kind === 133 /* AsyncKeyword */); return isAsyncFunction2 ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; } - if (node.kind === 125 /* YieldKeyword */) { + if (node.kind === 126 /* YieldKeyword */) { const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n)); const isGeneratorFunction = functionDeclaration && functionDeclaration.asteriskToken; return isGeneratorFunction ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; @@ -155407,10 +155471,10 @@ return [sigInfo]; } else { const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, calledDeclaration) || emptyArray; - return node.kind === 106 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; + return node.kind === 107 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; } } - if (node.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 301 /* ShorthandPropertyAssignment */) { const shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo( decl, @@ -155585,7 +155649,7 @@ if (node.parent === declaration) { return true; } - if (declaration.kind === 271 /* NamespaceImport */) { + if (declaration.kind === 272 /* NamespaceImport */) { return false; } return true; @@ -155616,7 +155680,7 @@ failedAliasResolution )); function getConstructSignatureDefinition() { - if (symbol.flags & 32 /* Class */ && !(symbol.flags & (16 /* Function */ | 3 /* Variable */)) && (isNewExpressionTarget(node) || node.kind === 135 /* ConstructorKeyword */)) { + if (symbol.flags & 32 /* Class */ && !(symbol.flags & (16 /* Function */ | 3 /* Variable */)) && (isNewExpressionTarget(node) || node.kind === 136 /* ConstructorKeyword */)) { const cls = find(filteredDeclarations, isClassLike) || Debug.fail("Expected declaration to have at least one class-like declaration"); return getSignatureDefinition( cls.members, @@ -155688,19 +155752,19 @@ if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent); switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: if (hasEffectiveModifier(declaration, 8 /* Private */)) return false; - case 173 /* Constructor */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: + case 174 /* Constructor */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: return isDefinitionVisible(checker, declaration.parent); default: return false; @@ -155744,9 +155808,9 @@ } function isConstructorLike(node) { switch (node.kind) { - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: return true; default: return false; @@ -155783,14 +155847,14 @@ return; } switch (node.kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 216 /* ArrowFunction */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { @@ -155930,15 +155994,15 @@ } function isHintableLiteral(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: { + case 222 /* PrefixUnaryExpression */: { const operand = node.operand; return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); } - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return true; case 79 /* Identifier */: { const name = node.escapedText; @@ -156154,8 +156218,8 @@ const parts = []; forEachUnique(declarations, (declaration) => { for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 330 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 349 /* JSDocTypedefTag */ && declaration.kind !== 341 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 349 /* JSDocTypedefTag */ || t.kind === 341 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 344 /* JSDocParameterTag */ || t.kind === 345 /* JSDocReturnTag */)) { + const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 331 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); + if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 350 /* JSDocTypedefTag */ && declaration.kind !== 342 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 350 /* JSDocTypedefTag */ || t.kind === 342 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 345 /* JSDocParameterTag */ || t.kind === 346 /* JSDocReturnTag */)) { continue; } let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; @@ -156174,11 +156238,11 @@ } function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: return [declaration]; - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return getJSDocCommentsAndTags(declaration); @@ -156188,7 +156252,7 @@ const infos = []; forEachUnique(declarations, (declaration) => { const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 349 /* JSDocTypedefTag */ || t.kind === 341 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 344 /* JSDocParameterTag */ || t.kind === 345 /* JSDocReturnTag */)) { + if (tags.some((t) => t.kind === 350 /* JSDocTypedefTag */ || t.kind === 342 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 345 /* JSDocParameterTag */ || t.kind === 346 /* JSDocReturnTag */)) { return; } for (const tag of tags) { @@ -156203,21 +156267,21 @@ } return flatMap( comment, - (node) => node.kind === 324 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) + (node) => node.kind === 325 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) ); } function getCommentDisplayParts(tag, checker) { const { comment, kind } = tag; const namePart = getTagNameDisplayPart(kind); switch (kind) { - case 352 /* JSDocThrowsTag */: + case 353 /* JSDocThrowsTag */: const typeExpression = tag.typeExpression; return typeExpression ? withNode(typeExpression) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return withNode(tag.class); - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return withNode(tag.class); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: const templateTag = tag; const displayParts = []; if (templateTag.constraint) { @@ -156239,14 +156303,14 @@ displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); } return displayParts; - case 347 /* JSDocTypeTag */: - case 353 /* JSDocSatisfiesTag */: + case 348 /* JSDocTypeTag */: + case 354 /* JSDocSatisfiesTag */: return withNode(tag.typeExpression); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: - case 350 /* JSDocSeeTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: + case 351 /* JSDocSeeTag */: const { name } = tag; return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); default: @@ -156269,14 +156333,14 @@ } function getTagNameDisplayPart(kind) { switch (kind) { - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return parameterNamePart; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return propertyNamePart; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return typeParameterNamePart; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: return typeAliasNamePart; default: return textPart; @@ -156402,46 +156466,46 @@ } function getCommentOwnerInfoWorker(commentOwner, options) { switch (commentOwner.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 170 /* MethodSignature */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 171 /* MethodSignature */: + case 217 /* ArrowFunction */: const host = commentOwner; return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 262 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 263 /* TypeAliasDeclaration */: return { commentOwner }; - case 168 /* PropertySignature */: { + case 169 /* PropertySignature */: { const host2 = commentOwner; return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; } - case 240 /* VariableStatement */: { + case 241 /* VariableStatement */: { const varStatement = commentOwner; const varDeclarations = varStatement.declarationList.declarations; const host2 = varDeclarations.length === 1 && varDeclarations[0].initializer ? getRightHandSideOfAssignment(varDeclarations[0].initializer) : void 0; return host2 ? { commentOwner, parameters: host2.parameters, hasReturn: hasReturn(host2, options) } : { commentOwner }; } - case 308 /* SourceFile */: + case 309 /* SourceFile */: return "quit"; - case 264 /* ModuleDeclaration */: - return commentOwner.parent.kind === 264 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 241 /* ExpressionStatement */: + case 265 /* ModuleDeclaration */: + return commentOwner.parent.kind === 265 /* ModuleDeclaration */ ? void 0 : { commentOwner }; + case 242 /* ExpressionStatement */: return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const be = commentOwner; if (getAssignmentDeclarationKind(be) === 0 /* None */) { return "quit"; } return isFunctionLike(be.right) ? { commentOwner, parameters: be.right.parameters, hasReturn: hasReturn(be.right, options) } : { commentOwner }; } - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: const init = commentOwner.initializer; if (init && (isFunctionExpression(init) || isArrowFunction(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; @@ -156452,14 +156516,14 @@ return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock(node.body) && !!forEachReturnStatement(node.body, (n) => n)); } function getRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 214 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 215 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return rightHandSide; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return find(rightHandSide.members, isConstructorDeclaration); } } @@ -156572,7 +156636,7 @@ const endPos = decl.getStart(); scanner2.setText(sourceFile.text, startPos, endPos - startPos); let numberOfNewLines = 0; - while (scanner2.getTokenPos() < endPos) { + while (scanner2.getTokenStart() < endPos) { const tokenKind = scanner2.scan(); if (tokenKind === 4 /* NewLineTrivia */) { numberOfNewLines++; @@ -156840,11 +156904,11 @@ function getModuleSpecifierExpression(declaration) { var _a2; switch (declaration.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return (_a2 = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return declaration.moduleSpecifier; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return declaration.declarationList.declarations[0].initializer.arguments[0]; } } @@ -156981,19 +157045,19 @@ function getImportKindOrder(s1) { var _a2; switch (s1.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: if (!s1.importClause) return 0; if (s1.importClause.isTypeOnly) return 1; - if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 271 /* NamespaceImport */) + if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 272 /* NamespaceImport */) return 2; if (s1.importClause.name) return 3; return 4; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return 5; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return 6; } } @@ -157114,7 +157178,7 @@ } const lastImport = current - 1; if (lastImport !== firstImport) { - out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 100 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */)); + out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 101 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */)); } } function visitNode3(n2) { @@ -157245,43 +157309,43 @@ } function getOutliningSpanForNode(n, sourceFile) { switch (n.kind) { - case 238 /* Block */: + case 239 /* Block */: if (isFunctionLike(n.parent)) { return functionSpan(n.parent, n, sourceFile); } switch (n.parent.kind) { - case 243 /* DoStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 242 /* IfStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 295 /* CatchClause */: + case 244 /* DoStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 243 /* IfStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 296 /* CatchClause */: return spanForNode(n.parent); - case 255 /* TryStatement */: + case 256 /* TryStatement */: const tryStatement = n.parent; if (tryStatement.tryBlock === n) { return spanForNode(n.parent); } else if (tryStatement.finallyBlock === n) { - const node = findChildOfKind(tryStatement, 96 /* FinallyKeyword */, sourceFile); + const node = findChildOfKind(tryStatement, 97 /* FinallyKeyword */, sourceFile); if (node) return spanForNode(node); } default: return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); } - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return spanForNode(n.parent); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 266 /* CaseBlock */: - case 184 /* TypeLiteral */: - case 203 /* ObjectBindingPattern */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 267 /* CaseBlock */: + case 185 /* TypeLiteral */: + case 204 /* ObjectBindingPattern */: return spanForNode(n); - case 186 /* TupleType */: + case 187 /* TupleType */: return spanForNode( n, /*autoCollapse*/ @@ -157290,24 +157354,24 @@ !isTupleTypeNode(n.parent), 22 /* OpenBracketToken */ ); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return spanForNodeArray(n.statements); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return spanForObjectOrArrayLiteral(n); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return spanForObjectOrArrayLiteral(n, 22 /* OpenBracketToken */); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return spanForJSXElement(n); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return spanForJSXFragment(n); - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: return spanForTemplateLiteral(n); - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: return spanForNode( n, /*autoCollapse*/ @@ -157316,15 +157380,15 @@ !isBindingElement(n.parent), 22 /* OpenBracketToken */ ); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return spanForArrowFunction(n); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return spanForCallExpression(n); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return spanForParenthesizedExpression(n); - case 272 /* NamedImports */: - case 276 /* NamedExports */: - case 296 /* AssertClause */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: + case 297 /* AssertClause */: return spanForNamedImportsOrExportsOrAssertClause(n); } function spanForNamedImportsOrExportsOrAssertClause(node) { @@ -157445,7 +157509,7 @@ node, sourceFile, /*autoCollapse*/ - node.kind !== 216 /* ArrowFunction */ + node.kind !== 217 /* ArrowFunction */ ); } function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { @@ -157560,18 +157624,18 @@ } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 264 /* ModuleDeclaration */: { + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 265 /* ModuleDeclaration */: { const node = exportNode; if (!node.name) return void 0; return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; } - case 240 /* VariableStatement */: { + case 241 /* VariableStatement */: { const vs = exportNode; if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { return void 0; @@ -157582,7 +157646,7 @@ Debug.assert(!wasDefault, "Can't have a default flag here"); return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; } - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const node = exportNode; if (node.isExportEquals) return void 0; @@ -157609,25 +157673,25 @@ factory.createNamedExports([spec]) )); } else { - changes.delete(exportingSourceFile, Debug.checkDefined(findModifier(exportNode, 88 /* DefaultKeyword */), "Should find a default keyword in modifier list")); + changes.delete(exportingSourceFile, Debug.checkDefined(findModifier(exportNode, 89 /* DefaultKeyword */), "Should find a default keyword in modifier list")); } } else { - const exportKeyword = Debug.checkDefined(findModifier(exportNode, 93 /* ExportKeyword */), "Should find an export keyword in modifier list"); + const exportKeyword = Debug.checkDefined(findModifier(exportNode, 94 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(88 /* DefaultKeyword */)); + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(89 /* DefaultKeyword */)); break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: const decl = first(exportNode.declarationList.declarations); if (!ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile) && !decl.type) { changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(decl.initializer, "Initializer was previously known to be present"))); break; } - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 264 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 265 /* ModuleDeclaration */: changes.deleteModifier(exportingSourceFile, exportKeyword); changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); break; @@ -157653,23 +157717,23 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { const { parent: parent2 } = ref; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); break; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: { + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: { const spec = parent2; changes.replaceNode(importingSourceFile, spec, makeImportSpecifier2(exportName, spec.name.text)); break; } - case 270 /* ImportClause */: { + case 271 /* ImportClause */: { const clause = parent2; Debug.assert(clause.name === ref, "Import clause name should match provided ref"); const spec = makeImportSpecifier2(exportName, ref.text); const { namedBindings } = clause; if (!namedBindings) { changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec])); - } else if (namedBindings.kind === 271 /* NamespaceImport */) { + } else if (namedBindings.kind === 272 /* NamespaceImport */) { changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) }); const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1 /* Double */; const newImport = makeImport( @@ -157686,7 +157750,7 @@ } break; } - case 202 /* ImportType */: + case 203 /* ImportType */: const importTypeNode = parent2; changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; @@ -157697,10 +157761,10 @@ function changeNamedToDefaultImport(importingSourceFile, ref, changes) { const parent2 = ref.parent; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); break; - case 273 /* ImportSpecifier */: { + case 274 /* ImportSpecifier */: { const defaultImport = factory.createIdentifier(parent2.name.text); if (parent2.parent.elements.length === 1) { changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); @@ -157710,7 +157774,7 @@ } break; } - case 278 /* ExportSpecifier */: { + case 279 /* ExportSpecifier */: { changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); break; } @@ -157809,7 +157873,7 @@ if (!importClause.namedBindings) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; } - if (importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 272 /* NamespaceImport */) { return { convertTo: 0 /* Named */, import: importClause.namedBindings }; } const shouldUseDefault = getShouldUseDefault(context.program, importClause); @@ -158355,11 +158419,11 @@ } function isPureImport(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return true; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return !hasSyntacticModifier(node, 1 /* Export */); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall( d.initializer, /*checkArgumentIsStringLiteralLike*/ @@ -158403,7 +158467,7 @@ } deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); deleteMovedStatements(oldFile, toMove.ranges, changes); - updateImportsInOtherFiles(changes, program, host, oldFile, usage.movedSymbols, newFilename); + updateImportsInOtherFiles(changes, program, host, oldFile, usage.movedSymbols, newFilename, quotePreference); const imports = getNewFileImportsAndAddExportInOldFile(oldFile, usage.oldImportsNeededByNewFile, usage.newFileImportsFromOldFile, changes, checker, program, host, useEsModuleSyntax, quotePreference); const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromNewFile, useEsModuleSyntax); if (imports.length && body.length) { @@ -158432,7 +158496,7 @@ forEachImportInStatement(statement, (i) => deleteUnusedImports(oldFile, i, changes, (name) => toDelete.has(checker.getSymbolAtLocation(name)))); } } -function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols, newFilename) { +function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols, newFilename, quotePreference) { const checker = program.getTypeChecker(); for (const sourceFile of program.getSourceFiles()) { if (sourceFile === oldFile) @@ -158448,29 +158512,29 @@ deleteUnusedImports(sourceFile, importNode, changes, shouldMove); const pathToNewFileWithExtension = resolvePath(getDirectoryPath(oldFile.path), newFilename); const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.path, pathToNewFileWithExtension, createModuleSpecifierResolutionHost(program, host)); - const newImportDeclaration = filterImport(importNode, factory.createStringLiteral(newModuleSpecifier), shouldMove); + const newImportDeclaration = filterImport(importNode, makeStringLiteral(newModuleSpecifier, quotePreference), shouldMove); if (newImportDeclaration) changes.insertNodeAfter(sourceFile, statement, newImportDeclaration); const ns = getNamespaceLikeImport(importNode); if (ns) - updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, ns, importNode); + updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, ns, importNode, quotePreference); }); } } } function getNamespaceLikeImport(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 271 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 272 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; + case 269 /* ImportEqualsDeclaration */: return node.name; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return tryCast(node.name, isIdentifier); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); } } -function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, oldImportId, oldImportNode) { +function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, oldImportId, oldImportNode, quotePreference) { const preferredNewNamespaceName = ts_codefix_exports.moduleSpecifierToValidIdentifier(newModuleSpecifier, 99 /* ESNext */); let needUniqueName = false; const toChange = []; @@ -158493,14 +158557,14 @@ for (const ref of toChange) { changes.replaceNode(sourceFile, ref, factory.createIdentifier(newNamespaceName)); } - changes.insertNodeAfter(sourceFile, oldImportNode, updateNamespaceLikeImportNode(oldImportNode, preferredNewNamespaceName, newModuleSpecifier)); + changes.insertNodeAfter(sourceFile, oldImportNode, updateNamespaceLikeImportNode(oldImportNode, preferredNewNamespaceName, newModuleSpecifier, quotePreference)); } } -function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifier) { +function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifier, quotePreference) { const newNamespaceId = factory.createIdentifier(newNamespaceName); - const newModuleString = factory.createStringLiteral(newModuleSpecifier); + const newModuleString = makeStringLiteral(newModuleSpecifier, quotePreference); switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return factory.createImportDeclaration( /*modifiers*/ void 0, @@ -158515,7 +158579,7 @@ /*assertClause*/ void 0 ); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return factory.createImportEqualsDeclaration( /*modifiers*/ void 0, @@ -158524,7 +158588,7 @@ newNamespaceId, factory.createExternalModuleReference(newModuleString) ); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return factory.createVariableDeclaration( newNamespaceId, /*exclamationToken*/ @@ -158538,7 +158602,7 @@ } } function moduleSpecifierFromImport(i) { - return i.kind === 269 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 268 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; + return i.kind === 270 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 269 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { if (isImportDeclaration(statement)) { @@ -158597,7 +158661,7 @@ factory.createObjectBindingPattern(bindingElements), /*type*/ void 0, - createRequireCall(factory.createStringLiteral(pathToNewFileWithCorrectExtension)) + createRequireCall(makeStringLiteral(pathToNewFileWithCorrectExtension, quotePreference)) ) : void 0; } } @@ -158637,15 +158701,15 @@ } function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { switch (importDecl.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused); break; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (isUnused(importDecl.name)) { changes.delete(sourceFile, importDecl); } break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused); break; default: @@ -158657,7 +158721,7 @@ return; const { name, namedBindings } = importDecl.importClause; const defaultUnused = !name || isUnused(name); - const namedBindingsUnused = !namedBindings || (namedBindings.kind === 271 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); + const namedBindingsUnused = !namedBindings || (namedBindings.kind === 272 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); if (defaultUnused && namedBindingsUnused) { changes.delete(sourceFile, importDecl); } else { @@ -158677,7 +158741,7 @@ void 0 ) ); - } else if (namedBindings.kind === 272 /* NamedImports */) { + } else if (namedBindings.kind === 273 /* NamedImports */) { for (const element of namedBindings.elements) { if (isUnused(element.name)) changes.delete(sourceFile, element); @@ -158705,9 +158769,9 @@ } } break; - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: break; - case 203 /* ObjectBindingPattern */: + case 204 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { changes.delete( sourceFile, @@ -158828,14 +158892,14 @@ } function isInImport(decl) { switch (decl.kind) { - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: return true; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return isVariableDeclarationInImport(decl); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); default: return false; @@ -158850,7 +158914,7 @@ } function filterImport(i, moduleSpecifier, keep) { switch (i.kind) { - case 269 /* ImportDeclaration */: { + case 270 /* ImportDeclaration */: { const clause = i.importClause; if (!clause) return void 0; @@ -158865,9 +158929,9 @@ void 0 ) : void 0; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return keep(i.name) ? i : void 0; - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { const name = filterBindingName(i.name, keep); return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; } @@ -158876,7 +158940,7 @@ } } function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 271 /* NamespaceImport */) { + if (namedBindings.kind === 272 /* NamespaceImport */) { return keep(namedBindings.name) ? namedBindings : void 0; } else { const newElements = namedBindings.elements.filter((e) => keep(e.name)); @@ -158887,9 +158951,9 @@ switch (name.kind) { case 79 /* Identifier */: return keep(name) ? name : void 0; - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: return name; - case 203 /* ObjectBindingPattern */: { + case 204 /* ObjectBindingPattern */: { const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } @@ -158946,13 +159010,13 @@ } function isNonVariableTopLevelDeclaration(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 269 /* ImportEqualsDeclaration */: return true; default: return false; @@ -158960,17 +159024,17 @@ } function forEachTopLevelDeclaration(statement, cb) { switch (statement.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 269 /* ImportEqualsDeclaration */: return cb(statement); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 241 /* ExpressionStatement */: { + case 242 /* ExpressionStatement */: { const { expression } = statement; return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; } @@ -158980,8 +159044,8 @@ switch (name.kind) { case 79 /* Identifier */: return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 204 /* ArrayBindingPattern */: - case 203 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); default: return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); @@ -158992,9 +159056,9 @@ } function getTopLevelDeclarationStatement(d) { switch (d.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return d.parent.parent; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getTopLevelDeclarationStatement( cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) ); @@ -159025,26 +159089,26 @@ return useEs6Exports ? [addEs6Export(decl)] : addCommonjsExport(decl); } function addEs6Export(d) { - const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(93 /* ExportKeyword */)], getModifiers(d)) : void 0; + const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(94 /* ExportKeyword */)], getModifiers(d)) : void 0; switch (d.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const decorators = canHaveDecorators(d) ? getDecorators(d) : void 0; return factory.updateClassDeclaration(d, concatenate(decorators, modifiers), d.name, d.typeParameters, d.heritageClauses, d.members); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return Debug.fail(); default: return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); @@ -159055,18 +159119,18 @@ } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: return [decl.name.text]; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 269 /* ImportEqualsDeclaration */: return emptyArray; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return Debug.fail("Can't export an ExpressionStatement"); default: return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); @@ -159118,7 +159182,7 @@ const lastDeclaration = signatureDecls[signatureDecls.length - 1]; let updated = lastDeclaration; switch (lastDeclaration.kind) { - case 170 /* MethodSignature */: { + case 171 /* MethodSignature */: { updated = factory.updateMethodSignature( lastDeclaration, lastDeclaration.modifiers, @@ -159130,7 +159194,7 @@ ); break; } - case 171 /* MethodDeclaration */: { + case 172 /* MethodDeclaration */: { updated = factory.updateMethodDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -159144,7 +159208,7 @@ ); break; } - case 176 /* CallSignature */: { + case 177 /* CallSignature */: { updated = factory.updateCallSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -159153,7 +159217,7 @@ ); break; } - case 173 /* Constructor */: { + case 174 /* Constructor */: { updated = factory.updateConstructorDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -159162,7 +159226,7 @@ ); break; } - case 177 /* ConstructSignature */: { + case 178 /* ConstructSignature */: { updated = factory.updateConstructSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -159171,7 +159235,7 @@ ); break; } - case 259 /* FunctionDeclaration */: { + case 260 /* FunctionDeclaration */: { updated = factory.updateFunctionDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -159221,7 +159285,7 @@ p.dotDotDotToken, p.name, p.questionToken, - p.type || factory.createKeywordTypeNode(131 /* AnyKeyword */) + p.type || factory.createKeywordTypeNode(132 /* AnyKeyword */) ), p); const parameterDocComment = p.symbol && p.symbol.getDocumentationComment(checker); if (parameterDocComment) { @@ -159244,12 +159308,12 @@ } function isConvertableSignatureDeclaration(d) { switch (d.kind) { - case 170 /* MethodSignature */: - case 171 /* MethodDeclaration */: - case 176 /* CallSignature */: - case 173 /* Constructor */: - case 177 /* ConstructSignature */: - case 259 /* FunctionDeclaration */: + case 171 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 177 /* CallSignature */: + case 174 /* Constructor */: + case 178 /* ConstructSignature */: + case 260 /* FunctionDeclaration */: return true; } return false; @@ -159867,14 +159931,14 @@ const functionReference = entry.node; const parent2 = functionReference.parent; switch (parent2.kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); if (callOrNewExpression && callOrNewExpression.expression === functionReference) { return callOrNewExpression; } break; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); @@ -159883,7 +159947,7 @@ } } break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); @@ -159901,13 +159965,13 @@ const reference = entry.node; const parent2 = reference.parent; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; @@ -159949,22 +160013,22 @@ if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false; switch (functionDeclaration.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: if (isObjectLiteralExpression(functionDeclaration.parent)) { const contextualSymbol = getSymbolForContextualType(functionDeclaration.name, checker); return ((_a2 = contextualSymbol == null ? void 0 : contextualSymbol.declarations) == null ? void 0 : _a2.length) === 1 && isSingleImplementation(functionDeclaration, checker); } return isSingleImplementation(functionDeclaration, checker); - case 173 /* Constructor */: + case 174 /* Constructor */: if (isClassDeclaration(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); } - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return isValidVariableDeclaration(functionDeclaration.parent); } return false; @@ -159974,7 +160038,7 @@ } function hasNameOrDefault(functionOrClassDeclaration) { if (!functionOrClassDeclaration.name) { - const defaultKeyword = findModifier(functionOrClassDeclaration, 88 /* DefaultKeyword */); + const defaultKeyword = findModifier(functionOrClassDeclaration, 89 /* DefaultKeyword */); return !!defaultKeyword; } return true; @@ -160141,16 +160205,16 @@ } function getClassNames(constructorDeclaration) { switch (constructorDeclaration.parent.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const classDeclaration = constructorDeclaration.parent; if (classDeclaration.name) return [classDeclaration.name]; const defaultModifier = Debug.checkDefined( - findModifier(classDeclaration, 88 /* DefaultKeyword */), + findModifier(classDeclaration, 89 /* DefaultKeyword */), "Nameless class declaration should be a default export" ); return [defaultModifier]; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: const classExpression = constructorDeclaration.parent; const variableDeclaration = constructorDeclaration.parent.parent; const className = classExpression.name; @@ -160161,29 +160225,29 @@ } function getFunctionNames(functionDeclaration) { switch (functionDeclaration.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: if (functionDeclaration.name) return [functionDeclaration.name]; const defaultModifier = Debug.checkDefined( - findModifier(functionDeclaration, 88 /* DefaultKeyword */), + findModifier(functionDeclaration, 89 /* DefaultKeyword */), "Nameless function declaration should be a default export" ); return [defaultModifier]; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return [functionDeclaration.name]; - case 173 /* Constructor */: + case 174 /* Constructor */: const ctrKeyword = Debug.checkDefined( - findChildOfKind(functionDeclaration, 135 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), + findChildOfKind(functionDeclaration, 136 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword" ); - if (functionDeclaration.parent.kind === 228 /* ClassExpression */) { + if (functionDeclaration.parent.kind === 229 /* ClassExpression */) { const variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; } return [ctrKeyword]; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return [functionDeclaration.parent.name]; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name]; return [functionDeclaration.parent.name]; @@ -160266,11 +160330,11 @@ function getParentBinaryExpression(expr) { const container = findAncestor(expr.parent, (n) => { switch (n.kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return false; - case 225 /* TemplateExpression */: - case 223 /* BinaryExpression */: + case 226 /* TemplateExpression */: + case 224 /* BinaryExpression */: return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; @@ -160918,18 +160982,18 @@ function checkForStaticContext(nodeToCheck, containingClass) { let current = nodeToCheck; while (current !== containingClass) { - if (current.kind === 169 /* PropertyDeclaration */) { + if (current.kind === 170 /* PropertyDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 166 /* Parameter */) { + } else if (current.kind === 167 /* Parameter */) { const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 173 /* Constructor */) { + if (ctorOrMethod.kind === 174 /* Constructor */) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 171 /* MethodDeclaration */) { + } else if (current.kind === 172 /* MethodDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } @@ -160969,7 +161033,7 @@ /*includeClassComputedPropertyName*/ false ); - if (container.kind === 259 /* FunctionDeclaration */ || container.kind === 171 /* MethodDeclaration */ && container.parent.kind === 207 /* ObjectLiteralExpression */ || container.kind === 215 /* FunctionExpression */) { + if (container.kind === 260 /* FunctionDeclaration */ || container.kind === 172 /* MethodDeclaration */ && container.parent.kind === 208 /* ObjectLiteralExpression */ || container.kind === 216 /* FunctionExpression */) { rangeFacts |= 16 /* UsesThisInFunction */; } } @@ -160979,21 +161043,21 @@ return true; } if (isDeclaration(node2)) { - const declaringNode = node2.kind === 257 /* VariableDeclaration */ ? node2.parent.parent : node2; + const declaringNode = node2.kind === 258 /* VariableDeclaration */ ? node2.parent.parent : node2; if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } } switch (node2.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); return true; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; - case 106 /* SuperKeyword */: - if (node2.parent.kind === 210 /* CallExpression */) { + case 107 /* SuperKeyword */: + if (node2.parent.kind === 211 /* CallExpression */) { const containingClass2 = getContainingClass(node2); if (containingClass2 === void 0 || containingClass2.pos < span.start || containingClass2.end >= span.start + span.length) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractSuper)); @@ -161004,7 +161068,7 @@ thisNode = node2; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: forEachChild(node2, function check(n) { if (isThis(n)) { rangeFacts |= 8 /* UsesThis */; @@ -161015,34 +161079,34 @@ forEachChild(n, check); } }); - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); } - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return false; } const savedPermittedJumps = permittedJumps; switch (node2.kind) { - case 242 /* IfStatement */: + case 243 /* IfStatement */: permittedJumps &= ~4 /* Return */; break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: permittedJumps = 0 /* None */; break; - case 238 /* Block */: - if (node2.parent && node2.parent.kind === 255 /* TryStatement */ && node2.parent.finallyBlock === node2) { + case 239 /* Block */: + if (node2.parent && node2.parent.kind === 256 /* TryStatement */ && node2.parent.finallyBlock === node2) { permittedJumps = 4 /* Return */; } break; - case 293 /* DefaultClause */: - case 292 /* CaseClause */: + case 294 /* DefaultClause */: + case 293 /* CaseClause */: permittedJumps |= 1 /* Break */; break; default: @@ -161056,39 +161120,39 @@ break; } switch (node2.kind) { - case 194 /* ThisType */: - case 108 /* ThisKeyword */: + case 195 /* ThisType */: + case 109 /* ThisKeyword */: rangeFacts |= 8 /* UsesThis */; thisNode = node2; break; - case 253 /* LabeledStatement */: { + case 254 /* LabeledStatement */: { const label = node2.label; (seenLabels || (seenLabels = [])).push(label.escapedText); forEachChild(node2, visit); seenLabels.pop(); break; } - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: { + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: { const label = node2.label; if (label) { if (!contains(seenLabels, label.escapedText)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { - if (!(permittedJumps & (node2.kind === 249 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { + if (!(permittedJumps & (node2.kind === 250 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; } - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: rangeFacts |= 4 /* IsAsyncFunction */; break; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: rangeFacts |= 2 /* IsGenerator */; break; - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: if (permittedJumps & 4 /* Return */) { rangeFacts |= 1 /* HasReturn */; } else { @@ -161138,12 +161202,12 @@ const scopes = []; while (true) { current = current.parent; - if (current.kind === 166 /* Parameter */) { + if (current.kind === 167 /* Parameter */) { current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; } if (isScope(current)) { scopes.push(current); - if (current.kind === 308 /* SourceFile */) { + if (current.kind === 309 /* SourceFile */) { return scopes; } } @@ -161219,28 +161283,28 @@ } function getDescriptionForFunctionLikeDeclaration(scope) { switch (scope.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return "constructor"; - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return "arrow function"; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return `method '${scope.name.getText()}'`; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return `'get ${scope.name.getText()}'`; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return `'set ${scope.name.getText()}'`; default: throw Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); } } function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 260 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; + return scope.kind === 261 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; } function getDescriptionForModuleLikeDeclaration(scope) { - return scope.kind === 265 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; + return scope.kind === 266 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; } function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParameterUsages, substitutions }, exposedVariableDeclarations, range, context) { const checker = context.program.getTypeChecker(); @@ -161295,12 +161359,12 @@ let newFunction; const callThis = !!(range.facts & 16 /* UsesThisInFunction */); if (isClassLike(scope)) { - const modifiers = isJS ? [] : [factory.createModifier(121 /* PrivateKeyword */)]; + const modifiers = isJS ? [] : [factory.createModifier(122 /* PrivateKeyword */)]; if (range.facts & 32 /* InStaticRegion */) { - modifiers.push(factory.createModifier(124 /* StaticKeyword */)); + modifiers.push(factory.createModifier(125 /* StaticKeyword */)); } if (range.facts & 4 /* IsAsyncFunction */) { - modifiers.push(factory.createModifier(132 /* AsyncKeyword */)); + modifiers.push(factory.createModifier(133 /* AsyncKeyword */)); } newFunction = factory.createMethodDeclaration( modifiers.length ? modifiers : void 0, @@ -161336,7 +161400,7 @@ ); } newFunction = factory.createFunctionDeclaration( - range.facts & 4 /* IsAsyncFunction */ ? [factory.createToken(132 /* AsyncKeyword */)] : void 0, + range.facts & 4 /* IsAsyncFunction */ ? [factory.createToken(133 /* AsyncKeyword */)] : void 0, range.facts & 2 /* IsGenerator */ ? factory.createToken(41 /* AsteriskToken */) : void 0, functionName, typeParameters, @@ -161548,7 +161612,7 @@ while (isParenthesizedTypeNode(withoutParens)) { withoutParens = withoutParens.type; } - return isUnionTypeNode(withoutParens) && find(withoutParens.types, (t) => t.kind === 155 /* UndefinedKeyword */) ? clone2 : factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]); + return isUnionTypeNode(withoutParens) && find(withoutParens.types, (t) => t.kind === 156 /* UndefinedKeyword */) ? clone2 : factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(156 /* UndefinedKeyword */)]); } } function extractConstantInScope(node, scope, { substitutions }, rangeFacts, context) { @@ -161570,11 +161634,11 @@ if (isClassLike(scope)) { Debug.assert(!isJS, "Cannot extract to a JS class"); const modifiers = []; - modifiers.push(factory.createModifier(121 /* PrivateKeyword */)); + modifiers.push(factory.createModifier(122 /* PrivateKeyword */)); if (rangeFacts & 32 /* InStaticRegion */) { - modifiers.push(factory.createModifier(124 /* StaticKeyword */)); + modifiers.push(factory.createModifier(125 /* StaticKeyword */)); } - modifiers.push(factory.createModifier(146 /* ReadonlyKeyword */)); + modifiers.push(factory.createModifier(147 /* ReadonlyKeyword */)); const newVariable = factory.createPropertyDeclaration( modifiers, localNameText, @@ -161617,7 +161681,7 @@ changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); const localReference = factory.createIdentifier(localNameText); changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 241 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { + } else if (node.parent.kind === 242 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { const newVariableStatement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -161647,7 +161711,7 @@ false ); } - if (node.parent.kind === 241 /* ExpressionStatement */) { + if (node.parent.kind === 242 /* ExpressionStatement */) { changeTracker.delete(context.file, node.parent); } else { let localReference = factory.createIdentifier(localNameText); @@ -162199,27 +162263,27 @@ function isExtractableExpression(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 302 /* EnumMember */: + case 303 /* EnumMember */: return false; } switch (node.kind) { case 10 /* StringLiteral */: - return parent2.kind !== 269 /* ImportDeclaration */ && parent2.kind !== 273 /* ImportSpecifier */; - case 227 /* SpreadElement */: - case 203 /* ObjectBindingPattern */: - case 205 /* BindingElement */: + return parent2.kind !== 270 /* ImportDeclaration */ && parent2.kind !== 274 /* ImportSpecifier */; + case 228 /* SpreadElement */: + case 204 /* ObjectBindingPattern */: + case 206 /* BindingElement */: return false; case 79 /* Identifier */: - return parent2.kind !== 205 /* BindingElement */ && parent2.kind !== 273 /* ImportSpecifier */ && parent2.kind !== 278 /* ExportSpecifier */; + return parent2.kind !== 206 /* BindingElement */ && parent2.kind !== 274 /* ImportSpecifier */ && parent2.kind !== 279 /* ExportSpecifier */; } return true; } function isBlockLike(node) { switch (node.kind) { - case 238 /* Block */: - case 308 /* SourceFile */: - case 265 /* ModuleBlock */: - case 292 /* CaseClause */: + case 239 /* Block */: + case 309 /* SourceFile */: + case 266 /* ModuleBlock */: + case 293 /* CaseClause */: return true; default: return false; @@ -162365,10 +162429,10 @@ } function isConvertibleDeclaration(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return true; default: return false; @@ -162436,7 +162500,7 @@ return getRenameInfoError(wouldRenameNodeModules); } const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 164 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; + const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 165 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; const displayName = specifierName || typeChecker.symbolToString(symbol); const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol); return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), node, sourceFile); @@ -162536,7 +162600,7 @@ case 80 /* PrivateIdentifier */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return true; case 8 /* NumericLiteral */: return isLiteralNameOfPropertyDeclarationOrIndexAccess(node); @@ -162710,10 +162774,10 @@ ); } return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 212 /* TaggedTemplateExpression */) { + } else if (isTemplateHead(node) && parent2.parent.kind === 213 /* TaggedTemplateExpression */) { const templateExpression = parent2; const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 225 /* TemplateExpression */); + Debug.assert(templateExpression.kind === 226 /* TemplateExpression */); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { @@ -162780,17 +162844,17 @@ return void 0; const { parent: parent2 } = startingToken; switch (parent2.kind) { - case 214 /* ParenthesizedExpression */: - case 171 /* MethodDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 215 /* ParenthesizedExpression */: + case 172 /* MethodDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: const info = getArgumentOrParameterListInfo(startingToken, position, sourceFile); if (!info) return void 0; const { argumentIndex, argumentCount, argumentsSpan } = info; const contextualType = isMethodDeclaration(parent2) ? checker.getContextualTypeForObjectLiteralElement(parent2) : checker.getContextualType(parent2); return contextualType && { contextualType, argumentIndex, argumentCount, argumentsSpan }; - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const highestBinary = getHighestBinary(parent2); const contextualType2 = checker.getContextualType(highestBinary); const argumentIndex2 = startingToken.kind === 20 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; @@ -162864,7 +162928,7 @@ const template = taggedTemplate.template; const applicableSpanStart = template.getStart(); let applicableSpanEnd = template.getEnd(); - if (template.kind === 225 /* TemplateExpression */) { + if (template.kind === 226 /* TemplateExpression */) { const lastSpan = last(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia( @@ -163161,10 +163225,10 @@ const closeBraceToken = Debug.checkDefined(children.pop()); Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */); Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */); - const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 146 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 57 /* QuestionToken */); + const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 147 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 57 /* QuestionToken */); const groupedWithBrackets = groupChildren( groupedWithPlusMinusTokens, - ({ kind }) => kind === 22 /* OpenBracketToken */ || kind === 165 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ + ({ kind }) => kind === 22 /* OpenBracketToken */ || kind === 166 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ ); return [ openBraceToken, @@ -163175,7 +163239,7 @@ } if (isPropertySignature(node)) { const children = groupChildren(node.getChildren(), (child) => child === node.name || contains(node.modifiers, child)); - const firstJSDocChild = ((_a2 = children[0]) == null ? void 0 : _a2.kind) === 323 /* JSDoc */ ? children[0] : void 0; + const firstJSDocChild = ((_a2 = children[0]) == null ? void 0 : _a2.kind) === 324 /* JSDoc */ ? children[0] : void 0; const withJSDocSeparated = firstJSDocChild ? children.slice(1) : children; const splittedChildren = splitChildren(withJSDocSeparated, ({ kind }) => kind === 58 /* ColonToken */); return firstJSDocChild ? [firstJSDocChild, createSyntaxList2(splittedChildren)] : splittedChildren; @@ -163236,19 +163300,19 @@ } function isListOpener(token) { const kind = token && token.kind; - return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 283 /* JsxOpeningElement */; + return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 284 /* JsxOpeningElement */; } function isListCloser(token) { const kind = token && token.kind; - return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 284 /* JsxClosingElement */; + return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 285 /* JsxClosingElement */; } function getEndPos(sourceFile, node) { switch (node.kind) { - case 344 /* JSDocParameterTag */: - case 341 /* JSDocCallbackTag */: - case 351 /* JSDocPropertyTag */: - case 349 /* JSDocTypedefTag */: - case 346 /* JSDocThisTag */: + case 345 /* JSDocParameterTag */: + case 342 /* JSDocCallbackTag */: + case 352 /* JSDocPropertyTag */: + case 350 /* JSDocTypedefTag */: + case 347 /* JSDocThisTag */: return sourceFile.getLineEndOfPosition(node.getStart()); default: return node.getEnd(); @@ -163272,7 +163336,7 @@ } const flags = getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 228 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; + return getDeclarationOfKind(symbol, 229 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; } if (flags & 384 /* Enum */) return "enum" /* enumElement */; @@ -163301,7 +163365,7 @@ if (typeChecker.isArgumentsSymbol(symbol)) { return "local var" /* localVariableElement */; } - if (location.kind === 108 /* ThisKeyword */ && isExpression(location) || isThisInTypeQuery(location)) { + if (location.kind === 109 /* ThisKeyword */ && isExpression(location) || isThisInTypeQuery(location)) { return "parameter" /* parameterElement */; } const flags = getCombinedLocalAndExportSymbolFlags(symbol); @@ -163385,26 +163449,26 @@ const symbolFlags = getCombinedLocalAndExportSymbolFlags(symbol); let symbolKind = semanticMeaning & 1 /* Value */ ? getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) : "" /* unknown */; let hasAddedSymbolInfo = false; - const isThisExpression = location.kind === 108 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location); + const isThisExpression = location.kind === 109 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location); let type; let documentationFromAlias; let tagsFromAlias; let hasMultipleSignatures = false; - if (location.kind === 108 /* ThisKeyword */ && !isThisExpression) { - return { displayParts: [keywordPart(108 /* ThisKeyword */)], documentation: [], symbolKind: "primitive type" /* primitiveType */, tags: void 0 }; + if (location.kind === 109 /* ThisKeyword */ && !isThisExpression) { + return { displayParts: [keywordPart(109 /* ThisKeyword */)], documentation: [], symbolKind: "primitive type" /* primitiveType */, tags: void 0 }; } if (symbolKind !== "" /* unknown */ || symbolFlags & 32 /* Class */ || symbolFlags & 2097152 /* Alias */) { if (symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */) { const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location); if (declaration) { switch (declaration.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: symbolKind = "getter" /* memberGetAccessorElement */; break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: symbolKind = "setter" /* memberSetAccessorElement */; break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: symbolKind = "accessor" /* memberAccessorVariableElement */; break; default: @@ -163416,7 +163480,7 @@ } let signature; type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (location.parent && location.parent.kind === 208 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 209 /* PropertyAccessExpression */) { const right = location.parent.name; if (right === location || right && right.getFullWidth() === 0) { location = location.parent; @@ -163432,7 +163496,7 @@ } if (callExpressionLike) { signature = typeChecker.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 211 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 106 /* SuperKeyword */; + const useConstructSignatures = callExpressionLike.kind === 212 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 107 /* SuperKeyword */; const allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (signature && !contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : void 0; @@ -163447,10 +163511,10 @@ displayParts.push(spacePart()); if (useConstructSignatures) { if (signature.flags & 4 /* Abstract */) { - displayParts.push(keywordPart(126 /* AbstractKeyword */)); + displayParts.push(keywordPart(127 /* AbstractKeyword */)); displayParts.push(spacePart()); } - displayParts.push(keywordPart(103 /* NewKeyword */)); + displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); } addFullSymbolName(symbol); @@ -163480,10 +163544,10 @@ } if (useConstructSignatures) { if (signature.flags & 4 /* Abstract */) { - displayParts.push(keywordPart(126 /* AbstractKeyword */)); + displayParts.push(keywordPart(127 /* AbstractKeyword */)); displayParts.push(spacePart()); } - displayParts.push(keywordPart(103 /* NewKeyword */)); + displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); } addSignatureDisplayParts(signature, allSignatures, 262144 /* WriteArrowStyleSignature */); @@ -163495,21 +163559,21 @@ hasMultipleSignatures = allSignatures.length > 1; } } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || // name of function declaration - location.kind === 135 /* ConstructorKeyword */ && location.parent.kind === 173 /* Constructor */) { + location.kind === 136 /* ConstructorKeyword */ && location.parent.kind === 174 /* Constructor */) { const functionDeclaration = location.parent; - const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 135 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); + const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 136 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 173 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + const allSignatures = functionDeclaration.kind === 174 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 173 /* Constructor */) { + if (functionDeclaration.kind === 174 /* Constructor */) { symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 176 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 177 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -163521,10 +163585,10 @@ } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 228 /* ClassExpression */)) { + if (getDeclarationOfKind(symbol, 229 /* ClassExpression */)) { pushSymbolKind("local class" /* localClassElement */); } else { - displayParts.push(keywordPart(84 /* ClassKeyword */)); + displayParts.push(keywordPart(85 /* ClassKeyword */)); } displayParts.push(spacePart()); addFullSymbolName(symbol); @@ -163532,14 +163596,14 @@ } if (symbolFlags & 64 /* Interface */ && semanticMeaning & 2 /* Type */) { prefixNextMeaning(); - displayParts.push(keywordPart(118 /* InterfaceKeyword */)); + displayParts.push(keywordPart(119 /* InterfaceKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 524288 /* TypeAlias */ && semanticMeaning & 2 /* Type */) { prefixNextMeaning(); - displayParts.push(keywordPart(154 /* TypeKeyword */)); + displayParts.push(keywordPart(155 /* TypeKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); @@ -163551,18 +163615,18 @@ if (symbolFlags & 384 /* Enum */) { prefixNextMeaning(); if (some(symbol.declarations, (d) => isEnumDeclaration(d) && isEnumConst(d))) { - displayParts.push(keywordPart(85 /* ConstKeyword */)); + displayParts.push(keywordPart(86 /* ConstKeyword */)); displayParts.push(spacePart()); } - displayParts.push(keywordPart(92 /* EnumKeyword */)); + displayParts.push(keywordPart(93 /* EnumKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); } if (symbolFlags & 1536 /* Module */ && !isThisExpression) { prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 264 /* ModuleDeclaration */); + const declaration = getDeclarationOfKind(symbol, 265 /* ModuleDeclaration */); const isNamespace = declaration && declaration.name && declaration.name.kind === 79 /* Identifier */; - displayParts.push(keywordPart(isNamespace ? 143 /* NamespaceKeyword */ : 142 /* ModuleKeyword */)); + displayParts.push(keywordPart(isNamespace ? 144 /* NamespaceKeyword */ : 143 /* ModuleKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); } @@ -163578,7 +163642,7 @@ addFullSymbolName(symbol.parent, enclosingDeclaration); writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - const decl = getDeclarationOfKind(symbol, 165 /* TypeParameter */); + const decl = getDeclarationOfKind(symbol, 166 /* TypeParameter */); if (decl === void 0) return Debug.fail(); const declaration = decl.parent; @@ -163586,16 +163650,16 @@ if (isFunctionLike(declaration)) { addInPrefix(); const signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 177 /* ConstructSignature */) { - displayParts.push(keywordPart(103 /* NewKeyword */)); + if (declaration.kind === 178 /* ConstructSignature */) { + displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); - } else if (declaration.kind !== 176 /* CallSignature */ && declaration.name) { + } else if (declaration.kind !== 177 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); } else if (isTypeAliasDeclaration(declaration)) { addInPrefix(); - displayParts.push(keywordPart(154 /* TypeKeyword */)); + displayParts.push(keywordPart(155 /* TypeKeyword */)); displayParts.push(spacePart()); addFullSymbolName(declaration.symbol); writeTypeParametersOfSymbol(declaration.symbol, sourceFile); @@ -163607,7 +163671,7 @@ symbolKind = "enum member" /* enumMemberElement */; addPrefixForAnyFunctionOrVar(symbol, "enum member"); const declaration = (_a2 = symbol.declarations) == null ? void 0 : _a2[0]; - if ((declaration == null ? void 0 : declaration.kind) === 302 /* EnumMember */) { + if ((declaration == null ? void 0 : declaration.kind) === 303 /* EnumMember */) { const constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== void 0) { displayParts.push(spacePart()); @@ -163651,33 +163715,33 @@ } if (symbol.declarations) { switch (symbol.declarations[0].kind) { - case 267 /* NamespaceExportDeclaration */: - displayParts.push(keywordPart(93 /* ExportKeyword */)); + case 268 /* NamespaceExportDeclaration */: + displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); - displayParts.push(keywordPart(143 /* NamespaceKeyword */)); + displayParts.push(keywordPart(144 /* NamespaceKeyword */)); break; - case 274 /* ExportAssignment */: - displayParts.push(keywordPart(93 /* ExportKeyword */)); + case 275 /* ExportAssignment */: + displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); - displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 63 /* EqualsToken */ : 88 /* DefaultKeyword */)); + displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 63 /* EqualsToken */ : 89 /* DefaultKeyword */)); break; - case 278 /* ExportSpecifier */: - displayParts.push(keywordPart(93 /* ExportKeyword */)); + case 279 /* ExportSpecifier */: + displayParts.push(keywordPart(94 /* ExportKeyword */)); break; default: - displayParts.push(keywordPart(100 /* ImportKeyword */)); + displayParts.push(keywordPart(101 /* ImportKeyword */)); } } displayParts.push(spacePart()); addFullSymbolName(symbol); forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 268 /* ImportEqualsDeclaration */) { + if (declaration.kind === 269 /* ImportEqualsDeclaration */) { const importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); displayParts.push(operatorPart(63 /* EqualsToken */)); displayParts.push(spacePart()); - displayParts.push(keywordPart(147 /* RequireKeyword */)); + displayParts.push(keywordPart(148 /* RequireKeyword */)); displayParts.push(punctuationPart(20 /* OpenParenToken */)); displayParts.push(displayPart(getTextOfNode(getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), 8 /* stringLiteral */)); displayParts.push(punctuationPart(21 /* CloseParenToken */)); @@ -163699,7 +163763,7 @@ if (type) { if (isThisExpression) { prefixNextMeaning(); - displayParts.push(keywordPart(108 /* ThisKeyword */)); + displayParts.push(keywordPart(109 /* ThisKeyword */)); } else { addPrefixForAnyFunctionOrVar(symbol, symbolKind); } @@ -163739,9 +163803,9 @@ documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker); } if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 308 /* SourceFile */)) { + if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 309 /* SourceFile */)) { for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 223 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 224 /* BinaryExpression */) { continue; } const rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -163795,7 +163859,7 @@ } function addInPrefix() { displayParts.push(spacePart()); - displayParts.push(keywordPart(101 /* InKeyword */)); + displayParts.push(keywordPart(102 /* InKeyword */)); displayParts.push(spacePart()); } function addFullSymbolName(symbolToDisplay, enclosingDeclaration2) { @@ -163893,14 +163957,14 @@ return false; } return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 215 /* FunctionExpression */) { + if (declaration.kind === 216 /* FunctionExpression */) { return true; } - if (declaration.kind !== 257 /* VariableDeclaration */ && declaration.kind !== 259 /* FunctionDeclaration */) { + if (declaration.kind !== 258 /* VariableDeclaration */ && declaration.kind !== 260 /* FunctionDeclaration */) { return false; } for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 308 /* SourceFile */ || parent2.kind === 265 /* ModuleBlock */) { + if (parent2.kind === 309 /* SourceFile */ || parent2.kind === 266 /* ModuleBlock */) { return false; } } @@ -164084,7 +164148,7 @@ return newEnd !== end && (trailingTriviaOption === 2 /* Include */ || isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))) ? newEnd : end; } function isSeparator(node, candidate) { - return !!candidate && !!node.parent && (candidate.kind === 27 /* CommaToken */ || candidate.kind === 26 /* SemicolonToken */ && node.parent.kind === 207 /* ObjectLiteralExpression */); + return !!candidate && !!node.parent && (candidate.kind === 27 /* CommaToken */ || candidate.kind === 26 /* SemicolonToken */ && node.parent.kind === 208 /* ObjectLiteralExpression */); } function isThisTypeAnnotatable(containingFunction) { return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); @@ -164295,7 +164359,7 @@ endNode2 = first(node.parameters); } } else { - endNode2 = (_a2 = node.kind === 257 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; + endNode2 = (_a2 = node.kind === 258 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; } this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); return true; @@ -164445,18 +164509,18 @@ } getInsertNodeAfterOptionsWorker(node) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: case 10 /* StringLiteral */: case 79 /* Identifier */: return { prefix: ", " }; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return { suffix: "," + this.newLineCharacter }; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return { prefix: " " }; - case 166 /* Parameter */: + case 167 /* Parameter */: return {}; default: Debug.assert(isStatement(node) || isClassOrTypeElement(node)); @@ -164465,22 +164529,22 @@ } insertName(sourceFile, node, name) { Debug.assert(!node.name); - if (node.kind === 216 /* ArrowFunction */) { + if (node.kind === 217 /* ArrowFunction */) { const arrow = findChildOfKind(node, 38 /* EqualsGreaterThanToken */, sourceFile); const lparen = findChildOfKind(node, 20 /* OpenParenToken */, sourceFile); if (lparen) { - this.insertNodesAt(sourceFile, lparen.getStart(sourceFile), [factory.createToken(98 /* FunctionKeyword */), factory.createIdentifier(name)], { joiner: " " }); + this.insertNodesAt(sourceFile, lparen.getStart(sourceFile), [factory.createToken(99 /* FunctionKeyword */), factory.createIdentifier(name)], { joiner: " " }); deleteNode(this, sourceFile, arrow); } else { this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); this.replaceRange(sourceFile, arrow, factory.createToken(21 /* CloseParenToken */)); } - if (node.body.kind !== 238 /* Block */) { - this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(18 /* OpenBraceToken */), factory.createToken(105 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); + if (node.body.kind !== 239 /* Block */) { + this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(18 /* OpenBraceToken */), factory.createToken(106 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); this.insertNodesAt(sourceFile, node.body.end, [factory.createToken(26 /* SemicolonToken */), factory.createToken(19 /* CloseBraceToken */)], { joiner: " " }); } } else { - const pos = findChildOfKind(node, node.kind === 215 /* FunctionExpression */ ? 98 /* FunctionKeyword */ : 84 /* ClassKeyword */, sourceFile).end; + const pos = findChildOfKind(node, node.kind === 216 /* FunctionExpression */ ? 99 /* FunctionKeyword */ : 85 /* ClassKeyword */, sourceFile).end; this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); } } @@ -164619,10 +164683,10 @@ } }; function updateJSDocHost(parent2) { - if (parent2.kind !== 216 /* ArrowFunction */) { + if (parent2.kind !== 217 /* ArrowFunction */) { return parent2; } - const jsDocNode = parent2.parent.kind === 169 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; + const jsDocNode = parent2.parent.kind === 170 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; jsDocNode.jsDoc = parent2.jsDoc; return jsDocNode; } @@ -164631,7 +164695,7 @@ return void 0; } switch (oldTag.kind) { - case 344 /* JSDocParameterTag */: { + case 345 /* JSDocParameterTag */: { const oldParam = oldTag; const newParam = newTag; return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag( @@ -164645,14 +164709,14 @@ oldParam.comment ) : void 0; } - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: return factory.createJSDocReturnTag( /*tagName*/ void 0, newTag.typeExpression, oldTag.comment ); - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return factory.createJSDocTypeTag( /*tagName*/ void 0, @@ -165115,13 +165179,13 @@ return !isInComment(sourceFile, position) && !isInString(sourceFile, position) && !isInTemplateString(sourceFile, position) && !isInJSXText(sourceFile, position); } function needSemicolonBetween(a, b) { - return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 164 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 165 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } var deleteDeclaration; ((_deleteDeclaration) => { function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { switch (node.kind) { - case 166 /* Parameter */: { + case 167 /* Parameter */: { const oldFunction = node.parent; if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 20 /* OpenParenToken */, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); @@ -165130,29 +165194,29 @@ } break; } - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: const isFirstImport = sourceFile.imports.length && node === first(sourceFile.imports).parent || node === find(sourceFile.statements, isAnyImportSyntax); deleteNode(changes, sourceFile, node, { leadingTriviaOption: isFirstImport ? 0 /* Exclude */ : hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: const pattern = node.parent; - const preserveComma = pattern.kind === 204 /* ArrayBindingPattern */ && node !== last(pattern.elements); + const preserveComma = pattern.kind === 205 /* ArrayBindingPattern */ && node !== last(pattern.elements); if (preserveComma) { deleteNode(changes, sourceFile, node); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); break; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: const namedImports = node.parent; if (namedImports.elements.length === 1) { deleteImportBinding(changes, sourceFile, namedImports); @@ -165160,17 +165224,17 @@ deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: deleteImportBinding(changes, sourceFile, node); break; case 26 /* SemicolonToken */: deleteNode(changes, sourceFile, node, { trailingTriviaOption: 0 /* Exclude */ }); break; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); break; - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -165212,13 +165276,13 @@ const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { - const importDecl = getAncestor(node, 269 /* ImportDeclaration */); + const importDecl = getAncestor(node, 270 /* ImportDeclaration */); deleteNode(changes, sourceFile, importDecl); } } function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { const { parent: parent2 } = node; - if (parent2.kind === 295 /* CatchClause */) { + if (parent2.kind === 296 /* CatchClause */) { changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 20 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 21 /* CloseParenToken */, sourceFile)); return; } @@ -165228,14 +165292,14 @@ } const gp = parent2.parent; switch (gp.kind) { - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); break; - case 245 /* ForStatement */: + case 246 /* ForStatement */: deleteNode(changes, sourceFile, parent2); break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -165381,7 +165445,7 @@ function getFormattingScanner(text, languageVariant, startPos, endPos, cb) { const scanner2 = languageVariant === 1 /* JSX */ ? jsxScanner : standardScanner; scanner2.setText(text); - scanner2.setTextPos(startPos); + scanner2.resetTokenState(startPos); let wasNewLine = true; let leadingTrivia; let trailingTrivia; @@ -165398,9 +165462,13 @@ lastTrailingTriviaWasNewLine: () => wasNewLine, skipToEndOf, skipToStartOf, + getTokenFullStart: () => { + var _a2; + return (_a2 = lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) != null ? _a2 : scanner2.getTokenStart(); + }, getStartPos: () => { var _a2; - return (_a2 = lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) != null ? _a2 : scanner2.getTokenPos(); + return (_a2 = lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) != null ? _a2 : scanner2.getTokenStart(); } }); lastTokenInfo = void 0; @@ -165408,7 +165476,7 @@ return res; function advance() { lastTokenInfo = void 0; - const isStarted = scanner2.getStartPos() !== startPos; + const isStarted = scanner2.getTokenFullStart() !== startPos; if (isStarted) { wasNewLine = !!trailingTrivia && last(trailingTrivia).kind === 4 /* NewLineTrivia */; } else { @@ -165416,7 +165484,7 @@ } leadingTrivia = void 0; trailingTrivia = void 0; - let pos = scanner2.getStartPos(); + let pos = scanner2.getTokenFullStart(); while (pos < endPos) { const t = scanner2.getToken(); if (!isTrivia(t)) { @@ -165425,13 +165493,13 @@ scanner2.scan(); const item = { pos, - end: scanner2.getStartPos(), + end: scanner2.getTokenFullStart(), kind: t }; - pos = scanner2.getStartPos(); + pos = scanner2.getTokenFullStart(); leadingTrivia = append(leadingTrivia, item); } - savedPos = scanner2.getStartPos(); + savedPos = scanner2.getTokenFullStart(); } function shouldRescanGreaterThanToken(node) { switch (node.kind) { @@ -165447,10 +165515,10 @@ function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 288 /* JsxAttribute */: - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: - case 282 /* JsxSelfClosingElement */: + case 289 /* JsxAttribute */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: + case 283 /* JsxSelfClosingElement */: return isKeyword(node.kind) || node.kind === 79 /* Identifier */; } } @@ -165477,28 +165545,28 @@ if (lastTokenInfo && expectedScanAction === lastScanAction) { return fixTokenKind(lastTokenInfo, n); } - if (scanner2.getStartPos() !== savedPos) { + if (scanner2.getTokenFullStart() !== savedPos) { Debug.assert(lastTokenInfo !== void 0); - scanner2.setTextPos(savedPos); + scanner2.resetTokenState(savedPos); scanner2.scan(); } let currentToken = getNextToken(n, expectedScanAction); const token = createTextRangeWithKind( - scanner2.getStartPos(), - scanner2.getTextPos(), + scanner2.getTokenFullStart(), + scanner2.getTokenEnd(), currentToken ); if (trailingTrivia) { trailingTrivia = void 0; } - while (scanner2.getStartPos() < endPos) { + while (scanner2.getTokenFullStart() < endPos) { currentToken = scanner2.scan(); if (!isTrivia(currentToken)) { break; } const trivia = createTextRangeWithKind( - scanner2.getStartPos(), - scanner2.getTextPos(), + scanner2.getTokenFullStart(), + scanner2.getTokenEnd(), currentToken ); if (!trailingTrivia) { @@ -165563,7 +165631,7 @@ } function readEOFTokenRange() { Debug.assert(isOnEOF()); - return createTextRangeWithKind(scanner2.getStartPos(), scanner2.getTextPos(), 1 /* EndOfFileToken */); + return createTextRangeWithKind(scanner2.getTokenFullStart(), scanner2.getTokenEnd(), 1 /* EndOfFileToken */); } function isOnToken() { const current = lastTokenInfo ? lastTokenInfo.token.kind : scanner2.getToken(); @@ -165580,8 +165648,8 @@ return tokenInfo; } function skipToEndOf(node) { - scanner2.setTextPos(node.end); - savedPos = scanner2.getStartPos(); + scanner2.resetTokenState(node.end); + savedPos = scanner2.getTokenFullStart(); lastScanAction = void 0; lastTokenInfo = void 0; wasNewLine = false; @@ -165589,8 +165657,8 @@ trailingTrivia = void 0; } function skipToStartOf(node) { - scanner2.setTextPos(node.pos); - savedPos = scanner2.getStartPos(); + scanner2.resetTokenState(node.pos); + savedPos = scanner2.getTokenFullStart(); lastScanAction = void 0; lastTokenInfo = void 0; wasNewLine = false; @@ -165624,7 +165692,7 @@ // src/services/formatting/rules.ts function getAllRules() { const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 162 /* LastToken */; token++) { + for (let token = 0 /* FirstToken */; token <= 163 /* LastToken */; token++) { if (token !== 1 /* EndOfFileToken */) { allTokens.push(token); } @@ -165635,15 +165703,15 @@ const anyToken = { tokens: allTokens, isSpecific: false }; const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(81 /* FirstKeyword */, 162 /* LastKeyword */); + const keywords = tokenRangeFromRange(82 /* FirstKeyword */, 163 /* LastKeyword */); const binaryOperators = tokenRangeFromRange(29 /* FirstBinaryOperator */, 78 /* LastBinaryOperator */); const binaryKeywordOperators = [ - 101 /* InKeyword */, - 102 /* InstanceOfKeyword */, - 162 /* OfKeyword */, - 128 /* AsKeyword */, - 140 /* IsKeyword */, - 150 /* SatisfiesKeyword */ + 102 /* InKeyword */, + 103 /* InstanceOfKeyword */, + 163 /* OfKeyword */, + 129 /* AsKeyword */, + 141 /* IsKeyword */, + 151 /* SatisfiesKeyword */ ]; const unaryPrefixOperators = [45 /* PlusPlusToken */, 46 /* MinusMinusToken */, 54 /* TildeToken */, 53 /* ExclamationToken */]; const unaryPrefixExpressions = [ @@ -165653,18 +165721,18 @@ 20 /* OpenParenToken */, 22 /* OpenBracketToken */, 18 /* OpenBraceToken */, - 108 /* ThisKeyword */, - 103 /* NewKeyword */ + 109 /* ThisKeyword */, + 104 /* NewKeyword */ ]; - const unaryPreincrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 108 /* ThisKeyword */, 103 /* NewKeyword */]; - const unaryPostincrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 103 /* NewKeyword */]; - const unaryPredecrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 108 /* ThisKeyword */, 103 /* NewKeyword */]; - const unaryPostdecrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 103 /* NewKeyword */]; + const unaryPreincrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 109 /* ThisKeyword */, 104 /* NewKeyword */]; + const unaryPostincrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 104 /* NewKeyword */]; + const unaryPredecrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 109 /* ThisKeyword */, 104 /* NewKeyword */]; + const unaryPostdecrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 104 /* NewKeyword */]; const comments = [2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]; const typeNames = [79 /* Identifier */, ...typeKeywords]; const functionOpenBraceLeftTokenRange = anyTokenIncludingMultilineComments; - const typeScriptOpenBraceLeftTokenRange = tokenRangeFrom([79 /* Identifier */, 3 /* MultiLineCommentTrivia */, 84 /* ClassKeyword */, 93 /* ExportKeyword */, 100 /* ImportKeyword */]); - const controlOpenBraceLeftTokenRange = tokenRangeFrom([21 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 90 /* DoKeyword */, 111 /* TryKeyword */, 96 /* FinallyKeyword */, 91 /* ElseKeyword */]); + const typeScriptOpenBraceLeftTokenRange = tokenRangeFrom([79 /* Identifier */, 3 /* MultiLineCommentTrivia */, 85 /* ClassKeyword */, 94 /* ExportKeyword */, 101 /* ImportKeyword */]); + const controlOpenBraceLeftTokenRange = tokenRangeFrom([21 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 91 /* DoKeyword */, 112 /* TryKeyword */, 97 /* FinallyKeyword */, 92 /* ElseKeyword */]); const highPriorityCommonRules = [ // Leave comments alone rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */), @@ -165678,7 +165746,7 @@ rule("NoSpaceAfterQuestionMark", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBeforeDot", anyToken, [24 /* DotToken */, 28 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */), rule("NoSpaceAfterDot", [24 /* DotToken */, 28 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBetweenImportParenInImportType", 100 /* ImportKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), + rule("NoSpaceBetweenImportParenInImportType", 101 /* ImportKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), // Special handling of unary operators. // Prefix operators generally shouldn't have a space between // them and their target unary expression. @@ -165705,34 +165773,34 @@ rule("SpaceAfterCloseBrace", 19 /* CloseBraceToken */, anyTokenExcept(21 /* CloseParenToken */), [isNonJsxSameLineTokenContext, isAfterCodeBlockContext], 4 /* InsertSpace */), // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied // Also should not apply to }) - rule("SpaceBetweenCloseBraceAndElse", 19 /* CloseBraceToken */, 91 /* ElseKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBetweenCloseBraceAndWhile", 19 /* CloseBraceToken */, 115 /* WhileKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenCloseBraceAndElse", 19 /* CloseBraceToken */, 92 /* ElseKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenCloseBraceAndWhile", 19 /* CloseBraceToken */, 116 /* WhileKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), rule("NoSpaceBetweenEmptyBraceBrackets", 18 /* OpenBraceToken */, 19 /* CloseBraceToken */, [isNonJsxSameLineTokenContext, isObjectContext], 16 /* DeleteSpace */), // Add a space after control dec context if the next character is an open bracket ex: 'if (false)[a, b] = [1, 2];' -> 'if (false) [a, b] = [1, 2];' rule("SpaceAfterConditionalClosingParen", 21 /* CloseParenToken */, 22 /* OpenBracketToken */, [isControlDeclContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenFunctionKeywordAndStar", 98 /* FunctionKeyword */, 41 /* AsteriskToken */, [isFunctionDeclarationOrFunctionExpressionContext], 16 /* DeleteSpace */), + rule("NoSpaceBetweenFunctionKeywordAndStar", 99 /* FunctionKeyword */, 41 /* AsteriskToken */, [isFunctionDeclarationOrFunctionExpressionContext], 16 /* DeleteSpace */), rule("SpaceAfterStarInGeneratorDeclaration", 41 /* AsteriskToken */, 79 /* Identifier */, [isFunctionDeclarationOrFunctionExpressionContext], 4 /* InsertSpace */), - rule("SpaceAfterFunctionInFuncDecl", 98 /* FunctionKeyword */, anyToken, [isFunctionDeclContext], 4 /* InsertSpace */), + rule("SpaceAfterFunctionInFuncDecl", 99 /* FunctionKeyword */, anyToken, [isFunctionDeclContext], 4 /* InsertSpace */), // Insert new line after { and before } in multi-line contexts. rule("NewLineAfterOpenBraceInBlockContext", 18 /* OpenBraceToken */, anyToken, [isMultilineBlockContext], 8 /* InsertNewLine */), // For get/set members, we check for (identifier,identifier) since get/set don't have tokens and they are represented as just an identifier token. // Though, we do extra check on the context to make sure we are dealing with get/set node. Example: // get x() {} // set x(val) {} - rule("SpaceAfterGetSetInMember", [137 /* GetKeyword */, 151 /* SetKeyword */], 79 /* Identifier */, [isFunctionDeclContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenYieldKeywordAndStar", 125 /* YieldKeyword */, 41 /* AsteriskToken */, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 16 /* DeleteSpace */), - rule("SpaceBetweenYieldOrYieldStarAndOperand", [125 /* YieldKeyword */, 41 /* AsteriskToken */], anyToken, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 4 /* InsertSpace */), - rule("NoSpaceBetweenReturnAndSemicolon", 105 /* ReturnKeyword */, 26 /* SemicolonToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("SpaceAfterCertainKeywords", [113 /* VarKeyword */, 109 /* ThrowKeyword */, 103 /* NewKeyword */, 89 /* DeleteKeyword */, 105 /* ReturnKeyword */, 112 /* TypeOfKeyword */, 133 /* AwaitKeyword */], anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceAfterLetConstInVariableDeclaration", [119 /* LetKeyword */, 85 /* ConstKeyword */], anyToken, [isNonJsxSameLineTokenContext, isStartOfVariableDeclarationList], 4 /* InsertSpace */), + rule("SpaceAfterGetSetInMember", [138 /* GetKeyword */, 152 /* SetKeyword */], 79 /* Identifier */, [isFunctionDeclContext], 4 /* InsertSpace */), + rule("NoSpaceBetweenYieldKeywordAndStar", 126 /* YieldKeyword */, 41 /* AsteriskToken */, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 16 /* DeleteSpace */), + rule("SpaceBetweenYieldOrYieldStarAndOperand", [126 /* YieldKeyword */, 41 /* AsteriskToken */], anyToken, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 4 /* InsertSpace */), + rule("NoSpaceBetweenReturnAndSemicolon", 106 /* ReturnKeyword */, 26 /* SemicolonToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("SpaceAfterCertainKeywords", [114 /* VarKeyword */, 110 /* ThrowKeyword */, 104 /* NewKeyword */, 90 /* DeleteKeyword */, 106 /* ReturnKeyword */, 113 /* TypeOfKeyword */, 134 /* AwaitKeyword */], anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceAfterLetConstInVariableDeclaration", [120 /* LetKeyword */, 86 /* ConstKeyword */], anyToken, [isNonJsxSameLineTokenContext, isStartOfVariableDeclarationList], 4 /* InsertSpace */), rule("NoSpaceBeforeOpenParenInFuncCall", anyToken, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isFunctionCallOrNewContext, isPreviousTokenNotComma], 16 /* DeleteSpace */), // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. rule("SpaceBeforeBinaryKeywordOperator", anyToken, binaryKeywordOperators, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), rule("SpaceAfterBinaryKeywordOperator", binaryKeywordOperators, anyToken, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterVoidOperator", 114 /* VoidKeyword */, anyToken, [isNonJsxSameLineTokenContext, isVoidOpContext], 4 /* InsertSpace */), + rule("SpaceAfterVoidOperator", 115 /* VoidKeyword */, anyToken, [isNonJsxSameLineTokenContext, isVoidOpContext], 4 /* InsertSpace */), // Async-await - rule("SpaceBetweenAsyncAndOpenParen", 132 /* AsyncKeyword */, 20 /* OpenParenToken */, [isArrowFunctionContext, isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBetweenAsyncAndFunctionKeyword", 132 /* AsyncKeyword */, [98 /* FunctionKeyword */, 79 /* Identifier */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenAsyncAndOpenParen", 133 /* AsyncKeyword */, 20 /* OpenParenToken */, [isArrowFunctionContext, isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenAsyncAndFunctionKeyword", 133 /* AsyncKeyword */, [99 /* FunctionKeyword */, 79 /* Identifier */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), // Template string rule("NoSpaceBetweenTagAndTemplateString", [79 /* Identifier */, 21 /* CloseParenToken */], [14 /* NoSubstitutionTemplateLiteral */, 15 /* TemplateHead */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // JSX opening elements @@ -165743,35 +165811,35 @@ rule("NoSpaceAfterEqualInJsxAttribute", 63 /* EqualsToken */, anyToken, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // TypeScript-specific rules // Use of module as a function call. e.g.: import m2 = module("m2"); - rule("NoSpaceAfterModuleImport", [142 /* ModuleKeyword */, 147 /* RequireKeyword */], 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterModuleImport", [143 /* ModuleKeyword */, 148 /* RequireKeyword */], 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // Add a space around certain TypeScript keywords rule( "SpaceAfterCertainTypeScriptKeywords", [ - 126 /* AbstractKeyword */, - 127 /* AccessorKeyword */, - 84 /* ClassKeyword */, - 136 /* DeclareKeyword */, - 88 /* DefaultKeyword */, - 92 /* EnumKeyword */, - 93 /* ExportKeyword */, - 94 /* ExtendsKeyword */, - 137 /* GetKeyword */, - 117 /* ImplementsKeyword */, - 100 /* ImportKeyword */, - 118 /* InterfaceKeyword */, - 142 /* ModuleKeyword */, - 143 /* NamespaceKeyword */, - 121 /* PrivateKeyword */, - 123 /* PublicKeyword */, - 122 /* ProtectedKeyword */, - 146 /* ReadonlyKeyword */, - 151 /* SetKeyword */, - 124 /* StaticKeyword */, - 154 /* TypeKeyword */, - 158 /* FromKeyword */, - 141 /* KeyOfKeyword */, - 138 /* InferKeyword */ + 127 /* AbstractKeyword */, + 128 /* AccessorKeyword */, + 85 /* ClassKeyword */, + 137 /* DeclareKeyword */, + 89 /* DefaultKeyword */, + 93 /* EnumKeyword */, + 94 /* ExportKeyword */, + 95 /* ExtendsKeyword */, + 138 /* GetKeyword */, + 118 /* ImplementsKeyword */, + 101 /* ImportKeyword */, + 119 /* InterfaceKeyword */, + 143 /* ModuleKeyword */, + 144 /* NamespaceKeyword */, + 122 /* PrivateKeyword */, + 124 /* PublicKeyword */, + 123 /* ProtectedKeyword */, + 147 /* ReadonlyKeyword */, + 152 /* SetKeyword */, + 125 /* StaticKeyword */, + 155 /* TypeKeyword */, + 159 /* FromKeyword */, + 142 /* KeyOfKeyword */, + 139 /* InferKeyword */ ], anyToken, [isNonJsxSameLineTokenContext], @@ -165780,7 +165848,7 @@ rule( "SpaceBeforeCertainTypeScriptKeywords", anyToken, - [94 /* ExtendsKeyword */, 117 /* ImplementsKeyword */, 158 /* FromKeyword */], + [95 /* ExtendsKeyword */, 118 /* ImplementsKeyword */, 159 /* FromKeyword */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */ ), @@ -165813,17 +165881,17 @@ "SpaceAfterDecorator", anyToken, [ - 126 /* AbstractKeyword */, + 127 /* AbstractKeyword */, 79 /* Identifier */, - 93 /* ExportKeyword */, - 88 /* DefaultKeyword */, - 84 /* ClassKeyword */, - 124 /* StaticKeyword */, - 123 /* PublicKeyword */, - 121 /* PrivateKeyword */, - 122 /* ProtectedKeyword */, - 137 /* GetKeyword */, - 151 /* SetKeyword */, + 94 /* ExportKeyword */, + 89 /* DefaultKeyword */, + 85 /* ClassKeyword */, + 125 /* StaticKeyword */, + 124 /* PublicKeyword */, + 122 /* PrivateKeyword */, + 123 /* ProtectedKeyword */, + 138 /* GetKeyword */, + 152 /* SetKeyword */, 22 /* OpenBracketToken */, 41 /* AsteriskToken */ ], @@ -165831,18 +165899,18 @@ 4 /* InsertSpace */ ), rule("NoSpaceBeforeNonNullAssertionOperator", anyToken, 53 /* ExclamationToken */, [isNonJsxSameLineTokenContext, isNonNullAssertionContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterNewKeywordOnConstructorSignature", 103 /* NewKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isConstructorSignatureContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterNewKeywordOnConstructorSignature", 104 /* NewKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isConstructorSignatureContext], 16 /* DeleteSpace */), rule("SpaceLessThanAndNonJSXTypeAnnotation", 29 /* LessThanToken */, 29 /* LessThanToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) ]; const userConfigurableRules = [ // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - rule("SpaceAfterConstructor", 135 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("NoSpaceAfterConstructor", 135 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("SpaceAfterConstructor", 136 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("NoSpaceAfterConstructor", 136 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen], 4 /* InsertSpace */), rule("NoSpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext], 16 /* DeleteSpace */), // Insert space after function keyword for anonymous functions - rule("SpaceAfterAnonymousFunctionKeyword", [98 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), - rule("NoSpaceAfterAnonymousFunctionKeyword", [98 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 16 /* DeleteSpace */), + rule("SpaceAfterAnonymousFunctionKeyword", [99 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), + rule("NoSpaceAfterAnonymousFunctionKeyword", [99 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 16 /* DeleteSpace */), // Insert space after keywords in control flow statements rule("SpaceAfterKeywordInControl", keywords, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterKeywordsInControlFlowStatements"), isControlDeclContext], 4 /* InsertSpace */), rule("NoSpaceAfterKeywordInControl", keywords, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterKeywordsInControlFlowStatements"), isControlDeclContext], 16 /* DeleteSpace */), @@ -165910,22 +165978,22 @@ rule("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock", typeScriptOpenBraceLeftTokenRange, 18 /* OpenBraceToken */, [isOptionDisabledOrUndefinedOrTokensOnSameLine("placeOpenBraceOnNewLineForFunctions"), isTypeScriptDeclWithBlockContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */), rule("NoSpaceBeforeComma", anyToken, 27 /* CommaToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // No space before and after indexer `x[]` - rule("NoSpaceBeforeOpenBracket", anyTokenExcept(132 /* AsyncKeyword */, 82 /* CaseKeyword */), 22 /* OpenBracketToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceBeforeOpenBracket", anyTokenExcept(133 /* AsyncKeyword */, 83 /* CaseKeyword */), 22 /* OpenBracketToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceAfterCloseBracket", 23 /* CloseBracketToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBeforeBlockInFunctionDeclarationContext], 16 /* DeleteSpace */), rule("SpaceAfterSemicolon", 26 /* SemicolonToken */, anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), // Remove extra space between for and await - rule("SpaceBetweenForAndAwaitKeyword", 97 /* ForKeyword */, 133 /* AwaitKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenForAndAwaitKeyword", 98 /* ForKeyword */, 134 /* AwaitKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] rule( "SpaceBetweenStatements", - [21 /* CloseParenToken */, 90 /* DoKeyword */, 91 /* ElseKeyword */, 82 /* CaseKeyword */], + [21 /* CloseParenToken */, 91 /* DoKeyword */, 92 /* ElseKeyword */, 83 /* CaseKeyword */], anyToken, [isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNotForContext], 4 /* InsertSpace */ ), // This low-pri rule takes care of "try {", "catch {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - rule("SpaceAfterTryCatchFinally", [111 /* TryKeyword */, 83 /* CatchKeyword */, 96 /* FinallyKeyword */], 18 /* OpenBraceToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) + rule("SpaceAfterTryCatchFinally", [112 /* TryKeyword */, 84 /* CatchKeyword */, 97 /* FinallyKeyword */], 18 /* OpenBraceToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) ]; return [ ...highPriorityCommonRules, @@ -165970,40 +166038,40 @@ return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; } function isForContext(context) { - return context.contextNode.kind === 245 /* ForStatement */; + return context.contextNode.kind === 246 /* ForStatement */; } function isNotForContext(context) { return !isForContext(context); } function isBinaryOpContext(context) { switch (context.contextNode.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return context.contextNode.operatorToken.kind !== 27 /* CommaToken */; - case 224 /* ConditionalExpression */: - case 191 /* ConditionalType */: - case 231 /* AsExpression */: - case 278 /* ExportSpecifier */: - case 273 /* ImportSpecifier */: - case 179 /* TypePredicate */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 235 /* SatisfiesExpression */: + case 225 /* ConditionalExpression */: + case 192 /* ConditionalType */: + case 232 /* AsExpression */: + case 279 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 180 /* TypePredicate */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 236 /* SatisfiesExpression */: return true; - case 205 /* BindingElement */: - case 262 /* TypeAliasDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 274 /* ExportAssignment */: - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 302 /* EnumMember */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 206 /* BindingElement */: + case 263 /* TypeAliasDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 275 /* ExportAssignment */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 303 /* EnumMember */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 246 /* ForInStatement */: - case 165 /* TypeParameter */: - return context.currentTokenSpan.kind === 101 /* InKeyword */ || context.nextTokenSpan.kind === 101 /* InKeyword */ || context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 247 /* ForOfStatement */: - return context.currentTokenSpan.kind === 162 /* OfKeyword */ || context.nextTokenSpan.kind === 162 /* OfKeyword */; + case 247 /* ForInStatement */: + case 166 /* TypeParameter */: + return context.currentTokenSpan.kind === 102 /* InKeyword */ || context.nextTokenSpan.kind === 102 /* InKeyword */ || context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; + case 248 /* ForOfStatement */: + return context.currentTokenSpan.kind === 163 /* OfKeyword */ || context.nextTokenSpan.kind === 163 /* OfKeyword */; } return false; } @@ -166015,16 +166083,16 @@ } function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; - return contextKind === 169 /* PropertyDeclaration */ || contextKind === 168 /* PropertySignature */ || contextKind === 166 /* Parameter */ || contextKind === 257 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); + return contextKind === 170 /* PropertyDeclaration */ || contextKind === 169 /* PropertySignature */ || contextKind === 167 /* Parameter */ || contextKind === 258 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } function isConditionalOperatorContext(context) { - return context.contextNode.kind === 224 /* ConditionalExpression */ || context.contextNode.kind === 191 /* ConditionalType */; + return context.contextNode.kind === 225 /* ConditionalExpression */ || context.contextNode.kind === 192 /* ConditionalType */; } function isSameLineTokenOrBeforeBlockContext(context) { return context.TokensAreOnSameLine() || isBeforeBlockContext(context); } function isBraceWrappedContext(context) { - return context.contextNode.kind === 203 /* ObjectBindingPattern */ || context.contextNode.kind === 197 /* MappedType */ || isSingleLineBlockContext(context); + return context.contextNode.kind === 204 /* ObjectBindingPattern */ || context.contextNode.kind === 198 /* MappedType */ || isSingleLineBlockContext(context); } function isBeforeMultilineBlockContext(context) { return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -166046,26 +166114,26 @@ return true; } switch (node.kind) { - case 238 /* Block */: - case 266 /* CaseBlock */: - case 207 /* ObjectLiteralExpression */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 208 /* ObjectLiteralExpression */: + case 266 /* ModuleBlock */: return true; } return false; } function isFunctionDeclContext(context) { switch (context.contextNode.kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 176 /* CallSignature */: - case 215 /* FunctionExpression */: - case 173 /* Constructor */: - case 216 /* ArrowFunction */: - case 261 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 177 /* CallSignature */: + case 216 /* FunctionExpression */: + case 174 /* Constructor */: + case 217 /* ArrowFunction */: + case 262 /* InterfaceDeclaration */: return true; } return false; @@ -166074,39 +166142,39 @@ return !isFunctionDeclContext(context); } function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 259 /* FunctionDeclaration */ || context.contextNode.kind === 215 /* FunctionExpression */; + return context.contextNode.kind === 260 /* FunctionDeclaration */ || context.contextNode.kind === 216 /* FunctionExpression */; } function isTypeScriptDeclWithBlockContext(context) { return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); } function nodeIsTypeScriptDeclWithBlockContext(node) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 184 /* TypeLiteral */: - case 264 /* ModuleDeclaration */: - case 275 /* ExportDeclaration */: - case 276 /* NamedExports */: - case 269 /* ImportDeclaration */: - case 272 /* NamedImports */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 185 /* TypeLiteral */: + case 265 /* ModuleDeclaration */: + case 276 /* ExportDeclaration */: + case 277 /* NamedExports */: + case 270 /* ImportDeclaration */: + case 273 /* NamedImports */: return true; } return false; } function isAfterCodeBlockContext(context) { switch (context.currentTokenParent.kind) { - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 295 /* CatchClause */: - case 265 /* ModuleBlock */: - case 252 /* SwitchStatement */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 296 /* CatchClause */: + case 266 /* ModuleBlock */: + case 253 /* SwitchStatement */: return true; - case 238 /* Block */: { + case 239 /* Block */: { const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 216 /* ArrowFunction */ && blockParent.kind !== 215 /* FunctionExpression */) { + if (!blockParent || blockParent.kind !== 217 /* ArrowFunction */ && blockParent.kind !== 216 /* FunctionExpression */) { return true; } } @@ -166115,29 +166183,29 @@ } function isControlDeclContext(context) { switch (context.contextNode.kind) { - case 242 /* IfStatement */: - case 252 /* SwitchStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 244 /* WhileStatement */: - case 255 /* TryStatement */: - case 243 /* DoStatement */: - case 251 /* WithStatement */: - case 295 /* CatchClause */: + case 243 /* IfStatement */: + case 253 /* SwitchStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 245 /* WhileStatement */: + case 256 /* TryStatement */: + case 244 /* DoStatement */: + case 252 /* WithStatement */: + case 296 /* CatchClause */: return true; default: return false; } } function isObjectContext(context) { - return context.contextNode.kind === 207 /* ObjectLiteralExpression */; + return context.contextNode.kind === 208 /* ObjectLiteralExpression */; } function isFunctionCallContext(context) { - return context.contextNode.kind === 210 /* CallExpression */; + return context.contextNode.kind === 211 /* CallExpression */; } function isNewContext(context) { - return context.contextNode.kind === 211 /* NewExpression */; + return context.contextNode.kind === 212 /* NewExpression */; } function isFunctionCallOrNewContext(context) { return isFunctionCallContext(context) || isNewContext(context); @@ -166152,10 +166220,10 @@ return context.nextTokenSpan.kind !== 21 /* CloseParenToken */; } function isArrowFunctionContext(context) { - return context.contextNode.kind === 216 /* ArrowFunction */; + return context.contextNode.kind === 217 /* ArrowFunction */; } function isImportTypeContext(context) { - return context.contextNode.kind === 202 /* ImportType */; + return context.contextNode.kind === 203 /* ImportType */; } function isNonJsxSameLineTokenContext(context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 11 /* JsxText */; @@ -166164,19 +166232,19 @@ return context.contextNode.kind !== 11 /* JsxText */; } function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 281 /* JsxElement */ && context.contextNode.kind !== 285 /* JsxFragment */; + return context.contextNode.kind !== 282 /* JsxElement */ && context.contextNode.kind !== 286 /* JsxFragment */; } function isJsxExpressionContext(context) { - return context.contextNode.kind === 291 /* JsxExpression */ || context.contextNode.kind === 290 /* JsxSpreadAttribute */; + return context.contextNode.kind === 292 /* JsxExpression */ || context.contextNode.kind === 291 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 288 /* JsxAttribute */; + return context.nextTokenParent.kind === 289 /* JsxAttribute */; } function isJsxAttributeContext(context) { - return context.contextNode.kind === 288 /* JsxAttribute */; + return context.contextNode.kind === 289 /* JsxAttribute */; } function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 282 /* JsxSelfClosingElement */; + return context.contextNode.kind === 283 /* JsxSelfClosingElement */; } function isNotBeforeBlockInFunctionDeclarationContext(context) { return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); @@ -166188,44 +166256,44 @@ while (node && isExpression(node)) { node = node.parent; } - return node && node.kind === 167 /* Decorator */; + return node && node.kind === 168 /* Decorator */; } function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 258 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; + return context.currentTokenParent.kind === 259 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; } function isNotFormatOnEnter(context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; } function isModuleDeclContext(context) { - return context.contextNode.kind === 264 /* ModuleDeclaration */; + return context.contextNode.kind === 265 /* ModuleDeclaration */; } function isObjectTypeContext(context) { - return context.contextNode.kind === 184 /* TypeLiteral */; + return context.contextNode.kind === 185 /* TypeLiteral */; } function isConstructorSignatureContext(context) { - return context.contextNode.kind === 177 /* ConstructSignature */; + return context.contextNode.kind === 178 /* ConstructSignature */; } function isTypeArgumentOrParameterOrAssertion(token, parent2) { if (token.kind !== 29 /* LessThanToken */ && token.kind !== 31 /* GreaterThanToken */) { return false; } switch (parent2.kind) { - case 180 /* TypeReference */: - case 213 /* TypeAssertionExpression */: - case 262 /* TypeAliasDeclaration */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 230 /* ExpressionWithTypeArguments */: + case 181 /* TypeReference */: + case 214 /* TypeAssertionExpression */: + case 263 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 231 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -166235,31 +166303,31 @@ return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); } function isTypeAssertionContext(context) { - return context.contextNode.kind === 213 /* TypeAssertionExpression */; + return context.contextNode.kind === 214 /* TypeAssertionExpression */; } function isNonTypeAssertionContext(context) { return !isTypeAssertionContext(context); } function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 114 /* VoidKeyword */ && context.currentTokenParent.kind === 219 /* VoidExpression */; + return context.currentTokenSpan.kind === 115 /* VoidKeyword */ && context.currentTokenParent.kind === 220 /* VoidExpression */; } function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 226 /* YieldExpression */ && context.contextNode.expression !== void 0; + return context.contextNode.kind === 227 /* YieldExpression */ && context.contextNode.expression !== void 0; } function isNonNullAssertionContext(context) { - return context.contextNode.kind === 232 /* NonNullExpression */; + return context.contextNode.kind === 233 /* NonNullExpression */; } function isNotStatementConditionContext(context) { return !isStatementConditionContext(context); } function isStatementConditionContext(context) { switch (context.contextNode.kind) { - case 242 /* IfStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 243 /* IfStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return true; default: return false; @@ -166285,16 +166353,16 @@ if (startLine === endLine) { return nextTokenKind === 19 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; } - if (nextTokenKind === 237 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { + if (nextTokenKind === 238 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { return false; } - if (context.contextNode.kind === 261 /* InterfaceDeclaration */ || context.contextNode.kind === 262 /* TypeAliasDeclaration */) { + if (context.contextNode.kind === 262 /* InterfaceDeclaration */ || context.contextNode.kind === 263 /* TypeAliasDeclaration */) { return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 20 /* OpenParenToken */; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; } - return context.currentTokenParent.kind !== 245 /* ForStatement */ && context.currentTokenParent.kind !== 239 /* EmptyStatement */ && context.currentTokenParent.kind !== 237 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 225 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; + return context.currentTokenParent.kind !== 246 /* ForStatement */ && context.currentTokenParent.kind !== 240 /* EmptyStatement */ && context.currentTokenParent.kind !== 238 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 226 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; } function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); @@ -166369,12 +166437,12 @@ return map2; } function getRuleBucketIndex(row, column) { - Debug.assert(row <= 162 /* LastKeyword */ && column <= 162 /* LastKeyword */, "Must compute formatting context from tokens"); + Debug.assert(row <= 163 /* LastKeyword */ && column <= 163 /* LastKeyword */, "Must compute formatting context from tokens"); return row * mapRowLength + column; } var maskBitSize = 5; var mask = 31; -var mapRowLength = 162 /* LastToken */ + 1; +var mapRowLength = 163 /* LastToken */ + 1; var RulesPosition = ((RulesPosition2) => { RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; @@ -166483,17 +166551,17 @@ } function isListElement(parent2, node) { switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: return rangeContainsRange(parent2.members, node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const body = parent2.body; - return !!body && body.kind === 265 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 308 /* SourceFile */: - case 238 /* Block */: - case 265 /* ModuleBlock */: + return !!body && body.kind === 266 /* ModuleBlock */ && rangeContainsRange(body.statements, node); + case 309 /* SourceFile */: + case 239 /* Block */: + case 266 /* ModuleBlock */: return rangeContainsRange(parent2.statements, node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return rangeContainsRange(parent2.block.statements, node); } return false; @@ -166665,7 +166733,7 @@ } } } - if (previousRange && formattingScanner.getStartPos() >= originalRange.end) { + if (previousRange && formattingScanner.getTokenFullStart() >= originalRange.end) { const tokenInfo = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() : formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token : void 0; if (tokenInfo && tokenInfo.pos === previousRangeTriviaEnd) { const parent2 = ((_a2 = findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)) == null ? void 0 : _a2.parent) || previousParent; @@ -166725,24 +166793,24 @@ return modifier.kind; } switch (node.kind) { - case 260 /* ClassDeclaration */: - return 84 /* ClassKeyword */; - case 261 /* InterfaceDeclaration */: - return 118 /* InterfaceKeyword */; - case 259 /* FunctionDeclaration */: - return 98 /* FunctionKeyword */; - case 263 /* EnumDeclaration */: - return 263 /* EnumDeclaration */; - case 174 /* GetAccessor */: - return 137 /* GetKeyword */; - case 175 /* SetAccessor */: - return 151 /* SetKeyword */; - case 171 /* MethodDeclaration */: + case 261 /* ClassDeclaration */: + return 85 /* ClassKeyword */; + case 262 /* InterfaceDeclaration */: + return 119 /* InterfaceKeyword */; + case 260 /* FunctionDeclaration */: + return 99 /* FunctionKeyword */; + case 264 /* EnumDeclaration */: + return 264 /* EnumDeclaration */; + case 175 /* GetAccessor */: + return 138 /* GetKeyword */; + case 176 /* SetAccessor */: + return 152 /* SetKeyword */; + case 172 /* MethodDeclaration */: if (node.asteriskToken) { return 41 /* AsteriskToken */; } - case 169 /* PropertyDeclaration */: - case 166 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 167 /* Parameter */: const name = getNameOfDeclaration(node); if (name) { return name.kind; @@ -166785,22 +166853,22 @@ case 18 /* OpenBraceToken */: case 19 /* CloseBraceToken */: case 21 /* CloseParenToken */: - case 91 /* ElseKeyword */: - case 115 /* WhileKeyword */: + case 92 /* ElseKeyword */: + case 116 /* WhileKeyword */: case 59 /* AtToken */: return false; case 43 /* SlashToken */: case 31 /* GreaterThanToken */: switch (container.kind) { - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: + case 283 /* JsxSelfClosingElement */: return false; } break; case 22 /* OpenBracketToken */: case 23 /* CloseBracketToken */: - if (container.kind !== 197 /* MappedType */) { + if (container.kind !== 198 /* MappedType */) { return false; } break; @@ -166843,7 +166911,7 @@ processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); } ); - while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { const tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > Math.min(node.end, originalRange.end)) { break; @@ -166877,7 +166945,7 @@ if (child.getFullWidth() === 0) { return inheritedIndentation; } - while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { const tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > originalRange.end) { return inheritedIndentation; @@ -166890,7 +166958,7 @@ } consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node); } - if (!formattingScanner.isOnToken() || formattingScanner.getStartPos() >= originalRange.end) { + if (!formattingScanner.isOnToken() || formattingScanner.getTokenFullStart() >= originalRange.end) { return inheritedIndentation; } if (isToken(child)) { @@ -166901,11 +166969,11 @@ return inheritedIndentation; } } - const effectiveParentStartLine = child.kind === 167 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + const effectiveParentStartLine = child.kind === 168 /* Decorator */ ? childStartLine : undecoratedParentStartLine; const childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent2.kind === 206 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent2.kind === 207 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -166923,7 +166991,7 @@ return; } if (listStartToken !== 0 /* Unknown */) { - while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { const tokenInfo = formattingScanner.readTokenInfo(parent2); if (tokenInfo.token.end > nodes.pos) { break; @@ -166960,7 +167028,7 @@ ); } const listEndToken = getCloseTokenForOpenToken(listStartToken); - if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { let tokenInfo = formattingScanner.readTokenInfo(parent2); if (tokenInfo.token.kind === 27 /* CommaToken */) { consumeTokenAndAdvanceScanner(tokenInfo, parent2, listDynamicIndentation, parent2); @@ -167326,50 +167394,50 @@ } function getOpenTokenForList(node, list) { switch (node.kind) { - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 216 /* ArrowFunction */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 217 /* ArrowFunction */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } else if (node.parameters === list) { return 20 /* OpenParenToken */; } break; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } else if (node.arguments === list) { return 20 /* OpenParenToken */; } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } break; - case 180 /* TypeReference */: - case 212 /* TaggedTemplateExpression */: - case 183 /* TypeQuery */: - case 230 /* ExpressionWithTypeArguments */: - case 202 /* ImportType */: + case 181 /* TypeReference */: + case 213 /* TaggedTemplateExpression */: + case 184 /* TypeQuery */: + case 231 /* ExpressionWithTypeArguments */: + case 203 /* ImportType */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } break; - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return 18 /* OpenBraceToken */; } return 0 /* Unknown */; @@ -167459,11 +167527,11 @@ } const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 207 /* ObjectLiteralExpression */; + const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 208 /* ObjectLiteralExpression */; if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { return getBlockIndent(sourceFile, position, options); } - if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 223 /* BinaryExpression */) { + if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 224 /* BinaryExpression */) { const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { return actualIndentation; @@ -167471,7 +167539,7 @@ } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [215 /* FunctionExpression */, 216 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [216 /* FunctionExpression */, 217 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -167613,7 +167681,7 @@ } } function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 308 /* SourceFile */ || !parentAndChildShareLine); + const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 309 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -167651,8 +167719,8 @@ } SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 242 /* IfStatement */ && parent2.elseStatement === child) { - const elseKeyword = findChildOfKind(parent2, 91 /* ElseKeyword */, sourceFile); + if (parent2.kind === 243 /* IfStatement */ && parent2.elseStatement === child) { + const elseKeyword = findChildOfKind(parent2, 92 /* ElseKeyword */, sourceFile); Debug.assert(elseKeyword !== void 0); const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; @@ -167702,42 +167770,42 @@ } function getListByRange(start2, end, node, sourceFile) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return getList(node.typeArguments); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return getList(node.properties); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getList(node.elements); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return getList(node.members); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: return getList(node.typeParameters) || getList(node.parameters); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return getList(node.parameters); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 348 /* JSDocTemplateTag */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 349 /* JSDocTemplateTag */: return getList(node.typeParameters); - case 211 /* NewExpression */: - case 210 /* CallExpression */: + case 212 /* NewExpression */: + case 211 /* CallExpression */: return getList(node.typeArguments) || getList(node.arguments); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return getList(node.declarations); - case 272 /* NamedImports */: - case 276 /* NamedExports */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: return getList(node.elements); - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return getList(node.elements); } function getList(list) { @@ -167760,7 +167828,7 @@ return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); } function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 258 /* VariableDeclarationList */) { + if (node.parent && node.parent.kind === 259 /* VariableDeclarationList */) { return -1 /* Unknown */; } const containingList = getContainingList(node, sourceFile); @@ -167821,95 +167889,95 @@ function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { const childKind = child ? child.kind : 0 /* Unknown */; switch (parent2.kind) { - case 241 /* ExpressionStatement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 206 /* ArrayLiteralExpression */: - case 238 /* Block */: - case 265 /* ModuleBlock */: - case 207 /* ObjectLiteralExpression */: - case 184 /* TypeLiteral */: - case 197 /* MappedType */: - case 186 /* TupleType */: - case 266 /* CaseBlock */: - case 293 /* DefaultClause */: - case 292 /* CaseClause */: - case 214 /* ParenthesizedExpression */: - case 208 /* PropertyAccessExpression */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 240 /* VariableStatement */: - case 274 /* ExportAssignment */: - case 250 /* ReturnStatement */: - case 224 /* ConditionalExpression */: - case 204 /* ArrayBindingPattern */: - case 203 /* ObjectBindingPattern */: - case 283 /* JsxOpeningElement */: - case 286 /* JsxOpeningFragment */: - case 282 /* JsxSelfClosingElement */: - case 291 /* JsxExpression */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 166 /* Parameter */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 193 /* ParenthesizedType */: - case 212 /* TaggedTemplateExpression */: - case 220 /* AwaitExpression */: - case 276 /* NamedExports */: - case 272 /* NamedImports */: - case 278 /* ExportSpecifier */: - case 273 /* ImportSpecifier */: - case 169 /* PropertyDeclaration */: + case 242 /* ExpressionStatement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 207 /* ArrayLiteralExpression */: + case 239 /* Block */: + case 266 /* ModuleBlock */: + case 208 /* ObjectLiteralExpression */: + case 185 /* TypeLiteral */: + case 198 /* MappedType */: + case 187 /* TupleType */: + case 267 /* CaseBlock */: + case 294 /* DefaultClause */: + case 293 /* CaseClause */: + case 215 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 241 /* VariableStatement */: + case 275 /* ExportAssignment */: + case 251 /* ReturnStatement */: + case 225 /* ConditionalExpression */: + case 205 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 284 /* JsxOpeningElement */: + case 287 /* JsxOpeningFragment */: + case 283 /* JsxSelfClosingElement */: + case 292 /* JsxExpression */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 167 /* Parameter */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 194 /* ParenthesizedType */: + case 213 /* TaggedTemplateExpression */: + case 221 /* AwaitExpression */: + case 277 /* NamedExports */: + case 273 /* NamedImports */: + case 279 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 170 /* PropertyDeclaration */: return true; - case 257 /* VariableDeclaration */: - case 299 /* PropertyAssignment */: - case 223 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 207 /* ObjectLiteralExpression */) { + case 258 /* VariableDeclaration */: + case 300 /* PropertyAssignment */: + case 224 /* BinaryExpression */: + if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 208 /* ObjectLiteralExpression */) { return rangeIsOnOneLine(sourceFile, child); } - if (parent2.kind === 223 /* BinaryExpression */ && sourceFile && child && childKind === 281 /* JsxElement */) { + if (parent2.kind === 224 /* BinaryExpression */ && sourceFile && child && childKind === 282 /* JsxElement */) { const parentStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, parent2.pos)).line; const childStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, child.pos)).line; return parentStartLine !== childStartLine; } - if (parent2.kind !== 223 /* BinaryExpression */) { + if (parent2.kind !== 224 /* BinaryExpression */) { return true; } break; - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 242 /* IfStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - return childKind !== 238 /* Block */; - case 216 /* ArrowFunction */: - if (sourceFile && childKind === 214 /* ParenthesizedExpression */) { + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 243 /* IfStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + return childKind !== 239 /* Block */; + case 217 /* ArrowFunction */: + if (sourceFile && childKind === 215 /* ParenthesizedExpression */) { return rangeIsOnOneLine(sourceFile, child); } - return childKind !== 238 /* Block */; - case 275 /* ExportDeclaration */: - return childKind !== 276 /* NamedExports */; - case 269 /* ImportDeclaration */: - return childKind !== 270 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 272 /* NamedImports */; - case 281 /* JsxElement */: - return childKind !== 284 /* JsxClosingElement */; - case 285 /* JsxFragment */: - return childKind !== 287 /* JsxClosingFragment */; - case 190 /* IntersectionType */: - case 189 /* UnionType */: - if (childKind === 184 /* TypeLiteral */ || childKind === 186 /* TupleType */) { + return childKind !== 239 /* Block */; + case 276 /* ExportDeclaration */: + return childKind !== 277 /* NamedExports */; + case 270 /* ImportDeclaration */: + return childKind !== 271 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 273 /* NamedImports */; + case 282 /* JsxElement */: + return childKind !== 285 /* JsxClosingElement */; + case 286 /* JsxFragment */: + return childKind !== 288 /* JsxClosingFragment */; + case 191 /* IntersectionType */: + case 190 /* UnionType */: + if (childKind === 185 /* TypeLiteral */ || childKind === 187 /* TupleType */) { return false; } break; @@ -167919,11 +167987,11 @@ SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; function isControlFlowEndingStatement(kind, parent2) { switch (kind) { - case 250 /* ReturnStatement */: - case 254 /* ThrowStatement */: - case 248 /* ContinueStatement */: - case 249 /* BreakStatement */: - return parent2.kind !== 238 /* Block */; + case 251 /* ReturnStatement */: + case 255 /* ThrowStatement */: + case 249 /* ContinueStatement */: + case 250 /* BreakStatement */: + return parent2.kind !== 239 /* Block */; default: return false; } @@ -167976,7 +168044,6 @@ ContextFlags: () => ContextFlags, CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, - DeprecationVersion: () => DeprecationVersion, DiagnosticCategory: () => DiagnosticCategory, Diagnostics: () => Diagnostics, DocumentHighlights: () => DocumentHighlights, @@ -178839,7 +178906,7 @@ } const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); const symbol = program.getTypeChecker().getSymbolAtLocation(initialNode); - const importSpecifier = symbol && getDeclarationOfKind(symbol, 273 /* ImportSpecifier */); + const importSpecifier = symbol && getDeclarationOfKind(symbol, 274 /* ImportSpecifier */); if (!importSpecifier) return void 0; const nameToSearch = ((_a3 = importSpecifier.propertyName) == null ? void 0 : _a3.text) || importSpecifier.name.text; @@ -181937,7 +182004,6 @@ ContextFlags, CoreServicesShimHostAdapter, Debug, - DeprecationVersion, DiagnosticCategory, Diagnostics, DocumentHighlights, diff --recursive --unified --new-file --exclude test --exclude Makefile 5.1.0-dev.20230307/lib/tsserverlibrary.d.ts 5.1.0-dev.20230308/lib/tsserverlibrary.d.ts --- 5.1.0-dev.20230307/lib/tsserverlibrary.d.ts 1985-10-26 09:15:00 +++ 5.1.0-dev.20230308/lib/tsserverlibrary.d.ts 1985-10-26 09:15:00 @@ -4069,305 +4069,305 @@ CaretEqualsToken = 78, Identifier = 79, PrivateIdentifier = 80, - BreakKeyword = 81, - CaseKeyword = 82, - CatchKeyword = 83, - ClassKeyword = 84, - ConstKeyword = 85, - ContinueKeyword = 86, - DebuggerKeyword = 87, - DefaultKeyword = 88, - DeleteKeyword = 89, - DoKeyword = 90, - ElseKeyword = 91, - EnumKeyword = 92, - ExportKeyword = 93, - ExtendsKeyword = 94, - FalseKeyword = 95, - FinallyKeyword = 96, - ForKeyword = 97, - FunctionKeyword = 98, - IfKeyword = 99, - ImportKeyword = 100, - InKeyword = 101, - InstanceOfKeyword = 102, - NewKeyword = 103, - NullKeyword = 104, - ReturnKeyword = 105, - SuperKeyword = 106, - SwitchKeyword = 107, - ThisKeyword = 108, - ThrowKeyword = 109, - TrueKeyword = 110, - TryKeyword = 111, - TypeOfKeyword = 112, - VarKeyword = 113, - VoidKeyword = 114, - WhileKeyword = 115, - WithKeyword = 116, - ImplementsKeyword = 117, - InterfaceKeyword = 118, - LetKeyword = 119, - PackageKeyword = 120, - PrivateKeyword = 121, - ProtectedKeyword = 122, - PublicKeyword = 123, - StaticKeyword = 124, - YieldKeyword = 125, - AbstractKeyword = 126, - AccessorKeyword = 127, - AsKeyword = 128, - AssertsKeyword = 129, - AssertKeyword = 130, - AnyKeyword = 131, - AsyncKeyword = 132, - AwaitKeyword = 133, - BooleanKeyword = 134, - ConstructorKeyword = 135, - DeclareKeyword = 136, - GetKeyword = 137, - InferKeyword = 138, - IntrinsicKeyword = 139, - IsKeyword = 140, - KeyOfKeyword = 141, - ModuleKeyword = 142, - NamespaceKeyword = 143, - NeverKeyword = 144, - OutKeyword = 145, - ReadonlyKeyword = 146, - RequireKeyword = 147, - NumberKeyword = 148, - ObjectKeyword = 149, - SatisfiesKeyword = 150, - SetKeyword = 151, - StringKeyword = 152, - SymbolKeyword = 153, - TypeKeyword = 154, - UndefinedKeyword = 155, - UniqueKeyword = 156, - UnknownKeyword = 157, - FromKeyword = 158, - GlobalKeyword = 159, - BigIntKeyword = 160, - OverrideKeyword = 161, - OfKeyword = 162, - QualifiedName = 163, - ComputedPropertyName = 164, - TypeParameter = 165, - Parameter = 166, - Decorator = 167, - PropertySignature = 168, - PropertyDeclaration = 169, - MethodSignature = 170, - MethodDeclaration = 171, - ClassStaticBlockDeclaration = 172, - Constructor = 173, - GetAccessor = 174, - SetAccessor = 175, - CallSignature = 176, - ConstructSignature = 177, - IndexSignature = 178, - TypePredicate = 179, - TypeReference = 180, - FunctionType = 181, - ConstructorType = 182, - TypeQuery = 183, - TypeLiteral = 184, - ArrayType = 185, - TupleType = 186, - OptionalType = 187, - RestType = 188, - UnionType = 189, - IntersectionType = 190, - ConditionalType = 191, - InferType = 192, - ParenthesizedType = 193, - ThisType = 194, - TypeOperator = 195, - IndexedAccessType = 196, - MappedType = 197, - LiteralType = 198, - NamedTupleMember = 199, - TemplateLiteralType = 200, - TemplateLiteralTypeSpan = 201, - ImportType = 202, - ObjectBindingPattern = 203, - ArrayBindingPattern = 204, - BindingElement = 205, - ArrayLiteralExpression = 206, - ObjectLiteralExpression = 207, - PropertyAccessExpression = 208, - ElementAccessExpression = 209, - CallExpression = 210, - NewExpression = 211, - TaggedTemplateExpression = 212, - TypeAssertionExpression = 213, - ParenthesizedExpression = 214, - FunctionExpression = 215, - ArrowFunction = 216, - DeleteExpression = 217, - TypeOfExpression = 218, - VoidExpression = 219, - AwaitExpression = 220, - PrefixUnaryExpression = 221, - PostfixUnaryExpression = 222, - BinaryExpression = 223, - ConditionalExpression = 224, - TemplateExpression = 225, - YieldExpression = 226, - SpreadElement = 227, - ClassExpression = 228, - OmittedExpression = 229, - ExpressionWithTypeArguments = 230, - AsExpression = 231, - NonNullExpression = 232, - MetaProperty = 233, - SyntheticExpression = 234, - SatisfiesExpression = 235, - TemplateSpan = 236, - SemicolonClassElement = 237, - Block = 238, - EmptyStatement = 239, - VariableStatement = 240, - ExpressionStatement = 241, - IfStatement = 242, - DoStatement = 243, - WhileStatement = 244, - ForStatement = 245, - ForInStatement = 246, - ForOfStatement = 247, - ContinueStatement = 248, - BreakStatement = 249, - ReturnStatement = 250, - WithStatement = 251, - SwitchStatement = 252, - LabeledStatement = 253, - ThrowStatement = 254, - TryStatement = 255, - DebuggerStatement = 256, - VariableDeclaration = 257, - VariableDeclarationList = 258, - FunctionDeclaration = 259, - ClassDeclaration = 260, - InterfaceDeclaration = 261, - TypeAliasDeclaration = 262, - EnumDeclaration = 263, - ModuleDeclaration = 264, - ModuleBlock = 265, - CaseBlock = 266, - NamespaceExportDeclaration = 267, - ImportEqualsDeclaration = 268, - ImportDeclaration = 269, - ImportClause = 270, - NamespaceImport = 271, - NamedImports = 272, - ImportSpecifier = 273, - ExportAssignment = 274, - ExportDeclaration = 275, - NamedExports = 276, - NamespaceExport = 277, - ExportSpecifier = 278, - MissingDeclaration = 279, - ExternalModuleReference = 280, - JsxElement = 281, - JsxSelfClosingElement = 282, - JsxOpeningElement = 283, - JsxClosingElement = 284, - JsxFragment = 285, - JsxOpeningFragment = 286, - JsxClosingFragment = 287, - JsxAttribute = 288, - JsxAttributes = 289, - JsxSpreadAttribute = 290, - JsxExpression = 291, - CaseClause = 292, - DefaultClause = 293, - HeritageClause = 294, - CatchClause = 295, - AssertClause = 296, - AssertEntry = 297, - ImportTypeAssertionContainer = 298, - PropertyAssignment = 299, - ShorthandPropertyAssignment = 300, - SpreadAssignment = 301, - EnumMember = 302, - /** @deprecated */ UnparsedPrologue = 303, - /** @deprecated */ UnparsedPrepend = 304, - /** @deprecated */ UnparsedText = 305, - /** @deprecated */ UnparsedInternalText = 306, - /** @deprecated */ UnparsedSyntheticReference = 307, - SourceFile = 308, - Bundle = 309, - /** @deprecated */ UnparsedSource = 310, - /** @deprecated */ InputFiles = 311, - JSDocTypeExpression = 312, - JSDocNameReference = 313, - JSDocMemberName = 314, - JSDocAllType = 315, - JSDocUnknownType = 316, - JSDocNullableType = 317, - JSDocNonNullableType = 318, - JSDocOptionalType = 319, - JSDocFunctionType = 320, - JSDocVariadicType = 321, - JSDocNamepathType = 322, - JSDoc = 323, + BreakKeyword = 82, + CaseKeyword = 83, + CatchKeyword = 84, + ClassKeyword = 85, + ConstKeyword = 86, + ContinueKeyword = 87, + DebuggerKeyword = 88, + DefaultKeyword = 89, + DeleteKeyword = 90, + DoKeyword = 91, + ElseKeyword = 92, + EnumKeyword = 93, + ExportKeyword = 94, + ExtendsKeyword = 95, + FalseKeyword = 96, + FinallyKeyword = 97, + ForKeyword = 98, + FunctionKeyword = 99, + IfKeyword = 100, + ImportKeyword = 101, + InKeyword = 102, + InstanceOfKeyword = 103, + NewKeyword = 104, + NullKeyword = 105, + ReturnKeyword = 106, + SuperKeyword = 107, + SwitchKeyword = 108, + ThisKeyword = 109, + ThrowKeyword = 110, + TrueKeyword = 111, + TryKeyword = 112, + TypeOfKeyword = 113, + VarKeyword = 114, + VoidKeyword = 115, + WhileKeyword = 116, + WithKeyword = 117, + ImplementsKeyword = 118, + InterfaceKeyword = 119, + LetKeyword = 120, + PackageKeyword = 121, + PrivateKeyword = 122, + ProtectedKeyword = 123, + PublicKeyword = 124, + StaticKeyword = 125, + YieldKeyword = 126, + AbstractKeyword = 127, + AccessorKeyword = 128, + AsKeyword = 129, + AssertsKeyword = 130, + AssertKeyword = 131, + AnyKeyword = 132, + AsyncKeyword = 133, + AwaitKeyword = 134, + BooleanKeyword = 135, + ConstructorKeyword = 136, + DeclareKeyword = 137, + GetKeyword = 138, + InferKeyword = 139, + IntrinsicKeyword = 140, + IsKeyword = 141, + KeyOfKeyword = 142, + ModuleKeyword = 143, + NamespaceKeyword = 144, + NeverKeyword = 145, + OutKeyword = 146, + ReadonlyKeyword = 147, + RequireKeyword = 148, + NumberKeyword = 149, + ObjectKeyword = 150, + SatisfiesKeyword = 151, + SetKeyword = 152, + StringKeyword = 153, + SymbolKeyword = 154, + TypeKeyword = 155, + UndefinedKeyword = 156, + UniqueKeyword = 157, + UnknownKeyword = 158, + FromKeyword = 159, + GlobalKeyword = 160, + BigIntKeyword = 161, + OverrideKeyword = 162, + OfKeyword = 163, + QualifiedName = 164, + ComputedPropertyName = 165, + TypeParameter = 166, + Parameter = 167, + Decorator = 168, + PropertySignature = 169, + PropertyDeclaration = 170, + MethodSignature = 171, + MethodDeclaration = 172, + ClassStaticBlockDeclaration = 173, + Constructor = 174, + GetAccessor = 175, + SetAccessor = 176, + CallSignature = 177, + ConstructSignature = 178, + IndexSignature = 179, + TypePredicate = 180, + TypeReference = 181, + FunctionType = 182, + ConstructorType = 183, + TypeQuery = 184, + TypeLiteral = 185, + ArrayType = 186, + TupleType = 187, + OptionalType = 188, + RestType = 189, + UnionType = 190, + IntersectionType = 191, + ConditionalType = 192, + InferType = 193, + ParenthesizedType = 194, + ThisType = 195, + TypeOperator = 196, + IndexedAccessType = 197, + MappedType = 198, + LiteralType = 199, + NamedTupleMember = 200, + TemplateLiteralType = 201, + TemplateLiteralTypeSpan = 202, + ImportType = 203, + ObjectBindingPattern = 204, + ArrayBindingPattern = 205, + BindingElement = 206, + ArrayLiteralExpression = 207, + ObjectLiteralExpression = 208, + PropertyAccessExpression = 209, + ElementAccessExpression = 210, + CallExpression = 211, + NewExpression = 212, + TaggedTemplateExpression = 213, + TypeAssertionExpression = 214, + ParenthesizedExpression = 215, + FunctionExpression = 216, + ArrowFunction = 217, + DeleteExpression = 218, + TypeOfExpression = 219, + VoidExpression = 220, + AwaitExpression = 221, + PrefixUnaryExpression = 222, + PostfixUnaryExpression = 223, + BinaryExpression = 224, + ConditionalExpression = 225, + TemplateExpression = 226, + YieldExpression = 227, + SpreadElement = 228, + ClassExpression = 229, + OmittedExpression = 230, + ExpressionWithTypeArguments = 231, + AsExpression = 232, + NonNullExpression = 233, + MetaProperty = 234, + SyntheticExpression = 235, + SatisfiesExpression = 236, + TemplateSpan = 237, + SemicolonClassElement = 238, + Block = 239, + EmptyStatement = 240, + VariableStatement = 241, + ExpressionStatement = 242, + IfStatement = 243, + DoStatement = 244, + WhileStatement = 245, + ForStatement = 246, + ForInStatement = 247, + ForOfStatement = 248, + ContinueStatement = 249, + BreakStatement = 250, + ReturnStatement = 251, + WithStatement = 252, + SwitchStatement = 253, + LabeledStatement = 254, + ThrowStatement = 255, + TryStatement = 256, + DebuggerStatement = 257, + VariableDeclaration = 258, + VariableDeclarationList = 259, + FunctionDeclaration = 260, + ClassDeclaration = 261, + InterfaceDeclaration = 262, + TypeAliasDeclaration = 263, + EnumDeclaration = 264, + ModuleDeclaration = 265, + ModuleBlock = 266, + CaseBlock = 267, + NamespaceExportDeclaration = 268, + ImportEqualsDeclaration = 269, + ImportDeclaration = 270, + ImportClause = 271, + NamespaceImport = 272, + NamedImports = 273, + ImportSpecifier = 274, + ExportAssignment = 275, + ExportDeclaration = 276, + NamedExports = 277, + NamespaceExport = 278, + ExportSpecifier = 279, + MissingDeclaration = 280, + ExternalModuleReference = 281, + JsxElement = 282, + JsxSelfClosingElement = 283, + JsxOpeningElement = 284, + JsxClosingElement = 285, + JsxFragment = 286, + JsxOpeningFragment = 287, + JsxClosingFragment = 288, + JsxAttribute = 289, + JsxAttributes = 290, + JsxSpreadAttribute = 291, + JsxExpression = 292, + CaseClause = 293, + DefaultClause = 294, + HeritageClause = 295, + CatchClause = 296, + AssertClause = 297, + AssertEntry = 298, + ImportTypeAssertionContainer = 299, + PropertyAssignment = 300, + ShorthandPropertyAssignment = 301, + SpreadAssignment = 302, + EnumMember = 303, + /** @deprecated */ UnparsedPrologue = 304, + /** @deprecated */ UnparsedPrepend = 305, + /** @deprecated */ UnparsedText = 306, + /** @deprecated */ UnparsedInternalText = 307, + /** @deprecated */ UnparsedSyntheticReference = 308, + SourceFile = 309, + Bundle = 310, + /** @deprecated */ UnparsedSource = 311, + /** @deprecated */ InputFiles = 312, + JSDocTypeExpression = 313, + JSDocNameReference = 314, + JSDocMemberName = 315, + JSDocAllType = 316, + JSDocUnknownType = 317, + JSDocNullableType = 318, + JSDocNonNullableType = 319, + JSDocOptionalType = 320, + JSDocFunctionType = 321, + JSDocVariadicType = 322, + JSDocNamepathType = 323, + JSDoc = 324, /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 323, - JSDocText = 324, - JSDocTypeLiteral = 325, - JSDocSignature = 326, - JSDocLink = 327, - JSDocLinkCode = 328, - JSDocLinkPlain = 329, - JSDocTag = 330, - JSDocAugmentsTag = 331, - JSDocImplementsTag = 332, - JSDocAuthorTag = 333, - JSDocDeprecatedTag = 334, - JSDocClassTag = 335, - JSDocPublicTag = 336, - JSDocPrivateTag = 337, - JSDocProtectedTag = 338, - JSDocReadonlyTag = 339, - JSDocOverrideTag = 340, - JSDocCallbackTag = 341, - JSDocOverloadTag = 342, - JSDocEnumTag = 343, - JSDocParameterTag = 344, - JSDocReturnTag = 345, - JSDocThisTag = 346, - JSDocTypeTag = 347, - JSDocTemplateTag = 348, - JSDocTypedefTag = 349, - JSDocSeeTag = 350, - JSDocPropertyTag = 351, - JSDocThrowsTag = 352, - JSDocSatisfiesTag = 353, - SyntaxList = 354, - NotEmittedStatement = 355, - PartiallyEmittedExpression = 356, - CommaListExpression = 357, - MergeDeclarationMarker = 358, - EndOfDeclarationMarker = 359, - SyntheticReferenceExpression = 360, - Count = 361, + JSDocComment = 324, + JSDocText = 325, + JSDocTypeLiteral = 326, + JSDocSignature = 327, + JSDocLink = 328, + JSDocLinkCode = 329, + JSDocLinkPlain = 330, + JSDocTag = 331, + JSDocAugmentsTag = 332, + JSDocImplementsTag = 333, + JSDocAuthorTag = 334, + JSDocDeprecatedTag = 335, + JSDocClassTag = 336, + JSDocPublicTag = 337, + JSDocPrivateTag = 338, + JSDocProtectedTag = 339, + JSDocReadonlyTag = 340, + JSDocOverrideTag = 341, + JSDocCallbackTag = 342, + JSDocOverloadTag = 343, + JSDocEnumTag = 344, + JSDocParameterTag = 345, + JSDocReturnTag = 346, + JSDocThisTag = 347, + JSDocTypeTag = 348, + JSDocTemplateTag = 349, + JSDocTypedefTag = 350, + JSDocSeeTag = 351, + JSDocPropertyTag = 352, + JSDocThrowsTag = 353, + JSDocSatisfiesTag = 354, + SyntaxList = 355, + NotEmittedStatement = 356, + PartiallyEmittedExpression = 357, + CommaListExpression = 358, + MergeDeclarationMarker = 359, + EndOfDeclarationMarker = 360, + SyntheticReferenceExpression = 361, + Count = 362, FirstAssignment = 63, LastAssignment = 78, FirstCompoundAssignment = 64, LastCompoundAssignment = 78, - FirstReservedWord = 81, - LastReservedWord = 116, - FirstKeyword = 81, - LastKeyword = 162, - FirstFutureReservedWord = 117, - LastFutureReservedWord = 125, - FirstTypeNode = 179, - LastTypeNode = 202, + FirstReservedWord = 82, + LastReservedWord = 117, + FirstKeyword = 82, + LastKeyword = 163, + FirstFutureReservedWord = 118, + LastFutureReservedWord = 126, + FirstTypeNode = 180, + LastTypeNode = 203, FirstPunctuation = 18, LastPunctuation = 78, FirstToken = 0, - LastToken = 162, + LastToken = 163, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -4376,13 +4376,13 @@ LastTemplateToken = 17, FirstBinaryOperator = 29, LastBinaryOperator = 78, - FirstStatement = 240, - LastStatement = 256, - FirstNode = 163, - FirstJSDocNode = 312, - LastJSDocNode = 353, - FirstJSDocTagNode = 330, - LastJSDocTagNode = 353 + FirstStatement = 241, + LastStatement = 257, + FirstNode = 164, + FirstJSDocNode = 313, + LastJSDocNode = 354, + FirstJSDocTagNode = 331, + LastJSDocTagNode = 354 } type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; @@ -6370,6 +6370,40 @@ getBaseConstraintOfType(type: Type): Type | undefined; getDefaultFromTypeParameter(type: Type): Type | undefined; /** + * Gets the intrinsic `any` type. There are multiple types that act as `any` used internally in the compiler, + * so the type returned by this function should not be used in equality checks to determine if another type + * is `any`. Instead, use `type.flags & TypeFlags.Any`. + */ + getAnyType(): Type; + getStringType(): Type; + getStringLiteralType(value: string): StringLiteralType; + getNumberType(): Type; + getNumberLiteralType(value: number): NumberLiteralType; + getBigIntType(): Type; + getBooleanType(): Type; + getFalseType(): Type; + getTrueType(): Type; + getVoidType(): Type; + /** + * Gets the intrinsic `undefined` type. There are multiple types that act as `undefined` used internally in the compiler + * depending on compiler options, so the type returned by this function should not be used in equality checks to determine + * if another type is `undefined`. Instead, use `type.flags & TypeFlags.Undefined`. + */ + getUndefinedType(): Type; + /** + * Gets the intrinsic `null` type. There are multiple types that act as `null` used internally in the compiler, + * so the type returned by this function should not be used in equality checks to determine if another type + * is `null`. Instead, use `type.flags & TypeFlags.Null`. + */ + getNullType(): Type; + getESSymbolType(): Type; + /** + * Gets the intrinsic `never` type. There are multiple types that act as `never` used internally in the compiler, + * so the type returned by this function should not be used in equality checks to determine if another type + * is `never`. Instead, use `type.flags & TypeFlags.Never`. + */ + getNeverType(): Type; + /** * True if this type is the `Array` or `ReadonlyArray` type from lib.d.ts. * This function will _not_ return true if passed a type which * extends `Array` (for example, the TypeScript AST's `NodeArray` type). @@ -6957,6 +6991,12 @@ } enum ModuleResolutionKind { Classic = 1, + /** + * @deprecated + * `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets. + * Use the new name or consider switching to a modern module resolution target. + */ + NodeJs = 2, Node10 = 2, Node16 = 3, NodeNext = 99, @@ -8323,9 +8363,15 @@ function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner; type ErrorCallback = (message: DiagnosticMessage, length: number) => void; interface Scanner { + /** @deprecated use {@link getTokenFullStart} */ getStartPos(): number; getToken(): SyntaxKind; + getTokenFullStart(): number; + getTokenStart(): number; + getTokenEnd(): number; + /** @deprecated use {@link getTokenEnd} */ getTextPos(): number; + /** @deprecated use {@link getTokenStart} */ getTokenPos(): number; getTokenText(): string; getTokenValue(): string; @@ -8356,7 +8402,9 @@ setOnError(onError: ErrorCallback | undefined): void; setScriptTarget(scriptTarget: ScriptTarget): void; setLanguageVariant(variant: LanguageVariant): void; + /** @deprecated use {@link resetTokenState} */ setTextPos(textPos: number): void; + resetTokenState(pos: number): void; lookAhead(callback: () => T): T; scanRange(start: number, length: number, callback: () => T): T; tryScan(callback: () => T): T; diff --recursive --unified --new-file --exclude test --exclude Makefile 5.1.0-dev.20230307/lib/tsserverlibrary.js 5.1.0-dev.20230308/lib/tsserverlibrary.js --- 5.1.0-dev.20230307/lib/tsserverlibrary.js 1985-10-26 09:15:00 +++ 5.1.0-dev.20230308/lib/tsserverlibrary.js 1985-10-26 09:15:00 @@ -35,7 +35,7 @@ "src/compiler/corePublic.ts"() { "use strict"; versionMajorMinor = "5.1"; - version = `${versionMajorMinor}.0-dev.20230307`; + version = `${versionMajorMinor}.0-dev.20230308`; Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -3545,7 +3545,7 @@ const name = DiagnosticCategory[d.category]; return lowerCase ? name.toLowerCase() : name; } - var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas, DeprecationVersion; + var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas; var init_types = __esm({ "src/compiler/types.ts"() { "use strict"; @@ -3631,304 +3631,305 @@ SyntaxKind5[SyntaxKind5["CaretEqualsToken"] = 78] = "CaretEqualsToken"; SyntaxKind5[SyntaxKind5["Identifier"] = 79] = "Identifier"; SyntaxKind5[SyntaxKind5["PrivateIdentifier"] = 80] = "PrivateIdentifier"; - SyntaxKind5[SyntaxKind5["BreakKeyword"] = 81] = "BreakKeyword"; - SyntaxKind5[SyntaxKind5["CaseKeyword"] = 82] = "CaseKeyword"; - SyntaxKind5[SyntaxKind5["CatchKeyword"] = 83] = "CatchKeyword"; - SyntaxKind5[SyntaxKind5["ClassKeyword"] = 84] = "ClassKeyword"; - SyntaxKind5[SyntaxKind5["ConstKeyword"] = 85] = "ConstKeyword"; - SyntaxKind5[SyntaxKind5["ContinueKeyword"] = 86] = "ContinueKeyword"; - SyntaxKind5[SyntaxKind5["DebuggerKeyword"] = 87] = "DebuggerKeyword"; - SyntaxKind5[SyntaxKind5["DefaultKeyword"] = 88] = "DefaultKeyword"; - SyntaxKind5[SyntaxKind5["DeleteKeyword"] = 89] = "DeleteKeyword"; - SyntaxKind5[SyntaxKind5["DoKeyword"] = 90] = "DoKeyword"; - SyntaxKind5[SyntaxKind5["ElseKeyword"] = 91] = "ElseKeyword"; - SyntaxKind5[SyntaxKind5["EnumKeyword"] = 92] = "EnumKeyword"; - SyntaxKind5[SyntaxKind5["ExportKeyword"] = 93] = "ExportKeyword"; - SyntaxKind5[SyntaxKind5["ExtendsKeyword"] = 94] = "ExtendsKeyword"; - SyntaxKind5[SyntaxKind5["FalseKeyword"] = 95] = "FalseKeyword"; - SyntaxKind5[SyntaxKind5["FinallyKeyword"] = 96] = "FinallyKeyword"; - SyntaxKind5[SyntaxKind5["ForKeyword"] = 97] = "ForKeyword"; - SyntaxKind5[SyntaxKind5["FunctionKeyword"] = 98] = "FunctionKeyword"; - SyntaxKind5[SyntaxKind5["IfKeyword"] = 99] = "IfKeyword"; - SyntaxKind5[SyntaxKind5["ImportKeyword"] = 100] = "ImportKeyword"; - SyntaxKind5[SyntaxKind5["InKeyword"] = 101] = "InKeyword"; - SyntaxKind5[SyntaxKind5["InstanceOfKeyword"] = 102] = "InstanceOfKeyword"; - SyntaxKind5[SyntaxKind5["NewKeyword"] = 103] = "NewKeyword"; - SyntaxKind5[SyntaxKind5["NullKeyword"] = 104] = "NullKeyword"; - SyntaxKind5[SyntaxKind5["ReturnKeyword"] = 105] = "ReturnKeyword"; - SyntaxKind5[SyntaxKind5["SuperKeyword"] = 106] = "SuperKeyword"; - SyntaxKind5[SyntaxKind5["SwitchKeyword"] = 107] = "SwitchKeyword"; - SyntaxKind5[SyntaxKind5["ThisKeyword"] = 108] = "ThisKeyword"; - SyntaxKind5[SyntaxKind5["ThrowKeyword"] = 109] = "ThrowKeyword"; - SyntaxKind5[SyntaxKind5["TrueKeyword"] = 110] = "TrueKeyword"; - SyntaxKind5[SyntaxKind5["TryKeyword"] = 111] = "TryKeyword"; - SyntaxKind5[SyntaxKind5["TypeOfKeyword"] = 112] = "TypeOfKeyword"; - SyntaxKind5[SyntaxKind5["VarKeyword"] = 113] = "VarKeyword"; - SyntaxKind5[SyntaxKind5["VoidKeyword"] = 114] = "VoidKeyword"; - SyntaxKind5[SyntaxKind5["WhileKeyword"] = 115] = "WhileKeyword"; - SyntaxKind5[SyntaxKind5["WithKeyword"] = 116] = "WithKeyword"; - SyntaxKind5[SyntaxKind5["ImplementsKeyword"] = 117] = "ImplementsKeyword"; - SyntaxKind5[SyntaxKind5["InterfaceKeyword"] = 118] = "InterfaceKeyword"; - SyntaxKind5[SyntaxKind5["LetKeyword"] = 119] = "LetKeyword"; - SyntaxKind5[SyntaxKind5["PackageKeyword"] = 120] = "PackageKeyword"; - SyntaxKind5[SyntaxKind5["PrivateKeyword"] = 121] = "PrivateKeyword"; - SyntaxKind5[SyntaxKind5["ProtectedKeyword"] = 122] = "ProtectedKeyword"; - SyntaxKind5[SyntaxKind5["PublicKeyword"] = 123] = "PublicKeyword"; - SyntaxKind5[SyntaxKind5["StaticKeyword"] = 124] = "StaticKeyword"; - SyntaxKind5[SyntaxKind5["YieldKeyword"] = 125] = "YieldKeyword"; - SyntaxKind5[SyntaxKind5["AbstractKeyword"] = 126] = "AbstractKeyword"; - SyntaxKind5[SyntaxKind5["AccessorKeyword"] = 127] = "AccessorKeyword"; - SyntaxKind5[SyntaxKind5["AsKeyword"] = 128] = "AsKeyword"; - SyntaxKind5[SyntaxKind5["AssertsKeyword"] = 129] = "AssertsKeyword"; - SyntaxKind5[SyntaxKind5["AssertKeyword"] = 130] = "AssertKeyword"; - SyntaxKind5[SyntaxKind5["AnyKeyword"] = 131] = "AnyKeyword"; - SyntaxKind5[SyntaxKind5["AsyncKeyword"] = 132] = "AsyncKeyword"; - SyntaxKind5[SyntaxKind5["AwaitKeyword"] = 133] = "AwaitKeyword"; - SyntaxKind5[SyntaxKind5["BooleanKeyword"] = 134] = "BooleanKeyword"; - SyntaxKind5[SyntaxKind5["ConstructorKeyword"] = 135] = "ConstructorKeyword"; - SyntaxKind5[SyntaxKind5["DeclareKeyword"] = 136] = "DeclareKeyword"; - SyntaxKind5[SyntaxKind5["GetKeyword"] = 137] = "GetKeyword"; - SyntaxKind5[SyntaxKind5["InferKeyword"] = 138] = "InferKeyword"; - SyntaxKind5[SyntaxKind5["IntrinsicKeyword"] = 139] = "IntrinsicKeyword"; - SyntaxKind5[SyntaxKind5["IsKeyword"] = 140] = "IsKeyword"; - SyntaxKind5[SyntaxKind5["KeyOfKeyword"] = 141] = "KeyOfKeyword"; - SyntaxKind5[SyntaxKind5["ModuleKeyword"] = 142] = "ModuleKeyword"; - SyntaxKind5[SyntaxKind5["NamespaceKeyword"] = 143] = "NamespaceKeyword"; - SyntaxKind5[SyntaxKind5["NeverKeyword"] = 144] = "NeverKeyword"; - SyntaxKind5[SyntaxKind5["OutKeyword"] = 145] = "OutKeyword"; - SyntaxKind5[SyntaxKind5["ReadonlyKeyword"] = 146] = "ReadonlyKeyword"; - SyntaxKind5[SyntaxKind5["RequireKeyword"] = 147] = "RequireKeyword"; - SyntaxKind5[SyntaxKind5["NumberKeyword"] = 148] = "NumberKeyword"; - SyntaxKind5[SyntaxKind5["ObjectKeyword"] = 149] = "ObjectKeyword"; - SyntaxKind5[SyntaxKind5["SatisfiesKeyword"] = 150] = "SatisfiesKeyword"; - SyntaxKind5[SyntaxKind5["SetKeyword"] = 151] = "SetKeyword"; - SyntaxKind5[SyntaxKind5["StringKeyword"] = 152] = "StringKeyword"; - SyntaxKind5[SyntaxKind5["SymbolKeyword"] = 153] = "SymbolKeyword"; - SyntaxKind5[SyntaxKind5["TypeKeyword"] = 154] = "TypeKeyword"; - SyntaxKind5[SyntaxKind5["UndefinedKeyword"] = 155] = "UndefinedKeyword"; - SyntaxKind5[SyntaxKind5["UniqueKeyword"] = 156] = "UniqueKeyword"; - SyntaxKind5[SyntaxKind5["UnknownKeyword"] = 157] = "UnknownKeyword"; - SyntaxKind5[SyntaxKind5["FromKeyword"] = 158] = "FromKeyword"; - SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 159] = "GlobalKeyword"; - SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 160] = "BigIntKeyword"; - SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 161] = "OverrideKeyword"; - SyntaxKind5[SyntaxKind5["OfKeyword"] = 162] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 163] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 164] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 165] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 166] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 167] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 168] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 169] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 170] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 171] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 172] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 173] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 174] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 175] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 176] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 177] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 178] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 179] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 180] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 181] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 182] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 183] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 184] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 185] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 186] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 187] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 188] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 189] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 190] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 191] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 192] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 193] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 194] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 195] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 196] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 197] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 198] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 199] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 200] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 201] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 202] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 203] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 204] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 205] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 206] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 207] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 208] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 209] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 210] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 211] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 212] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 213] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 214] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 215] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 216] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 217] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 218] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 219] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 220] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 221] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 222] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 223] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 224] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 225] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 226] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 227] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 228] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 229] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 230] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 231] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 232] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 233] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 234] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 235] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 236] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 237] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 238] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 239] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 240] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 241] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 242] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 243] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 244] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 245] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 246] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 247] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 248] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 249] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 250] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 251] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 252] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 253] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 254] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 255] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 256] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 257] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 258] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 259] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 260] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 261] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 262] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 263] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 264] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 265] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 266] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 267] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 268] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 269] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 270] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 271] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 272] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 273] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 274] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 275] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 276] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 277] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 278] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 279] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 280] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 281] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 282] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 283] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 284] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 285] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 286] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 287] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 288] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 289] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 290] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 291] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 292] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 293] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 294] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 295] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 296] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 297] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 298] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 299] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 300] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 301] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 302] = "EnumMember"; - SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 303] = "UnparsedPrologue"; - SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 304] = "UnparsedPrepend"; - SyntaxKind5[SyntaxKind5["UnparsedText"] = 305] = "UnparsedText"; - SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 306] = "UnparsedInternalText"; - SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 307] = "UnparsedSyntheticReference"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 308] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 309] = "Bundle"; - SyntaxKind5[SyntaxKind5["UnparsedSource"] = 310] = "UnparsedSource"; - SyntaxKind5[SyntaxKind5["InputFiles"] = 311] = "InputFiles"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 312] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 313] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 314] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 315] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 316] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 317] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 318] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 319] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 320] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 321] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 322] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 323] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 323 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 324] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 325] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 326] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 327] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 328] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 329] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 330] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 331] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 332] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 333] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 334] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 335] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 336] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 337] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 338] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 339] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 340] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 341] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 342] = "JSDocOverloadTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 343] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 344] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 345] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 346] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 347] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 348] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 349] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 350] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 351] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 352] = "JSDocThrowsTag"; - SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 354] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 355] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 357] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker"; - SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 361] = "Count"; + SyntaxKind5[SyntaxKind5["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken"; + SyntaxKind5[SyntaxKind5["BreakKeyword"] = 82] = "BreakKeyword"; + SyntaxKind5[SyntaxKind5["CaseKeyword"] = 83] = "CaseKeyword"; + SyntaxKind5[SyntaxKind5["CatchKeyword"] = 84] = "CatchKeyword"; + SyntaxKind5[SyntaxKind5["ClassKeyword"] = 85] = "ClassKeyword"; + SyntaxKind5[SyntaxKind5["ConstKeyword"] = 86] = "ConstKeyword"; + SyntaxKind5[SyntaxKind5["ContinueKeyword"] = 87] = "ContinueKeyword"; + SyntaxKind5[SyntaxKind5["DebuggerKeyword"] = 88] = "DebuggerKeyword"; + SyntaxKind5[SyntaxKind5["DefaultKeyword"] = 89] = "DefaultKeyword"; + SyntaxKind5[SyntaxKind5["DeleteKeyword"] = 90] = "DeleteKeyword"; + SyntaxKind5[SyntaxKind5["DoKeyword"] = 91] = "DoKeyword"; + SyntaxKind5[SyntaxKind5["ElseKeyword"] = 92] = "ElseKeyword"; + SyntaxKind5[SyntaxKind5["EnumKeyword"] = 93] = "EnumKeyword"; + SyntaxKind5[SyntaxKind5["ExportKeyword"] = 94] = "ExportKeyword"; + SyntaxKind5[SyntaxKind5["ExtendsKeyword"] = 95] = "ExtendsKeyword"; + SyntaxKind5[SyntaxKind5["FalseKeyword"] = 96] = "FalseKeyword"; + SyntaxKind5[SyntaxKind5["FinallyKeyword"] = 97] = "FinallyKeyword"; + SyntaxKind5[SyntaxKind5["ForKeyword"] = 98] = "ForKeyword"; + SyntaxKind5[SyntaxKind5["FunctionKeyword"] = 99] = "FunctionKeyword"; + SyntaxKind5[SyntaxKind5["IfKeyword"] = 100] = "IfKeyword"; + SyntaxKind5[SyntaxKind5["ImportKeyword"] = 101] = "ImportKeyword"; + SyntaxKind5[SyntaxKind5["InKeyword"] = 102] = "InKeyword"; + SyntaxKind5[SyntaxKind5["InstanceOfKeyword"] = 103] = "InstanceOfKeyword"; + SyntaxKind5[SyntaxKind5["NewKeyword"] = 104] = "NewKeyword"; + SyntaxKind5[SyntaxKind5["NullKeyword"] = 105] = "NullKeyword"; + SyntaxKind5[SyntaxKind5["ReturnKeyword"] = 106] = "ReturnKeyword"; + SyntaxKind5[SyntaxKind5["SuperKeyword"] = 107] = "SuperKeyword"; + SyntaxKind5[SyntaxKind5["SwitchKeyword"] = 108] = "SwitchKeyword"; + SyntaxKind5[SyntaxKind5["ThisKeyword"] = 109] = "ThisKeyword"; + SyntaxKind5[SyntaxKind5["ThrowKeyword"] = 110] = "ThrowKeyword"; + SyntaxKind5[SyntaxKind5["TrueKeyword"] = 111] = "TrueKeyword"; + SyntaxKind5[SyntaxKind5["TryKeyword"] = 112] = "TryKeyword"; + SyntaxKind5[SyntaxKind5["TypeOfKeyword"] = 113] = "TypeOfKeyword"; + SyntaxKind5[SyntaxKind5["VarKeyword"] = 114] = "VarKeyword"; + SyntaxKind5[SyntaxKind5["VoidKeyword"] = 115] = "VoidKeyword"; + SyntaxKind5[SyntaxKind5["WhileKeyword"] = 116] = "WhileKeyword"; + SyntaxKind5[SyntaxKind5["WithKeyword"] = 117] = "WithKeyword"; + SyntaxKind5[SyntaxKind5["ImplementsKeyword"] = 118] = "ImplementsKeyword"; + SyntaxKind5[SyntaxKind5["InterfaceKeyword"] = 119] = "InterfaceKeyword"; + SyntaxKind5[SyntaxKind5["LetKeyword"] = 120] = "LetKeyword"; + SyntaxKind5[SyntaxKind5["PackageKeyword"] = 121] = "PackageKeyword"; + SyntaxKind5[SyntaxKind5["PrivateKeyword"] = 122] = "PrivateKeyword"; + SyntaxKind5[SyntaxKind5["ProtectedKeyword"] = 123] = "ProtectedKeyword"; + SyntaxKind5[SyntaxKind5["PublicKeyword"] = 124] = "PublicKeyword"; + SyntaxKind5[SyntaxKind5["StaticKeyword"] = 125] = "StaticKeyword"; + SyntaxKind5[SyntaxKind5["YieldKeyword"] = 126] = "YieldKeyword"; + SyntaxKind5[SyntaxKind5["AbstractKeyword"] = 127] = "AbstractKeyword"; + SyntaxKind5[SyntaxKind5["AccessorKeyword"] = 128] = "AccessorKeyword"; + SyntaxKind5[SyntaxKind5["AsKeyword"] = 129] = "AsKeyword"; + SyntaxKind5[SyntaxKind5["AssertsKeyword"] = 130] = "AssertsKeyword"; + SyntaxKind5[SyntaxKind5["AssertKeyword"] = 131] = "AssertKeyword"; + SyntaxKind5[SyntaxKind5["AnyKeyword"] = 132] = "AnyKeyword"; + SyntaxKind5[SyntaxKind5["AsyncKeyword"] = 133] = "AsyncKeyword"; + SyntaxKind5[SyntaxKind5["AwaitKeyword"] = 134] = "AwaitKeyword"; + SyntaxKind5[SyntaxKind5["BooleanKeyword"] = 135] = "BooleanKeyword"; + SyntaxKind5[SyntaxKind5["ConstructorKeyword"] = 136] = "ConstructorKeyword"; + SyntaxKind5[SyntaxKind5["DeclareKeyword"] = 137] = "DeclareKeyword"; + SyntaxKind5[SyntaxKind5["GetKeyword"] = 138] = "GetKeyword"; + SyntaxKind5[SyntaxKind5["InferKeyword"] = 139] = "InferKeyword"; + SyntaxKind5[SyntaxKind5["IntrinsicKeyword"] = 140] = "IntrinsicKeyword"; + SyntaxKind5[SyntaxKind5["IsKeyword"] = 141] = "IsKeyword"; + SyntaxKind5[SyntaxKind5["KeyOfKeyword"] = 142] = "KeyOfKeyword"; + SyntaxKind5[SyntaxKind5["ModuleKeyword"] = 143] = "ModuleKeyword"; + SyntaxKind5[SyntaxKind5["NamespaceKeyword"] = 144] = "NamespaceKeyword"; + SyntaxKind5[SyntaxKind5["NeverKeyword"] = 145] = "NeverKeyword"; + SyntaxKind5[SyntaxKind5["OutKeyword"] = 146] = "OutKeyword"; + SyntaxKind5[SyntaxKind5["ReadonlyKeyword"] = 147] = "ReadonlyKeyword"; + SyntaxKind5[SyntaxKind5["RequireKeyword"] = 148] = "RequireKeyword"; + SyntaxKind5[SyntaxKind5["NumberKeyword"] = 149] = "NumberKeyword"; + SyntaxKind5[SyntaxKind5["ObjectKeyword"] = 150] = "ObjectKeyword"; + SyntaxKind5[SyntaxKind5["SatisfiesKeyword"] = 151] = "SatisfiesKeyword"; + SyntaxKind5[SyntaxKind5["SetKeyword"] = 152] = "SetKeyword"; + SyntaxKind5[SyntaxKind5["StringKeyword"] = 153] = "StringKeyword"; + SyntaxKind5[SyntaxKind5["SymbolKeyword"] = 154] = "SymbolKeyword"; + SyntaxKind5[SyntaxKind5["TypeKeyword"] = 155] = "TypeKeyword"; + SyntaxKind5[SyntaxKind5["UndefinedKeyword"] = 156] = "UndefinedKeyword"; + SyntaxKind5[SyntaxKind5["UniqueKeyword"] = 157] = "UniqueKeyword"; + SyntaxKind5[SyntaxKind5["UnknownKeyword"] = 158] = "UnknownKeyword"; + SyntaxKind5[SyntaxKind5["FromKeyword"] = 159] = "FromKeyword"; + SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 160] = "GlobalKeyword"; + SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 161] = "BigIntKeyword"; + SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 162] = "OverrideKeyword"; + SyntaxKind5[SyntaxKind5["OfKeyword"] = 163] = "OfKeyword"; + SyntaxKind5[SyntaxKind5["QualifiedName"] = 164] = "QualifiedName"; + SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 165] = "ComputedPropertyName"; + SyntaxKind5[SyntaxKind5["TypeParameter"] = 166] = "TypeParameter"; + SyntaxKind5[SyntaxKind5["Parameter"] = 167] = "Parameter"; + SyntaxKind5[SyntaxKind5["Decorator"] = 168] = "Decorator"; + SyntaxKind5[SyntaxKind5["PropertySignature"] = 169] = "PropertySignature"; + SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 170] = "PropertyDeclaration"; + SyntaxKind5[SyntaxKind5["MethodSignature"] = 171] = "MethodSignature"; + SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 172] = "MethodDeclaration"; + SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 173] = "ClassStaticBlockDeclaration"; + SyntaxKind5[SyntaxKind5["Constructor"] = 174] = "Constructor"; + SyntaxKind5[SyntaxKind5["GetAccessor"] = 175] = "GetAccessor"; + SyntaxKind5[SyntaxKind5["SetAccessor"] = 176] = "SetAccessor"; + SyntaxKind5[SyntaxKind5["CallSignature"] = 177] = "CallSignature"; + SyntaxKind5[SyntaxKind5["ConstructSignature"] = 178] = "ConstructSignature"; + SyntaxKind5[SyntaxKind5["IndexSignature"] = 179] = "IndexSignature"; + SyntaxKind5[SyntaxKind5["TypePredicate"] = 180] = "TypePredicate"; + SyntaxKind5[SyntaxKind5["TypeReference"] = 181] = "TypeReference"; + SyntaxKind5[SyntaxKind5["FunctionType"] = 182] = "FunctionType"; + SyntaxKind5[SyntaxKind5["ConstructorType"] = 183] = "ConstructorType"; + SyntaxKind5[SyntaxKind5["TypeQuery"] = 184] = "TypeQuery"; + SyntaxKind5[SyntaxKind5["TypeLiteral"] = 185] = "TypeLiteral"; + SyntaxKind5[SyntaxKind5["ArrayType"] = 186] = "ArrayType"; + SyntaxKind5[SyntaxKind5["TupleType"] = 187] = "TupleType"; + SyntaxKind5[SyntaxKind5["OptionalType"] = 188] = "OptionalType"; + SyntaxKind5[SyntaxKind5["RestType"] = 189] = "RestType"; + SyntaxKind5[SyntaxKind5["UnionType"] = 190] = "UnionType"; + SyntaxKind5[SyntaxKind5["IntersectionType"] = 191] = "IntersectionType"; + SyntaxKind5[SyntaxKind5["ConditionalType"] = 192] = "ConditionalType"; + SyntaxKind5[SyntaxKind5["InferType"] = 193] = "InferType"; + SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 194] = "ParenthesizedType"; + SyntaxKind5[SyntaxKind5["ThisType"] = 195] = "ThisType"; + SyntaxKind5[SyntaxKind5["TypeOperator"] = 196] = "TypeOperator"; + SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 197] = "IndexedAccessType"; + SyntaxKind5[SyntaxKind5["MappedType"] = 198] = "MappedType"; + SyntaxKind5[SyntaxKind5["LiteralType"] = 199] = "LiteralType"; + SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 200] = "NamedTupleMember"; + SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 201] = "TemplateLiteralType"; + SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 202] = "TemplateLiteralTypeSpan"; + SyntaxKind5[SyntaxKind5["ImportType"] = 203] = "ImportType"; + SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 204] = "ObjectBindingPattern"; + SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 205] = "ArrayBindingPattern"; + SyntaxKind5[SyntaxKind5["BindingElement"] = 206] = "BindingElement"; + SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 207] = "ArrayLiteralExpression"; + SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 208] = "ObjectLiteralExpression"; + SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 209] = "PropertyAccessExpression"; + SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 210] = "ElementAccessExpression"; + SyntaxKind5[SyntaxKind5["CallExpression"] = 211] = "CallExpression"; + SyntaxKind5[SyntaxKind5["NewExpression"] = 212] = "NewExpression"; + SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 213] = "TaggedTemplateExpression"; + SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 214] = "TypeAssertionExpression"; + SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 215] = "ParenthesizedExpression"; + SyntaxKind5[SyntaxKind5["FunctionExpression"] = 216] = "FunctionExpression"; + SyntaxKind5[SyntaxKind5["ArrowFunction"] = 217] = "ArrowFunction"; + SyntaxKind5[SyntaxKind5["DeleteExpression"] = 218] = "DeleteExpression"; + SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 219] = "TypeOfExpression"; + SyntaxKind5[SyntaxKind5["VoidExpression"] = 220] = "VoidExpression"; + SyntaxKind5[SyntaxKind5["AwaitExpression"] = 221] = "AwaitExpression"; + SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 222] = "PrefixUnaryExpression"; + SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 223] = "PostfixUnaryExpression"; + SyntaxKind5[SyntaxKind5["BinaryExpression"] = 224] = "BinaryExpression"; + SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 225] = "ConditionalExpression"; + SyntaxKind5[SyntaxKind5["TemplateExpression"] = 226] = "TemplateExpression"; + SyntaxKind5[SyntaxKind5["YieldExpression"] = 227] = "YieldExpression"; + SyntaxKind5[SyntaxKind5["SpreadElement"] = 228] = "SpreadElement"; + SyntaxKind5[SyntaxKind5["ClassExpression"] = 229] = "ClassExpression"; + SyntaxKind5[SyntaxKind5["OmittedExpression"] = 230] = "OmittedExpression"; + SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 231] = "ExpressionWithTypeArguments"; + SyntaxKind5[SyntaxKind5["AsExpression"] = 232] = "AsExpression"; + SyntaxKind5[SyntaxKind5["NonNullExpression"] = 233] = "NonNullExpression"; + SyntaxKind5[SyntaxKind5["MetaProperty"] = 234] = "MetaProperty"; + SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 235] = "SyntheticExpression"; + SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 236] = "SatisfiesExpression"; + SyntaxKind5[SyntaxKind5["TemplateSpan"] = 237] = "TemplateSpan"; + SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 238] = "SemicolonClassElement"; + SyntaxKind5[SyntaxKind5["Block"] = 239] = "Block"; + SyntaxKind5[SyntaxKind5["EmptyStatement"] = 240] = "EmptyStatement"; + SyntaxKind5[SyntaxKind5["VariableStatement"] = 241] = "VariableStatement"; + SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 242] = "ExpressionStatement"; + SyntaxKind5[SyntaxKind5["IfStatement"] = 243] = "IfStatement"; + SyntaxKind5[SyntaxKind5["DoStatement"] = 244] = "DoStatement"; + SyntaxKind5[SyntaxKind5["WhileStatement"] = 245] = "WhileStatement"; + SyntaxKind5[SyntaxKind5["ForStatement"] = 246] = "ForStatement"; + SyntaxKind5[SyntaxKind5["ForInStatement"] = 247] = "ForInStatement"; + SyntaxKind5[SyntaxKind5["ForOfStatement"] = 248] = "ForOfStatement"; + SyntaxKind5[SyntaxKind5["ContinueStatement"] = 249] = "ContinueStatement"; + SyntaxKind5[SyntaxKind5["BreakStatement"] = 250] = "BreakStatement"; + SyntaxKind5[SyntaxKind5["ReturnStatement"] = 251] = "ReturnStatement"; + SyntaxKind5[SyntaxKind5["WithStatement"] = 252] = "WithStatement"; + SyntaxKind5[SyntaxKind5["SwitchStatement"] = 253] = "SwitchStatement"; + SyntaxKind5[SyntaxKind5["LabeledStatement"] = 254] = "LabeledStatement"; + SyntaxKind5[SyntaxKind5["ThrowStatement"] = 255] = "ThrowStatement"; + SyntaxKind5[SyntaxKind5["TryStatement"] = 256] = "TryStatement"; + SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 257] = "DebuggerStatement"; + SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 258] = "VariableDeclaration"; + SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 259] = "VariableDeclarationList"; + SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 260] = "FunctionDeclaration"; + SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 261] = "ClassDeclaration"; + SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 262] = "InterfaceDeclaration"; + SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 263] = "TypeAliasDeclaration"; + SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 264] = "EnumDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 265] = "ModuleDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleBlock"] = 266] = "ModuleBlock"; + SyntaxKind5[SyntaxKind5["CaseBlock"] = 267] = "CaseBlock"; + SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 268] = "NamespaceExportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 269] = "ImportEqualsDeclaration"; + SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 270] = "ImportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportClause"] = 271] = "ImportClause"; + SyntaxKind5[SyntaxKind5["NamespaceImport"] = 272] = "NamespaceImport"; + SyntaxKind5[SyntaxKind5["NamedImports"] = 273] = "NamedImports"; + SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 274] = "ImportSpecifier"; + SyntaxKind5[SyntaxKind5["ExportAssignment"] = 275] = "ExportAssignment"; + SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 276] = "ExportDeclaration"; + SyntaxKind5[SyntaxKind5["NamedExports"] = 277] = "NamedExports"; + SyntaxKind5[SyntaxKind5["NamespaceExport"] = 278] = "NamespaceExport"; + SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 279] = "ExportSpecifier"; + SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 280] = "MissingDeclaration"; + SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 281] = "ExternalModuleReference"; + SyntaxKind5[SyntaxKind5["JsxElement"] = 282] = "JsxElement"; + SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 283] = "JsxSelfClosingElement"; + SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 284] = "JsxOpeningElement"; + SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 285] = "JsxClosingElement"; + SyntaxKind5[SyntaxKind5["JsxFragment"] = 286] = "JsxFragment"; + SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 287] = "JsxOpeningFragment"; + SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 288] = "JsxClosingFragment"; + SyntaxKind5[SyntaxKind5["JsxAttribute"] = 289] = "JsxAttribute"; + SyntaxKind5[SyntaxKind5["JsxAttributes"] = 290] = "JsxAttributes"; + SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 291] = "JsxSpreadAttribute"; + SyntaxKind5[SyntaxKind5["JsxExpression"] = 292] = "JsxExpression"; + SyntaxKind5[SyntaxKind5["CaseClause"] = 293] = "CaseClause"; + SyntaxKind5[SyntaxKind5["DefaultClause"] = 294] = "DefaultClause"; + SyntaxKind5[SyntaxKind5["HeritageClause"] = 295] = "HeritageClause"; + SyntaxKind5[SyntaxKind5["CatchClause"] = 296] = "CatchClause"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 297] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 298] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 299] = "ImportTypeAssertionContainer"; + SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 300] = "PropertyAssignment"; + SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 301] = "ShorthandPropertyAssignment"; + SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 302] = "SpreadAssignment"; + SyntaxKind5[SyntaxKind5["EnumMember"] = 303] = "EnumMember"; + SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 304] = "UnparsedPrologue"; + SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 305] = "UnparsedPrepend"; + SyntaxKind5[SyntaxKind5["UnparsedText"] = 306] = "UnparsedText"; + SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 307] = "UnparsedInternalText"; + SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 308] = "UnparsedSyntheticReference"; + SyntaxKind5[SyntaxKind5["SourceFile"] = 309] = "SourceFile"; + SyntaxKind5[SyntaxKind5["Bundle"] = 310] = "Bundle"; + SyntaxKind5[SyntaxKind5["UnparsedSource"] = 311] = "UnparsedSource"; + SyntaxKind5[SyntaxKind5["InputFiles"] = 312] = "InputFiles"; + SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 313] = "JSDocTypeExpression"; + SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 314] = "JSDocNameReference"; + SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 315] = "JSDocMemberName"; + SyntaxKind5[SyntaxKind5["JSDocAllType"] = 316] = "JSDocAllType"; + SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 317] = "JSDocUnknownType"; + SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 318] = "JSDocNullableType"; + SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 319] = "JSDocNonNullableType"; + SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 320] = "JSDocOptionalType"; + SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 321] = "JSDocFunctionType"; + SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 322] = "JSDocVariadicType"; + SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 323] = "JSDocNamepathType"; + SyntaxKind5[SyntaxKind5["JSDoc"] = 324] = "JSDoc"; + SyntaxKind5[SyntaxKind5["JSDocComment"] = 324 /* JSDoc */] = "JSDocComment"; + SyntaxKind5[SyntaxKind5["JSDocText"] = 325] = "JSDocText"; + SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 326] = "JSDocTypeLiteral"; + SyntaxKind5[SyntaxKind5["JSDocSignature"] = 327] = "JSDocSignature"; + SyntaxKind5[SyntaxKind5["JSDocLink"] = 328] = "JSDocLink"; + SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 329] = "JSDocLinkCode"; + SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 330] = "JSDocLinkPlain"; + SyntaxKind5[SyntaxKind5["JSDocTag"] = 331] = "JSDocTag"; + SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 332] = "JSDocAugmentsTag"; + SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 333] = "JSDocImplementsTag"; + SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 334] = "JSDocAuthorTag"; + SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 335] = "JSDocDeprecatedTag"; + SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 336] = "JSDocClassTag"; + SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 337] = "JSDocPublicTag"; + SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 338] = "JSDocPrivateTag"; + SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 339] = "JSDocProtectedTag"; + SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 340] = "JSDocReadonlyTag"; + SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 341] = "JSDocOverrideTag"; + SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 342] = "JSDocCallbackTag"; + SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 343] = "JSDocOverloadTag"; + SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 344] = "JSDocEnumTag"; + SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 345] = "JSDocParameterTag"; + SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 346] = "JSDocReturnTag"; + SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 347] = "JSDocThisTag"; + SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 348] = "JSDocTypeTag"; + SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 349] = "JSDocTemplateTag"; + SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 350] = "JSDocTypedefTag"; + SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 351] = "JSDocSeeTag"; + SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 352] = "JSDocPropertyTag"; + SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 353] = "JSDocThrowsTag"; + SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 354] = "JSDocSatisfiesTag"; + SyntaxKind5[SyntaxKind5["SyntaxList"] = 355] = "SyntaxList"; + SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 356] = "NotEmittedStatement"; + SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 357] = "PartiallyEmittedExpression"; + SyntaxKind5[SyntaxKind5["CommaListExpression"] = 358] = "CommaListExpression"; + SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 359] = "MergeDeclarationMarker"; + SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 360] = "EndOfDeclarationMarker"; + SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression"; + SyntaxKind5[SyntaxKind5["Count"] = 362] = "Count"; SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment"; SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment"; SyntaxKind5[SyntaxKind5["LastCompoundAssignment"] = 78 /* CaretEqualsToken */] = "LastCompoundAssignment"; - SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 81 /* BreakKeyword */] = "FirstReservedWord"; - SyntaxKind5[SyntaxKind5["LastReservedWord"] = 116 /* WithKeyword */] = "LastReservedWord"; - SyntaxKind5[SyntaxKind5["FirstKeyword"] = 81 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 162 /* OfKeyword */] = "LastKeyword"; - SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 117 /* ImplementsKeyword */] = "FirstFutureReservedWord"; - SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 125 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 179 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 202 /* ImportType */] = "LastTypeNode"; + SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 82 /* BreakKeyword */] = "FirstReservedWord"; + SyntaxKind5[SyntaxKind5["LastReservedWord"] = 117 /* WithKeyword */] = "LastReservedWord"; + SyntaxKind5[SyntaxKind5["FirstKeyword"] = 82 /* BreakKeyword */] = "FirstKeyword"; + SyntaxKind5[SyntaxKind5["LastKeyword"] = 163 /* OfKeyword */] = "LastKeyword"; + SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 118 /* ImplementsKeyword */] = "FirstFutureReservedWord"; + SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 126 /* YieldKeyword */] = "LastFutureReservedWord"; + SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 180 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind5[SyntaxKind5["LastTypeNode"] = 203 /* ImportType */] = "LastTypeNode"; SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 18 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind5[SyntaxKind5["LastPunctuation"] = 78 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 162 /* LastKeyword */] = "LastToken"; + SyntaxKind5[SyntaxKind5["LastToken"] = 163 /* LastKeyword */] = "LastToken"; SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 8 /* NumericLiteral */] = "FirstLiteralToken"; @@ -3937,15 +3938,15 @@ SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 17 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 29 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 78 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 240 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 163 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; - SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind5[SyntaxKind5["FirstStatement"] = 241 /* VariableStatement */] = "FirstStatement"; + SyntaxKind5[SyntaxKind5["LastStatement"] = 257 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind5[SyntaxKind5["FirstNode"] = 164 /* QualifiedName */] = "FirstNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 313 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 354 /* JSDocSatisfiesTag */] = "LastJSDocNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 331 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 354 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; + SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 127 /* AbstractKeyword */] = "FirstContextualKeyword"; + SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 163 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind5; })(SyntaxKind || {}); NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { @@ -4444,7 +4445,6 @@ TypeFlags2[TypeFlags2["DefinitelyFalsy"] = 117632] = "DefinitelyFalsy"; TypeFlags2[TypeFlags2["PossiblyFalsy"] = 117724] = "PossiblyFalsy"; TypeFlags2[TypeFlags2["Intrinsic"] = 67359327] = "Intrinsic"; - TypeFlags2[TypeFlags2["Primitive"] = 134348796] = "Primitive"; TypeFlags2[TypeFlags2["StringLike"] = 402653316] = "StringLike"; TypeFlags2[TypeFlags2["NumberLike"] = 296] = "NumberLike"; TypeFlags2[TypeFlags2["BigIntLike"] = 2112] = "BigIntLike"; @@ -4452,6 +4452,7 @@ TypeFlags2[TypeFlags2["EnumLike"] = 1056] = "EnumLike"; TypeFlags2[TypeFlags2["ESSymbolLike"] = 12288] = "ESSymbolLike"; TypeFlags2[TypeFlags2["VoidLike"] = 49152] = "VoidLike"; + TypeFlags2[TypeFlags2["Primitive"] = 402784252] = "Primitive"; TypeFlags2[TypeFlags2["DefinitelyNonNullable"] = 470302716] = "DefinitelyNonNullable"; TypeFlags2[TypeFlags2["DisjointDomains"] = 469892092] = "DisjointDomains"; TypeFlags2[TypeFlags2["UnionOrIntersection"] = 3145728] = "UnionOrIntersection"; @@ -4465,7 +4466,7 @@ TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable"; TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton"; TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable"; - TypeFlags2[TypeFlags2["IncludesMask"] = 205258751] = "IncludesMask"; + TypeFlags2[TypeFlags2["IncludesMask"] = 473694207] = "IncludesMask"; TypeFlags2[TypeFlags2["IncludesMissingType"] = 262144 /* TypeParameter */] = "IncludesMissingType"; TypeFlags2[TypeFlags2["IncludesNonWideningType"] = 4194304 /* Index */] = "IncludesNonWideningType"; TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard"; @@ -4646,6 +4647,7 @@ })(DiagnosticCategory || {}); ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind3) => { ModuleResolutionKind3[ModuleResolutionKind3["Classic"] = 1] = "Classic"; + ModuleResolutionKind3[ModuleResolutionKind3["NodeJs"] = 2] = "NodeJs"; ModuleResolutionKind3[ModuleResolutionKind3["Node10"] = 2] = "Node10"; ModuleResolutionKind3[ModuleResolutionKind3["Node16"] = 3] = "Node16"; ModuleResolutionKind3[ModuleResolutionKind3["NodeNext"] = 99] = "NodeNext"; @@ -5210,12 +5212,6 @@ kind: 4 /* MultiLine */ } }; - DeprecationVersion = /* @__PURE__ */ ((DeprecationVersion2) => { - DeprecationVersion2["v5_0"] = "5.0"; - DeprecationVersion2["v5_5"] = "5.5"; - DeprecationVersion2["v6_0"] = "6.0"; - return DeprecationVersion2; - })(DeprecationVersion || {}); } }); @@ -8140,12 +8136,14 @@ Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."), An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."), Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."), - Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecat_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), - Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."), + Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), + Option_0_has_been_removed_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."), Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."), Option_0_is_redundant_and_cannot_be_specified_with_option_1: diag(5104, 1 /* Error */, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."), Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: diag(5105, 1 /* Error */, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."), Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), + Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), + Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -9582,8 +9580,8 @@ var text = textInitial; var pos; var end; - var startPos; - var tokenPos; + var fullStartPos; + var tokenStart; var token; var tokenValue; var tokenFlags; @@ -9591,18 +9589,21 @@ var inJSDocType = 0; setText(text, start, length2); var scanner2 = { - getStartPos: () => startPos, + getTokenFullStart: () => fullStartPos, + getStartPos: () => fullStartPos, + getTokenEnd: () => pos, getTextPos: () => pos, getToken: () => token, - getTokenPos: () => tokenPos, - getTokenText: () => text.substring(tokenPos, pos), + getTokenStart: () => tokenStart, + getTokenPos: () => tokenStart, + getTokenText: () => text.substring(tokenStart, pos), getTokenValue: () => tokenValue, hasUnicodeEscape: () => (tokenFlags & 1024 /* UnicodeEscape */) !== 0, hasExtendedUnicodeEscape: () => (tokenFlags & 8 /* ExtendedUnicodeEscape */) !== 0, hasPrecedingLineBreak: () => (tokenFlags & 1 /* PrecedingLineBreak */) !== 0, hasPrecedingJSDocComment: () => (tokenFlags & 2 /* PrecedingJSDocComment */) !== 0, - isIdentifier: () => token === 79 /* Identifier */ || token > 116 /* LastReservedWord */, - isReservedWord: () => token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */, + isIdentifier: () => token === 79 /* Identifier */ || token > 117 /* LastReservedWord */, + isReservedWord: () => token >= 82 /* FirstReservedWord */ && token <= 117 /* LastReservedWord */, isUnterminated: () => (tokenFlags & 4 /* Unterminated */) !== 0, getCommentDirectives: () => commentDirectives, getNumericLiteralFlags: () => tokenFlags & 1008 /* NumericLiteralFlags */, @@ -9622,6 +9623,7 @@ reScanInvalidIdentifier, scanJsxToken, scanJsDocToken, + scanJSDocCommentTextToken, scan, getText, clearCommentDirectives, @@ -9629,7 +9631,8 @@ setScriptTarget, setLanguageVariant, setOnError, - setTextPos, + resetTokenState, + setTextPos: resetTokenState, setInJSDocType, tryScan, lookAhead, @@ -9639,7 +9642,7 @@ Object.defineProperty(scanner2, "__debugShowCurrentPositionInText", { get: () => { const text2 = scanner2.getText(); - return text2.slice(0, scanner2.getStartPos()) + "\u2551" + text2.slice(scanner2.getStartPos()); + return text2.slice(0, scanner2.getTokenFullStart()) + "\u2551" + text2.slice(scanner2.getTokenFullStart()); } }); } @@ -10162,11 +10165,11 @@ } } function scan() { - startPos = pos; + fullStartPos = pos; tokenFlags = 0 /* None */; let asteriskSeen = false; while (true) { - tokenPos = pos; + tokenStart = pos; if (pos >= end) { return token = 1 /* EndOfFileToken */; } @@ -10325,9 +10328,9 @@ } commentDirectives = appendIfCommentDirective( commentDirectives, - text.slice(tokenPos, pos), + text.slice(tokenStart, pos), commentDirectiveRegExSingleLine, - tokenPos + tokenStart ); if (skipTrivia2) { continue; @@ -10341,7 +10344,7 @@ tokenFlags |= 2 /* PrecedingJSDocComment */; } let commentClosed = false; - let lastLineStart = tokenPos; + let lastLineStart = tokenStart; while (pos < end) { const ch2 = text.charCodeAt(pos); if (ch2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { @@ -10619,7 +10622,7 @@ } function reScanInvalidIdentifier() { Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."); - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; tokenFlags = 0; const ch = codePointAt(text, pos); const identifierKind = scanIdentifier(ch, 99 /* ESNext */); @@ -10635,7 +10638,7 @@ pos += charSize(ch); while (pos < end && isIdentifierPart(ch = codePointAt(text, pos), languageVersion2)) pos += charSize(ch); - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } @@ -10666,12 +10669,12 @@ } function reScanAsteriskEqualsToken() { Debug.assert(token === 66 /* AsteriskEqualsToken */, "'reScanAsteriskEqualsToken' should only be called on a '*='"); - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 63 /* EqualsToken */; } function reScanSlashToken() { if (token === 43 /* SlashToken */ || token === 68 /* SlashEqualsToken */) { - let p = tokenPos + 1; + let p = tokenStart + 1; let inEscape = false; let inCharacterClass = false; while (true) { @@ -10704,7 +10707,7 @@ p++; } pos = p; - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); token = 13 /* RegularExpressionLiteral */; } return token; @@ -10737,41 +10740,41 @@ } function reScanTemplateToken(isTaggedTemplate) { Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); - pos = tokenPos; + pos = tokenStart; return token = scanTemplateAndSetTokenValue(isTaggedTemplate); } function reScanTemplateHeadOrNoSubstitutionTemplate() { - pos = tokenPos; + pos = tokenStart; return token = scanTemplateAndSetTokenValue( /* isTaggedTemplate */ true ); } function reScanJsxToken(allowMultilineJsxText = true) { - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; return token = scanJsxToken(allowMultilineJsxText); } function reScanLessThanToken() { if (token === 47 /* LessThanLessThanToken */) { - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 29 /* LessThanToken */; } return token; } function reScanHashToken() { if (token === 80 /* PrivateIdentifier */) { - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 62 /* HashToken */; } return token; } function reScanQuestionToken() { Debug.assert(token === 60 /* QuestionQuestionToken */, "'reScanQuestionToken' should only be called on a '??'"); - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 57 /* QuestionToken */; } function scanJsxToken(allowMultilineJsxText = true) { - startPos = tokenPos = pos; + fullStartPos = tokenStart = pos; if (pos >= end) { return token = 1 /* EndOfFileToken */; } @@ -10816,7 +10819,7 @@ } pos++; } - tokenValue = text.substring(startPos, pos); + tokenValue = text.substring(fullStartPos, pos); return firstNonWhitespace === -1 ? 12 /* JsxTextAllWhiteSpaces */ : 11 /* JsxText */; } function scanJsxIdentifier() { @@ -10850,7 +10853,7 @@ return token; } function scanJsxAttributeValue() { - startPos = pos; + fullStartPos = pos; switch (text.charCodeAt(pos)) { case 34 /* doubleQuote */: case 39 /* singleQuote */: @@ -10864,11 +10867,32 @@ } } function reScanJsxAttributeValue() { - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; return scanJsxAttributeValue(); } + function scanJSDocCommentTextToken(inBackticks) { + fullStartPos = tokenStart = pos; + tokenFlags = 0 /* None */; + if (pos >= end) { + return token = 1 /* EndOfFileToken */; + } + for (let ch = text.charCodeAt(pos); pos < end && (!isLineBreak(ch) && ch !== 96 /* backtick */); ch = codePointAt(text, ++pos)) { + if (!inBackticks) { + if (ch === 123 /* openBrace */) { + break; + } else if (ch === 64 /* at */ && pos - 1 >= 0 && isWhiteSpaceSingleLine(text.charCodeAt(pos - 1)) && !(pos + 1 < end && isWhiteSpaceLike(text.charCodeAt(pos + 1)))) { + break; + } + } + } + if (pos === tokenStart) { + return scanJsDocToken(); + } + tokenValue = text.substring(tokenStart, pos); + return token = 81 /* JSDocCommentTextToken */; + } function scanJsDocToken() { - startPos = tokenPos = pos; + fullStartPos = tokenStart = pos; tokenFlags = 0 /* None */; if (pos >= end) { return token = 1 /* EndOfFileToken */; @@ -10940,7 +10964,7 @@ let char = ch; while (pos < end && isIdentifierPart(char = codePointAt(text, pos), languageVersion) || text.charCodeAt(pos) === 45 /* minus */) pos += charSize(char); - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); if (char === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } @@ -10951,16 +10975,16 @@ } function speculationHelper(callback, isLookahead) { const savePos = pos; - const saveStartPos = startPos; - const saveTokenPos = tokenPos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; const saveToken = token; const saveTokenValue = tokenValue; const saveTokenFlags = tokenFlags; const result = callback(); if (!result || isLookahead) { pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; token = saveToken; tokenValue = saveTokenValue; tokenFlags = saveTokenFlags; @@ -10970,8 +10994,8 @@ function scanRange(start2, length3, callback) { const saveEnd = end; const savePos = pos; - const saveStartPos = startPos; - const saveTokenPos = tokenPos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; const saveToken = token; const saveTokenValue = tokenValue; const saveTokenFlags = tokenFlags; @@ -10980,8 +11004,8 @@ const result = callback(); end = saveEnd; pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; token = saveToken; tokenValue = saveTokenValue; tokenFlags = saveTokenFlags; @@ -11011,7 +11035,7 @@ function setText(newText, start2, length3) { text = newText || ""; end = length3 === void 0 ? text.length : start2 + length3; - setTextPos(start2 || 0); + resetTokenState(start2 || 0); } function setOnError(errorCallback) { onError = errorCallback; @@ -11022,11 +11046,11 @@ function setLanguageVariant(variant) { languageVariant = variant; } - function setTextPos(textPos) { - Debug.assert(textPos >= 0); - pos = textPos; - startPos = textPos; - tokenPos = textPos; + function resetTokenState(position) { + Debug.assert(position >= 0); + pos = position; + fullStartPos = position; + tokenStart = position; token = 0 /* Unknown */; tokenValue = void 0; tokenFlags = 0 /* None */; @@ -11059,88 +11083,88 @@ "use strict"; init_ts2(); textToKeywordObj = { - abstract: 126 /* AbstractKeyword */, - accessor: 127 /* AccessorKeyword */, - any: 131 /* AnyKeyword */, - as: 128 /* AsKeyword */, - asserts: 129 /* AssertsKeyword */, - assert: 130 /* AssertKeyword */, - bigint: 160 /* BigIntKeyword */, - boolean: 134 /* BooleanKeyword */, - break: 81 /* BreakKeyword */, - case: 82 /* CaseKeyword */, - catch: 83 /* CatchKeyword */, - class: 84 /* ClassKeyword */, - continue: 86 /* ContinueKeyword */, - const: 85 /* ConstKeyword */, - ["constructor"]: 135 /* ConstructorKeyword */, - debugger: 87 /* DebuggerKeyword */, - declare: 136 /* DeclareKeyword */, - default: 88 /* DefaultKeyword */, - delete: 89 /* DeleteKeyword */, - do: 90 /* DoKeyword */, - else: 91 /* ElseKeyword */, - enum: 92 /* EnumKeyword */, - export: 93 /* ExportKeyword */, - extends: 94 /* ExtendsKeyword */, - false: 95 /* FalseKeyword */, - finally: 96 /* FinallyKeyword */, - for: 97 /* ForKeyword */, - from: 158 /* FromKeyword */, - function: 98 /* FunctionKeyword */, - get: 137 /* GetKeyword */, - if: 99 /* IfKeyword */, - implements: 117 /* ImplementsKeyword */, - import: 100 /* ImportKeyword */, - in: 101 /* InKeyword */, - infer: 138 /* InferKeyword */, - instanceof: 102 /* InstanceOfKeyword */, - interface: 118 /* InterfaceKeyword */, - intrinsic: 139 /* IntrinsicKeyword */, - is: 140 /* IsKeyword */, - keyof: 141 /* KeyOfKeyword */, - let: 119 /* LetKeyword */, - module: 142 /* ModuleKeyword */, - namespace: 143 /* NamespaceKeyword */, - never: 144 /* NeverKeyword */, - new: 103 /* NewKeyword */, - null: 104 /* NullKeyword */, - number: 148 /* NumberKeyword */, - object: 149 /* ObjectKeyword */, - package: 120 /* PackageKeyword */, - private: 121 /* PrivateKeyword */, - protected: 122 /* ProtectedKeyword */, - public: 123 /* PublicKeyword */, - override: 161 /* OverrideKeyword */, - out: 145 /* OutKeyword */, - readonly: 146 /* ReadonlyKeyword */, - require: 147 /* RequireKeyword */, - global: 159 /* GlobalKeyword */, - return: 105 /* ReturnKeyword */, - satisfies: 150 /* SatisfiesKeyword */, - set: 151 /* SetKeyword */, - static: 124 /* StaticKeyword */, - string: 152 /* StringKeyword */, - super: 106 /* SuperKeyword */, - switch: 107 /* SwitchKeyword */, - symbol: 153 /* SymbolKeyword */, - this: 108 /* ThisKeyword */, - throw: 109 /* ThrowKeyword */, - true: 110 /* TrueKeyword */, - try: 111 /* TryKeyword */, - type: 154 /* TypeKeyword */, - typeof: 112 /* TypeOfKeyword */, - undefined: 155 /* UndefinedKeyword */, - unique: 156 /* UniqueKeyword */, - unknown: 157 /* UnknownKeyword */, - var: 113 /* VarKeyword */, - void: 114 /* VoidKeyword */, - while: 115 /* WhileKeyword */, - with: 116 /* WithKeyword */, - yield: 125 /* YieldKeyword */, - async: 132 /* AsyncKeyword */, - await: 133 /* AwaitKeyword */, - of: 162 /* OfKeyword */ + abstract: 127 /* AbstractKeyword */, + accessor: 128 /* AccessorKeyword */, + any: 132 /* AnyKeyword */, + as: 129 /* AsKeyword */, + asserts: 130 /* AssertsKeyword */, + assert: 131 /* AssertKeyword */, + bigint: 161 /* BigIntKeyword */, + boolean: 135 /* BooleanKeyword */, + break: 82 /* BreakKeyword */, + case: 83 /* CaseKeyword */, + catch: 84 /* CatchKeyword */, + class: 85 /* ClassKeyword */, + continue: 87 /* ContinueKeyword */, + const: 86 /* ConstKeyword */, + ["constructor"]: 136 /* ConstructorKeyword */, + debugger: 88 /* DebuggerKeyword */, + declare: 137 /* DeclareKeyword */, + default: 89 /* DefaultKeyword */, + delete: 90 /* DeleteKeyword */, + do: 91 /* DoKeyword */, + else: 92 /* ElseKeyword */, + enum: 93 /* EnumKeyword */, + export: 94 /* ExportKeyword */, + extends: 95 /* ExtendsKeyword */, + false: 96 /* FalseKeyword */, + finally: 97 /* FinallyKeyword */, + for: 98 /* ForKeyword */, + from: 159 /* FromKeyword */, + function: 99 /* FunctionKeyword */, + get: 138 /* GetKeyword */, + if: 100 /* IfKeyword */, + implements: 118 /* ImplementsKeyword */, + import: 101 /* ImportKeyword */, + in: 102 /* InKeyword */, + infer: 139 /* InferKeyword */, + instanceof: 103 /* InstanceOfKeyword */, + interface: 119 /* InterfaceKeyword */, + intrinsic: 140 /* IntrinsicKeyword */, + is: 141 /* IsKeyword */, + keyof: 142 /* KeyOfKeyword */, + let: 120 /* LetKeyword */, + module: 143 /* ModuleKeyword */, + namespace: 144 /* NamespaceKeyword */, + never: 145 /* NeverKeyword */, + new: 104 /* NewKeyword */, + null: 105 /* NullKeyword */, + number: 149 /* NumberKeyword */, + object: 150 /* ObjectKeyword */, + package: 121 /* PackageKeyword */, + private: 122 /* PrivateKeyword */, + protected: 123 /* ProtectedKeyword */, + public: 124 /* PublicKeyword */, + override: 162 /* OverrideKeyword */, + out: 146 /* OutKeyword */, + readonly: 147 /* ReadonlyKeyword */, + require: 148 /* RequireKeyword */, + global: 160 /* GlobalKeyword */, + return: 106 /* ReturnKeyword */, + satisfies: 151 /* SatisfiesKeyword */, + set: 152 /* SetKeyword */, + static: 125 /* StaticKeyword */, + string: 153 /* StringKeyword */, + super: 107 /* SuperKeyword */, + switch: 108 /* SwitchKeyword */, + symbol: 154 /* SymbolKeyword */, + this: 109 /* ThisKeyword */, + throw: 110 /* ThrowKeyword */, + true: 111 /* TrueKeyword */, + try: 112 /* TryKeyword */, + type: 155 /* TypeKeyword */, + typeof: 113 /* TypeOfKeyword */, + undefined: 156 /* UndefinedKeyword */, + unique: 157 /* UniqueKeyword */, + unknown: 158 /* UnknownKeyword */, + var: 114 /* VarKeyword */, + void: 115 /* VoidKeyword */, + while: 116 /* WhileKeyword */, + with: 117 /* WithKeyword */, + yield: 126 /* YieldKeyword */, + async: 133 /* AsyncKeyword */, + await: 134 /* AwaitKeyword */, + of: 163 /* OfKeyword */ }; textToKeyword = new Map(Object.entries(textToKeywordObj)); textToToken = new Map(Object.entries({ @@ -11362,16 +11386,16 @@ ); } function getTypeParameterOwner(d) { - if (d && d.kind === 165 /* TypeParameter */) { + if (d && d.kind === 166 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 261 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 262 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent2) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 173 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 174 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -11397,14 +11421,14 @@ node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 257 /* VariableDeclaration */) { + if (node.kind === 258 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 258 /* VariableDeclarationList */) { + if (node && node.kind === 259 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 240 /* VariableStatement */) { + if (node && node.kind === 241 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -11536,30 +11560,30 @@ return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 223 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { + if (expr.kind === 224 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return expr.name; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 214 /* ParenthesizedExpression */: { + case 215 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 253 /* LabeledStatement */: { + case 254 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -11590,16 +11614,16 @@ switch (declaration.kind) { case 79 /* Identifier */: return declaration; - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: { + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 163 /* QualifiedName */) { + if (name.kind === 164 /* QualifiedName */) { return name.right; } break; } - case 210 /* CallExpression */: - case 223 /* BinaryExpression */: { + case 211 /* CallExpression */: + case 224 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -11615,15 +11639,15 @@ return void 0; } } - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 343 /* JSDocEnumTag */: + case 344 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -11870,10 +11894,10 @@ return getJSDocTags(node).filter((doc) => doc.kind === kind); } function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 324 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 325 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 327 /* JSDocLink */ ? "link" : link.kind === 328 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 328 /* JSDocLink */ ? "link" : link.kind === 329 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -11889,7 +11913,7 @@ return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 323 /* JSDoc */); + Debug.assert(node.parent.kind === 324 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -11917,7 +11941,7 @@ return node.kind === 79 /* Identifier */ || node.kind === 80 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 175 /* SetAccessor */ || node.kind === 174 /* GetAccessor */; + return node.kind === 176 /* SetAccessor */ || node.kind === 175 /* GetAccessor */; } function isPropertyAccessChain(node) { return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); @@ -11930,7 +11954,7 @@ } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */ || kind === 210 /* CallExpression */ || kind === 232 /* NonNullExpression */); + return !!(node.flags & 32 /* OptionalChain */) && (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */ || kind === 211 /* CallExpression */ || kind === 233 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -11942,7 +11966,7 @@ return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + return node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -11954,34 +11978,34 @@ return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 249 /* BreakStatement */ || node.kind === 248 /* ContinueStatement */; + return node.kind === 250 /* BreakStatement */ || node.kind === 249 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 277 /* NamespaceExport */ || node.kind === 276 /* NamedExports */; + return node.kind === 278 /* NamespaceExport */ || node.kind === 277 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 305 /* UnparsedText */: - case 306 /* UnparsedInternalText */: + case 306 /* UnparsedText */: + case 307 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 303 /* UnparsedPrologue */ || node.kind === 307 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 304 /* UnparsedPrologue */ || node.kind === 308 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 351 /* JSDocPropertyTag */ || node.kind === 344 /* JSDocParameterTag */; + return node.kind === 352 /* JSDocPropertyTag */ || node.kind === 345 /* JSDocParameterTag */; } function isNode(node) { return isNodeKind(node.kind); } function isNodeKind(kind) { - return kind >= 163 /* FirstNode */; + return kind >= 164 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 162 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 163 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -11997,11 +12021,11 @@ } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: case 13 /* RegularExpressionLiteral */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: return true; } return false; @@ -12021,23 +12045,23 @@ } function isTypeOnlyImportDeclaration(node) { switch (node.kind) { - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.isTypeOnly; - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: return node.isTypeOnly; } return false; } function isTypeOnlyExportDeclaration(node) { switch (node.kind) { - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause; - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return node.parent.isTypeOnly; } return false; @@ -12067,21 +12091,21 @@ } function isModifierKind(token) { switch (token) { - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 132 /* AsyncKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 88 /* DefaultKeyword */: - case 93 /* ExportKeyword */: - case 101 /* InKeyword */: - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 124 /* StaticKeyword */: - case 145 /* OutKeyword */: - case 161 /* OverrideKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 133 /* AsyncKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 89 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 102 /* InKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 125 /* StaticKeyword */: + case 146 /* OutKeyword */: + case 162 /* OverrideKeyword */: return true; } return false; @@ -12090,22 +12114,22 @@ return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 124 /* StaticKeyword */ || idToken === 161 /* OverrideKeyword */ || idToken === 127 /* AccessorKeyword */; + return isParameterPropertyModifier(idToken) || idToken === 125 /* StaticKeyword */ || idToken === 162 /* OverrideKeyword */ || idToken === 128 /* AccessorKeyword */; } function isModifier(node) { return isModifierKind(node.kind); } function isEntityName(node) { const kind = node.kind; - return kind === 163 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 164 /* QualifiedName */ || kind === 79 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 164 /* ComputedPropertyName */; + return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 165 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 203 /* ObjectBindingPattern */ || kind === 204 /* ArrayBindingPattern */; + return kind === 79 /* Identifier */ || kind === 204 /* ObjectBindingPattern */ || kind === 205 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -12117,17 +12141,17 @@ return node && isFunctionLikeDeclarationKind(node.kind); } function isBooleanLiteral(node) { - return node.kind === 110 /* TrueKeyword */ || node.kind === 95 /* FalseKeyword */; + return node.kind === 111 /* TrueKeyword */ || node.kind === 96 /* FalseKeyword */; } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: return false; @@ -12135,14 +12159,14 @@ } function isFunctionLikeKind(kind) { switch (kind) { - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 181 /* FunctionType */: - case 320 /* JSDocFunctionType */: - case 182 /* ConstructorType */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 182 /* FunctionType */: + case 321 /* JSDocFunctionType */: + case 183 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -12153,22 +12177,22 @@ } function isClassElement(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 169 /* PropertyDeclaration */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 178 /* IndexSignature */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 237 /* SemicolonClassElement */; + return kind === 174 /* Constructor */ || kind === 170 /* PropertyDeclaration */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 179 /* IndexSignature */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 238 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */); + return node && (node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */); } function isAccessor(node) { - return node && (node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */); + return node && (node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -12176,10 +12200,10 @@ } function isNamedClassElement(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: return true; default: return false; @@ -12190,22 +12214,22 @@ } function isTypeElement(node) { const kind = node.kind; - return kind === 177 /* ConstructSignature */ || kind === 176 /* CallSignature */ || kind === 168 /* PropertySignature */ || kind === 170 /* MethodSignature */ || kind === 178 /* IndexSignature */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 178 /* ConstructSignature */ || kind === 177 /* CallSignature */ || kind === 169 /* PropertySignature */ || kind === 171 /* MethodSignature */ || kind === 179 /* IndexSignature */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 301 /* SpreadAssignment */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 302 /* SpreadAssignment */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return true; } return false; @@ -12213,23 +12237,23 @@ function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 204 /* ArrayBindingPattern */ || kind === 203 /* ObjectBindingPattern */; + return kind === 205 /* ArrayBindingPattern */ || kind === 204 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 206 /* ArrayLiteralExpression */ || kind === 207 /* ObjectLiteralExpression */; + return kind === 207 /* ArrayLiteralExpression */ || kind === 208 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 205 /* BindingElement */ || kind === 229 /* OmittedExpression */; + return kind === 206 /* BindingElement */ || kind === 230 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: return true; } return false; @@ -12242,40 +12266,40 @@ } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 203 /* ObjectBindingPattern */: - case 207 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 208 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return true; } return false; } function isArrayBindingOrAssignmentElement(node) { switch (node.kind) { - case 205 /* BindingElement */: - case 229 /* OmittedExpression */: - case 227 /* SpreadElement */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: + case 206 /* BindingElement */: + case 230 /* OmittedExpression */: + case 228 /* SpreadElement */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return true; } return isAssignmentExpression( @@ -12286,50 +12310,50 @@ } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */; + return kind === 209 /* PropertyAccessExpression */ || kind === 164 /* QualifiedName */ || kind === 203 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */; + return kind === 209 /* PropertyAccessExpression */ || kind === 164 /* QualifiedName */; } function isCallLikeExpression(node) { switch (node.kind) { - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 167 /* Decorator */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 168 /* Decorator */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 210 /* CallExpression */ || node.kind === 211 /* NewExpression */; + return node.kind === 211 /* CallExpression */ || node.kind === 212 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 225 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; + return kind === 226 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 211 /* NewExpression */: - case 210 /* CallExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: - case 212 /* TaggedTemplateExpression */: - case 206 /* ArrayLiteralExpression */: - case 214 /* ParenthesizedExpression */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 212 /* NewExpression */: + case 211 /* CallExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: + case 213 /* TaggedTemplateExpression */: + case 207 /* ArrayLiteralExpression */: + case 215 /* ParenthesizedExpression */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 13 /* RegularExpressionLiteral */: @@ -12337,17 +12361,17 @@ case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: - case 108 /* ThisKeyword */: - case 110 /* TrueKeyword */: - case 106 /* SuperKeyword */: - case 232 /* NonNullExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 233 /* MetaProperty */: - case 100 /* ImportKeyword */: - case 279 /* MissingDeclaration */: + case 226 /* TemplateExpression */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 109 /* ThisKeyword */: + case 111 /* TrueKeyword */: + case 107 /* SuperKeyword */: + case 233 /* NonNullExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 234 /* MetaProperty */: + case 101 /* ImportKeyword */: + case 280 /* MissingDeclaration */: return true; default: return false; @@ -12358,13 +12382,13 @@ } function isUnaryExpressionKind(kind) { switch (kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: - case 217 /* DeleteExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 220 /* AwaitExpression */: - case 213 /* TypeAssertionExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 218 /* DeleteExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 221 /* AwaitExpression */: + case 214 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -12372,9 +12396,9 @@ } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return true; - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; default: return false; @@ -12382,10 +12406,10 @@ } function isLiteralTypeLiteral(node) { switch (node.kind) { - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 221 /* PrefixUnaryExpression */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 222 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -12396,16 +12420,16 @@ } function isExpressionKind(kind) { switch (kind) { - case 224 /* ConditionalExpression */: - case 226 /* YieldExpression */: - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 227 /* SpreadElement */: - case 231 /* AsExpression */: - case 229 /* OmittedExpression */: - case 357 /* CommaListExpression */: - case 356 /* PartiallyEmittedExpression */: - case 235 /* SatisfiesExpression */: + case 225 /* ConditionalExpression */: + case 227 /* YieldExpression */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 228 /* SpreadElement */: + case 232 /* AsExpression */: + case 230 /* OmittedExpression */: + case 358 /* CommaListExpression */: + case 357 /* PartiallyEmittedExpression */: + case 236 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -12413,20 +12437,20 @@ } function isAssertionExpression(node) { const kind = node.kind; - return kind === 213 /* TypeAssertionExpression */ || kind === 231 /* AsExpression */; + return kind === 214 /* TypeAssertionExpression */ || kind === 232 /* AsExpression */; } function isNotEmittedOrPartiallyEmittedNode(node) { return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return true; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -12444,7 +12468,7 @@ return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); } function isForInOrOfStatement(node) { - return node.kind === 246 /* ForInStatement */ || node.kind === 247 /* ForOfStatement */; + return node.kind === 247 /* ForInStatement */ || node.kind === 248 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -12457,89 +12481,89 @@ } function isModuleBody(node) { const kind = node.kind; - return kind === 265 /* ModuleBlock */ || kind === 264 /* ModuleDeclaration */ || kind === 79 /* Identifier */; + return kind === 266 /* ModuleBlock */ || kind === 265 /* ModuleDeclaration */ || kind === 79 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 265 /* ModuleBlock */ || kind === 264 /* ModuleDeclaration */; + return kind === 266 /* ModuleBlock */ || kind === 265 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 264 /* ModuleDeclaration */; + return kind === 79 /* Identifier */ || kind === 265 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 272 /* NamedImports */ || kind === 271 /* NamespaceImport */; + return kind === 273 /* NamedImports */ || kind === 272 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */ || node.kind === 263 /* EnumDeclaration */; + return node.kind === 265 /* ModuleDeclaration */ || node.kind === 264 /* EnumDeclaration */; } function canHaveSymbol(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 205 /* BindingElement */: - case 210 /* CallExpression */: - case 176 /* CallSignature */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 172 /* ClassStaticBlockDeclaration */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 209 /* ElementAccessExpression */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: - case 278 /* ExportSpecifier */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 206 /* BindingElement */: + case 211 /* CallExpression */: + case 177 /* CallSignature */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 173 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 210 /* ElementAccessExpression */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: + case 279 /* ExportSpecifier */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: case 79 /* Identifier */: - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: - case 320 /* JSDocFunctionType */: - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: - case 326 /* JSDocSignature */: - case 349 /* JSDocTypedefTag */: - case 325 /* JSDocTypeLiteral */: - case 288 /* JsxAttribute */: - case 289 /* JsxAttributes */: - case 290 /* JsxSpreadAttribute */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 199 /* NamedTupleMember */: - case 277 /* NamespaceExport */: - case 267 /* NamespaceExportDeclaration */: - case 271 /* NamespaceImport */: - case 211 /* NewExpression */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: + case 321 /* JSDocFunctionType */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 327 /* JSDocSignature */: + case 350 /* JSDocTypedefTag */: + case 326 /* JSDocTypeLiteral */: + case 289 /* JsxAttribute */: + case 290 /* JsxAttributes */: + case 291 /* JsxSpreadAttribute */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 200 /* NamedTupleMember */: + case 278 /* NamespaceExport */: + case 268 /* NamespaceExportDeclaration */: + case 272 /* NamespaceImport */: + case 212 /* NewExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - case 207 /* ObjectLiteralExpression */: - case 166 /* Parameter */: - case 208 /* PropertyAccessExpression */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 308 /* SourceFile */: - case 301 /* SpreadAssignment */: + case 208 /* ObjectLiteralExpression */: + case 167 /* Parameter */: + case 209 /* PropertyAccessExpression */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 309 /* SourceFile */: + case 302 /* SpreadAssignment */: case 10 /* StringLiteral */: - case 262 /* TypeAliasDeclaration */: - case 184 /* TypeLiteral */: - case 165 /* TypeParameter */: - case 257 /* VariableDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 185 /* TypeLiteral */: + case 166 /* TypeParameter */: + case 258 /* VariableDeclaration */: return true; default: return false; @@ -12547,53 +12571,53 @@ } function canHaveLocals(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 238 /* Block */: - case 176 /* CallSignature */: - case 266 /* CaseBlock */: - case 295 /* CatchClause */: - case 172 /* ClassStaticBlockDeclaration */: - case 191 /* ConditionalType */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: - case 178 /* IndexSignature */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 349 /* JSDocTypedefTag */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 175 /* SetAccessor */: - case 308 /* SourceFile */: - case 262 /* TypeAliasDeclaration */: + case 217 /* ArrowFunction */: + case 239 /* Block */: + case 177 /* CallSignature */: + case 267 /* CaseBlock */: + case 296 /* CatchClause */: + case 173 /* ClassStaticBlockDeclaration */: + case 192 /* ConditionalType */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: + case 179 /* IndexSignature */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 350 /* JSDocTypedefTag */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 176 /* SetAccessor */: + case 309 /* SourceFile */: + case 263 /* TypeAliasDeclaration */: return true; default: return false; } } function isDeclarationKind(kind) { - return kind === 216 /* ArrowFunction */ || kind === 205 /* BindingElement */ || kind === 260 /* ClassDeclaration */ || kind === 228 /* ClassExpression */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 173 /* Constructor */ || kind === 263 /* EnumDeclaration */ || kind === 302 /* EnumMember */ || kind === 278 /* ExportSpecifier */ || kind === 259 /* FunctionDeclaration */ || kind === 215 /* FunctionExpression */ || kind === 174 /* GetAccessor */ || kind === 270 /* ImportClause */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 273 /* ImportSpecifier */ || kind === 261 /* InterfaceDeclaration */ || kind === 288 /* JsxAttribute */ || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 264 /* ModuleDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 271 /* NamespaceImport */ || kind === 277 /* NamespaceExport */ || kind === 166 /* Parameter */ || kind === 299 /* PropertyAssignment */ || kind === 169 /* PropertyDeclaration */ || kind === 168 /* PropertySignature */ || kind === 175 /* SetAccessor */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 262 /* TypeAliasDeclaration */ || kind === 165 /* TypeParameter */ || kind === 257 /* VariableDeclaration */ || kind === 349 /* JSDocTypedefTag */ || kind === 341 /* JSDocCallbackTag */ || kind === 351 /* JSDocPropertyTag */; + return kind === 217 /* ArrowFunction */ || kind === 206 /* BindingElement */ || kind === 261 /* ClassDeclaration */ || kind === 229 /* ClassExpression */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 174 /* Constructor */ || kind === 264 /* EnumDeclaration */ || kind === 303 /* EnumMember */ || kind === 279 /* ExportSpecifier */ || kind === 260 /* FunctionDeclaration */ || kind === 216 /* FunctionExpression */ || kind === 175 /* GetAccessor */ || kind === 271 /* ImportClause */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 274 /* ImportSpecifier */ || kind === 262 /* InterfaceDeclaration */ || kind === 289 /* JsxAttribute */ || kind === 172 /* MethodDeclaration */ || kind === 171 /* MethodSignature */ || kind === 265 /* ModuleDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 272 /* NamespaceImport */ || kind === 278 /* NamespaceExport */ || kind === 167 /* Parameter */ || kind === 300 /* PropertyAssignment */ || kind === 170 /* PropertyDeclaration */ || kind === 169 /* PropertySignature */ || kind === 176 /* SetAccessor */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 263 /* TypeAliasDeclaration */ || kind === 166 /* TypeParameter */ || kind === 258 /* VariableDeclaration */ || kind === 350 /* JSDocTypedefTag */ || kind === 342 /* JSDocCallbackTag */ || kind === 352 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 259 /* FunctionDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 267 /* NamespaceExportDeclaration */; + return kind === 260 /* FunctionDeclaration */ || kind === 280 /* MissingDeclaration */ || kind === 261 /* ClassDeclaration */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 275 /* ExportAssignment */ || kind === 268 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 355 /* NotEmittedStatement */ || kind === 359 /* EndOfDeclarationMarker */ || kind === 358 /* MergeDeclarationMarker */; + return kind === 250 /* BreakStatement */ || kind === 249 /* ContinueStatement */ || kind === 257 /* DebuggerStatement */ || kind === 244 /* DoStatement */ || kind === 242 /* ExpressionStatement */ || kind === 240 /* EmptyStatement */ || kind === 247 /* ForInStatement */ || kind === 248 /* ForOfStatement */ || kind === 246 /* ForStatement */ || kind === 243 /* IfStatement */ || kind === 254 /* LabeledStatement */ || kind === 251 /* ReturnStatement */ || kind === 253 /* SwitchStatement */ || kind === 255 /* ThrowStatement */ || kind === 256 /* TryStatement */ || kind === 241 /* VariableStatement */ || kind === 245 /* WhileStatement */ || kind === 252 /* WithStatement */ || kind === 356 /* NotEmittedStatement */ || kind === 360 /* EndOfDeclarationMarker */ || kind === 359 /* MergeDeclarationMarker */; } function isDeclaration(node) { - if (node.kind === 165 /* TypeParameter */) { - return node.parent && node.parent.kind !== 348 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 166 /* TypeParameter */) { + return node.parent && node.parent.kind !== 349 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -12608,10 +12632,10 @@ return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 238 /* Block */) + if (node.kind !== 239 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 255 /* TryStatement */ || node.parent.kind === 295 /* CatchClause */) { + if (node.parent.kind === 256 /* TryStatement */ || node.parent.kind === 296 /* CatchClause */) { return false; } } @@ -12619,50 +12643,50 @@ } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 238 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 239 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 280 /* ExternalModuleReference */ || kind === 163 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 281 /* ExternalModuleReference */ || kind === 164 /* QualifiedName */ || kind === 79 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 108 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 208 /* PropertyAccessExpression */; + return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 209 /* PropertyAccessExpression */; } function isJsxChild(node) { const kind = node.kind; - return kind === 281 /* JsxElement */ || kind === 291 /* JsxExpression */ || kind === 282 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 285 /* JsxFragment */; + return kind === 282 /* JsxElement */ || kind === 292 /* JsxExpression */ || kind === 283 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 286 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 288 /* JsxAttribute */ || kind === 290 /* JsxSpreadAttribute */; + return kind === 289 /* JsxAttribute */ || kind === 291 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 10 /* StringLiteral */ || kind === 291 /* JsxExpression */; + return kind === 10 /* StringLiteral */ || kind === 292 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 283 /* JsxOpeningElement */ || kind === 282 /* JsxSelfClosingElement */; + return kind === 284 /* JsxOpeningElement */ || kind === 283 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */; + return kind === 293 /* CaseClause */ || kind === 294 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */; + return node.kind >= 313 /* FirstJSDocNode */ && node.kind <= 354 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 323 /* JSDoc */ || node.kind === 322 /* JSDocNamepathType */ || node.kind === 324 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 324 /* JSDoc */ || node.kind === 323 /* JSDocNamepathType */ || node.kind === 325 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */; + return node.kind >= 331 /* FirstJSDocTagNode */ && node.kind <= 354 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 175 /* SetAccessor */; + return node.kind === 176 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 174 /* GetAccessor */; + return node.kind === 175 /* GetAccessor */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) @@ -12678,22 +12702,22 @@ } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: - case 299 /* PropertyAssignment */: - case 302 /* EnumMember */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: + case 300 /* PropertyAssignment */: + case 303 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 288 /* JsxAttribute */ || node.kind === 290 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 289 /* JsxAttribute */ || node.kind === 291 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 180 /* TypeReference */ || node.kind === 230 /* ExpressionWithTypeArguments */; + return node.kind === 181 /* TypeReference */ || node.kind === 231 /* ExpressionWithTypeArguments */; } function guessIndentation(lines) { let indentation = MAX_SMI_X86; @@ -12720,7 +12744,7 @@ return node.kind === 10 /* StringLiteral */ || node.kind === 14 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 327 /* JSDocLink */ || node.kind === 328 /* JSDocLinkCode */ || node.kind === 329 /* JSDocLinkPlain */; + return node.kind === 328 /* JSDocLink */ || node.kind === 329 /* JSDocLinkCode */ || node.kind === 330 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -12728,7 +12752,7 @@ } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 321 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 322 /* JSDocVariadicType */; } var unchangedTextChangeRange, supportedLocaleDirectories, MAX_SMI_X86; var init_utilitiesPublic = __esm({ @@ -12930,7 +12954,7 @@ } } function getSourceFileOfNode(node) { - while (node && node.kind !== 308 /* SourceFile */) { + while (node && node.kind !== 309 /* SourceFile */) { node = node.parent; } return node; @@ -12943,11 +12967,11 @@ } function isStatementWithLocals(node) { switch (node.kind) { - case 238 /* Block */: - case 266 /* CaseBlock */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return true; } return false; @@ -13106,7 +13130,7 @@ if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 355 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return skipTrivia( @@ -13621,7 +13645,7 @@ } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 257 /* VariableDeclaration */ && node.parent.kind === 295 /* CatchClause */; + return node.kind === 258 /* VariableDeclaration */ && node.parent.kind === 296 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 10 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -13639,10 +13663,10 @@ return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 264 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 265 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 308 /* SourceFile */ || node.kind === 264 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 309 /* SourceFile */ || node.kind === 265 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { return !!(module2.flags & 1024 /* GlobalAugmentation */); @@ -13652,9 +13676,9 @@ } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return isExternalModule(node.parent); - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -13701,24 +13725,24 @@ } function isBlockScope(node, parentNode) { switch (node.kind) { - case 308 /* SourceFile */: - case 266 /* CaseBlock */: - case 295 /* CatchClause */: - case 264 /* ModuleDeclaration */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 169 /* PropertyDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: + case 309 /* SourceFile */: + case 267 /* CaseBlock */: + case 296 /* CatchClause */: + case 265 /* ModuleDeclaration */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 170 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return true; - case 238 /* Block */: + case 239 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; @@ -13726,9 +13750,9 @@ function isDeclarationWithTypeParameters(node) { Debug.type(node); switch (node.kind) { - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: - case 326 /* JSDocSignature */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 327 /* JSDocSignature */: return true; default: assertType(node); @@ -13738,25 +13762,25 @@ function isDeclarationWithTypeParameterChildren(node) { Debug.type(node); switch (node.kind) { - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 320 /* JSDocFunctionType */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 348 /* JSDocTemplateTag */: - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 321 /* JSDocFunctionType */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 349 /* JSDocTemplateTag */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: assertType(node); @@ -13765,8 +13789,8 @@ } function isAnyImportSyntax(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: return true; default: return false; @@ -13777,15 +13801,15 @@ } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 240 /* VariableStatement */: - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 241 /* VariableStatement */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: return true; default: return false; @@ -13814,7 +13838,7 @@ return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 164 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 165 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a2; @@ -13826,7 +13850,7 @@ case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; @@ -13839,20 +13863,20 @@ } function entityNameToString(name) { switch (name.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return "this"; case 80 /* PrivateIdentifier */: case 79 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 314 /* JSDocMemberName */: + case 315 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); default: return Debug.assertNever(name); @@ -13939,8 +13963,8 @@ pos ); scanner2.scan(); - const start = scanner2.getTokenPos(); - return createTextSpanFromBounds(start, scanner2.getTextPos()); + const start = scanner2.getTokenStart(); + return createTextSpanFromBounds(start, scanner2.getTokenEnd()); } function scanTokenAtPosition(sourceFile, pos) { const scanner2 = createScanner( @@ -13958,7 +13982,7 @@ } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 238 /* Block */) { + if (node.body && node.body.kind === 239 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -13970,7 +13994,7 @@ function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 308 /* SourceFile */: { + case 309 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -13982,35 +14006,35 @@ } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 262 /* TypeAliasDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 271 /* NamespaceImport */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 263 /* TypeAliasDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 272 /* NamespaceImport */: errorNode = node.name; break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: { + case 293 /* CaseClause */: + case 294 /* DefaultClause */: { const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); } - case 250 /* ReturnStatement */: - case 226 /* YieldExpression */: { + case 251 /* ReturnStatement */: + case 227 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } @@ -14049,19 +14073,19 @@ return !!(getCombinedNodeFlags(node) & 1 /* Let */); } function isSuperCall(n) { - return n.kind === 210 /* CallExpression */ && n.expression.kind === 106 /* SuperKeyword */; + return n.kind === 211 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 210 /* CallExpression */ && n.expression.kind === 100 /* ImportKeyword */; + return n.kind === 211 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; } function isImportMeta(n) { - return isMetaProperty(n) && n.keywordToken === 100 /* ImportKeyword */ && n.name.escapedText === "meta"; + return isMetaProperty(n) && n.keywordToken === 101 /* ImportKeyword */ && n.name.escapedText === "meta"; } function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 241 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; + return node.kind === 242 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -14079,85 +14103,86 @@ return node.kind !== 11 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 166 /* Parameter */ || node.kind === 165 /* TypeParameter */ || node.kind === 215 /* FunctionExpression */ || node.kind === 216 /* ArrowFunction */ || node.kind === 214 /* ParenthesizedExpression */ || node.kind === 257 /* VariableDeclaration */ || node.kind === 278 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 167 /* Parameter */ || node.kind === 166 /* TypeParameter */ || node.kind === 216 /* FunctionExpression */ || node.kind === 217 /* ArrowFunction */ || node.kind === 215 /* ParenthesizedExpression */ || node.kind === 258 /* VariableDeclaration */ || node.kind === 279 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } function isPartOfTypeNode(node) { - if (179 /* FirstTypeNode */ <= node.kind && node.kind <= 202 /* LastTypeNode */) { + if (180 /* FirstTypeNode */ <= node.kind && node.kind <= 203 /* LastTypeNode */) { return true; } switch (node.kind) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 152 /* StringKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 149 /* ObjectKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 153 /* StringKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 150 /* ObjectKeyword */: + case 156 /* UndefinedKeyword */: + case 105 /* NullKeyword */: + case 145 /* NeverKeyword */: return true; - case 114 /* VoidKeyword */: - return node.parent.kind !== 219 /* VoidExpression */; - case 230 /* ExpressionWithTypeArguments */: + case 115 /* VoidKeyword */: + return node.parent.kind !== 220 /* VoidExpression */; + case 231 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 165 /* TypeParameter */: - return node.parent.kind === 197 /* MappedType */ || node.parent.kind === 192 /* InferType */; + case 166 /* TypeParameter */: + return node.parent.kind === 198 /* MappedType */ || node.parent.kind === 193 /* InferType */; case 79 /* Identifier */: - if (node.parent.kind === 163 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 164 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 79 /* Identifier */ || node.kind === 163 /* QualifiedName */ || node.kind === 208 /* PropertyAccessExpression */, + node.kind === 79 /* Identifier */ || node.kind === 164 /* QualifiedName */ || node.kind === 209 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 163 /* QualifiedName */: - case 208 /* PropertyAccessExpression */: - case 108 /* ThisKeyword */: { + case 164 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 109 /* ThisKeyword */: { const { parent: parent2 } = node; - if (parent2.kind === 183 /* TypeQuery */) { + if (parent2.kind === 184 /* TypeQuery */) { return false; } - if (parent2.kind === 202 /* ImportType */) { + if (parent2.kind === 203 /* ImportType */) { return !parent2.isTypeOf; } - if (179 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 202 /* LastTypeNode */) { + if (180 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 203 /* LastTypeNode */) { return true; } switch (parent2.kind) { - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isHeritageClause(parent2.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent2); - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return node === parent2.constraint; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return node === parent2.constraint; - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 166 /* Parameter */: - case 257 /* VariableDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 167 /* Parameter */: + case 258 /* VariableDeclaration */: return node === parent2.type; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return node === parent2.type; - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return node === parent2.type; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return node === parent2.type; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return contains(parent2.typeArguments, node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return false; } } @@ -14177,23 +14202,23 @@ return traverse(body); function traverse(node) { switch (node.kind) { - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitor(node); - case 266 /* CaseBlock */: - case 238 /* Block */: - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 251 /* WithStatement */: - case 252 /* SwitchStatement */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 253 /* LabeledStatement */: - case 255 /* TryStatement */: - case 295 /* CatchClause */: + case 267 /* CaseBlock */: + case 239 /* Block */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 252 /* WithStatement */: + case 253 /* SwitchStatement */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 254 /* LabeledStatement */: + case 256 /* TryStatement */: + case 296 /* CatchClause */: return forEachChild(node, traverse); } } @@ -14202,21 +14227,21 @@ return traverse(body); function traverse(node) { switch (node.kind) { - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 263 /* EnumDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 165 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -14227,9 +14252,9 @@ } } function getRestParameterElementType(node) { - if (node && node.kind === 185 /* ArrayType */) { + if (node && node.kind === 186 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 180 /* TypeReference */) { + } else if (node && node.kind === 181 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -14237,26 +14262,26 @@ } function getMembersOfDeclaration(node) { switch (node.kind) { - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 184 /* TypeLiteral */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 185 /* TypeLiteral */: return node.members; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 205 /* BindingElement */: - case 302 /* EnumMember */: - case 166 /* Parameter */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 300 /* ShorthandPropertyAssignment */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 303 /* EnumMember */: + case 167 /* Parameter */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 301 /* ShorthandPropertyAssignment */: + case 258 /* VariableDeclaration */: return true; } } @@ -14266,7 +14291,7 @@ return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 258 /* VariableDeclarationList */ && node.parent.parent.kind === 240 /* VariableStatement */; + return node.parent.kind === 259 /* VariableDeclarationList */ && node.parent.parent.kind === 241 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -14283,13 +14308,13 @@ } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return true; } return false; @@ -14299,20 +14324,20 @@ if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 253 /* LabeledStatement */) { + if (node.statement.kind !== 254 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 238 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 239 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 171 /* MethodDeclaration */ && node.parent.kind === 207 /* ObjectLiteralExpression */; + return node && node.kind === 172 /* MethodDeclaration */ && node.parent.kind === 208 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 171 /* MethodDeclaration */ || node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */) && (node.parent.kind === 207 /* ObjectLiteralExpression */ || node.parent.kind === 228 /* ClassExpression */); + return (node.kind === 172 /* MethodDeclaration */ || node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */) && (node.parent.kind === 208 /* ObjectLiteralExpression */ || node.parent.kind === 229 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -14322,7 +14347,7 @@ } function getPropertyAssignment(objectLiteral, key, key2) { return objectLiteral.properties.filter((property) => { - if (property.kind === 299 /* PropertyAssignment */) { + if (property.kind === 300 /* PropertyAssignment */) { const propName = tryGetTextOfPropertyName(property.name); return key === propName || !!key2 && key2 === propName; } @@ -14366,63 +14391,63 @@ return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration); } function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) { - Debug.assert(node.kind !== 308 /* SourceFile */); + Debug.assert(node.kind !== 309 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) { return node; } node = node.parent.parent; break; - case 167 /* Decorator */: - if (node.parent.kind === 166 /* Parameter */ && isClassElement(node.parent.parent)) { + case 168 /* Decorator */: + if (node.parent.kind === 167 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 264 /* ModuleDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 263 /* EnumDeclaration */: - case 308 /* SourceFile */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 265 /* ModuleDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 264 /* EnumDeclaration */: + case 309 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 169 /* PropertyDeclaration */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 170 /* PropertyDeclaration */: return true; - case 238 /* Block */: + case 239 /* Block */: switch (node.parent.kind) { - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -14454,9 +14479,9 @@ ); if (container) { switch (container.kind) { - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return container; } } @@ -14469,26 +14494,26 @@ return void 0; } switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: node = node.parent; break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: return node; - case 167 /* Decorator */: - if (node.parent.kind === 166 /* Parameter */ && isClassElement(node.parent.parent)) { + case 168 /* Decorator */: + if (node.parent.kind === 167 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -14498,54 +14523,54 @@ } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 215 /* FunctionExpression */ || func.kind === 216 /* ArrowFunction */) { + if (func.kind === 216 /* FunctionExpression */ || func.kind === 217 /* ArrowFunction */) { let prev = func; let parent2 = func.parent; - while (parent2.kind === 214 /* ParenthesizedExpression */) { + while (parent2.kind === 215 /* ParenthesizedExpression */) { prev = parent2; parent2 = parent2.parent; } - if (parent2.kind === 210 /* CallExpression */ && parent2.expression === prev) { + if (parent2.kind === 211 /* CallExpression */ && parent2.expression === prev) { return parent2; } } } function isSuperOrSuperProperty(node) { - return node.kind === 106 /* SuperKeyword */ || isSuperProperty(node); + return node.kind === 107 /* SuperKeyword */ || isSuperProperty(node); } function isSuperProperty(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && node.expression.kind === 106 /* SuperKeyword */; + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && node.expression.kind === 108 /* ThisKeyword */; + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a2; - return !!node && isVariableDeclaration(node) && ((_a2 = node.initializer) == null ? void 0 : _a2.kind) === 108 /* ThisKeyword */; + return !!node && isVariableDeclaration(node) && ((_a2 = node.initializer) == null ? void 0 : _a2.kind) === 109 /* ThisKeyword */; } function isThisInitializedObjectBindingExpression(node) { - return !!node && (isShorthandPropertyAssignment(node) || isPropertyAssignment(node)) && isBinaryExpression(node.parent.parent) && node.parent.parent.operatorToken.kind === 63 /* EqualsToken */ && node.parent.parent.right.kind === 108 /* ThisKeyword */; + return !!node && (isShorthandPropertyAssignment(node) || isPropertyAssignment(node)) && isBinaryExpression(node.parent.parent) && node.parent.parent.operatorToken.kind === 63 /* EqualsToken */ && node.parent.parent.right.kind === 109 /* ThisKeyword */; } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 79 /* Identifier */: - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return node.tag; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -14556,20 +14581,20 @@ return false; } switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return true; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return !useLegacyDecorators; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2)); - case 166 /* Parameter */: + case 167 /* Parameter */: if (!useLegacyDecorators) return false; - return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 173 /* Constructor */ || parent2.kind === 171 /* MethodDeclaration */ || parent2.kind === 175 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 260 /* ClassDeclaration */; + return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 174 /* Constructor */ || parent2.kind === 172 /* MethodDeclaration */ || parent2.kind === 176 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 261 /* ClassDeclaration */; } return false; } @@ -14581,13 +14606,13 @@ } function childIsDecorated(useLegacyDecorators, node, parent2) { switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent2)); default: return false; @@ -14638,73 +14663,73 @@ } function isJSXTagName(node) { const { parent: parent2 } = node; - if (parent2.kind === 283 /* JsxOpeningElement */ || parent2.kind === 282 /* JsxSelfClosingElement */ || parent2.kind === 284 /* JsxClosingElement */) { + if (parent2.kind === 284 /* JsxOpeningElement */ || parent2.kind === 283 /* JsxSelfClosingElement */ || parent2.kind === 285 /* JsxClosingElement */) { return parent2.tagName === node; } return false; } function isExpressionNode(node) { switch (node.kind) { - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 13 /* RegularExpressionLiteral */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 231 /* AsExpression */: - case 213 /* TypeAssertionExpression */: - case 235 /* SatisfiesExpression */: - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 218 /* TypeOfExpression */: - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: - case 223 /* BinaryExpression */: - case 224 /* ConditionalExpression */: - case 227 /* SpreadElement */: - case 225 /* TemplateExpression */: - case 229 /* OmittedExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: - case 226 /* YieldExpression */: - case 220 /* AwaitExpression */: - case 233 /* MetaProperty */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 232 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 236 /* SatisfiesExpression */: + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 219 /* TypeOfExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 224 /* BinaryExpression */: + case 225 /* ConditionalExpression */: + case 228 /* SpreadElement */: + case 226 /* TemplateExpression */: + case 230 /* OmittedExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: + case 227 /* YieldExpression */: + case 221 /* AwaitExpression */: + case 234 /* MetaProperty */: return true; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); - case 163 /* QualifiedName */: - while (node.parent.kind === 163 /* QualifiedName */) { + case 164 /* QualifiedName */: + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 314 /* JSDocMemberName */: + return node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 315 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); case 80 /* PrivateIdentifier */: - return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 101 /* InKeyword */; + return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 102 /* InKeyword */; case 79 /* Identifier */: - if (node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return isInExpressionContext(node); default: return false; @@ -14713,64 +14738,64 @@ function isInExpressionContext(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 302 /* EnumMember */: - case 299 /* PropertyAssignment */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 303 /* EnumMember */: + case 300 /* PropertyAssignment */: + case 206 /* BindingElement */: return parent2.initializer === node; - case 241 /* ExpressionStatement */: - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 250 /* ReturnStatement */: - case 251 /* WithStatement */: - case 252 /* SwitchStatement */: - case 292 /* CaseClause */: - case 254 /* ThrowStatement */: + case 242 /* ExpressionStatement */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 251 /* ReturnStatement */: + case 252 /* WithStatement */: + case 253 /* SwitchStatement */: + case 293 /* CaseClause */: + case 255 /* ThrowStatement */: return parent2.expression === node; - case 245 /* ForStatement */: + case 246 /* ForStatement */: const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 258 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 259 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 258 /* VariableDeclarationList */ || forInStatement.expression === node; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 259 /* VariableDeclarationList */ || forInStatement.expression === node; + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return node === parent2.expression; - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return node === parent2.expression; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return node === parent2.expression; - case 167 /* Decorator */: - case 291 /* JsxExpression */: - case 290 /* JsxSpreadAttribute */: - case 301 /* SpreadAssignment */: + case 168 /* Decorator */: + case 292 /* JsxExpression */: + case 291 /* JsxSpreadAttribute */: + case 302 /* SpreadAssignment */: return true; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return parent2.expression === node && !isPartOfTypeNode(parent2); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return parent2.objectAssignmentInitializer === node; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return node === parent2.expression; default: return isExpressionNode(parent2); } } function isPartOfTypeQuery(node) { - while (node.kind === 163 /* QualifiedName */ || node.kind === 79 /* Identifier */) { + while (node.kind === 164 /* QualifiedName */ || node.kind === 79 /* Identifier */) { node = node.parent; } - return node.kind === 183 /* TypeQuery */; + return node.kind === 184 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 280 /* ExternalModuleReference */; + return node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 281 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -14780,7 +14805,7 @@ return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 280 /* ExternalModuleReference */; + return node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 281 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -14801,10 +14826,10 @@ return !!node && !!(node.flags & 8388608 /* JSDoc */); } function isJSDocIndexSignature(node) { - return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 152 /* StringKeyword */ || node.typeArguments[0].kind === 148 /* NumberKeyword */); + return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 153 /* StringKeyword */ || node.typeArguments[0].kind === 149 /* NumberKeyword */); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 210 /* CallExpression */) { + if (callExpression.kind !== 211 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -14881,9 +14906,9 @@ function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 215 /* FunctionExpression */ || e.kind === 216 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 216 /* FunctionExpression */ || e.kind === 217 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 215 /* FunctionExpression */ || initializer.kind === 228 /* ClassExpression */ || initializer.kind === 216 /* ArrowFunction */) { + if (initializer.kind === 216 /* FunctionExpression */ || initializer.kind === 229 /* ClassExpression */ || initializer.kind === 217 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -14914,7 +14939,7 @@ if (isPropertyNameLiteral(name) && isPropertyNameLiteral(initializer)) { return getTextOfIdentifierOrLiteral(name) === getTextOfIdentifierOrLiteral(initializer); } - if (isMemberName(name) && isLiteralLikeAccess(initializer) && (initializer.expression.kind === 108 /* ThisKeyword */ || isIdentifier(initializer.expression) && (initializer.expression.escapedText === "window" || initializer.expression.escapedText === "self" || initializer.expression.escapedText === "global"))) { + if (isMemberName(name) && isLiteralLikeAccess(initializer) && (initializer.expression.kind === 109 /* ThisKeyword */ || isIdentifier(initializer.expression) && (initializer.expression.escapedText === "window" || initializer.expression.escapedText === "self" || initializer.expression.escapedText === "global"))) { return isSameEntityName(name, getNameOrArgument(initializer)); } if (isLiteralLikeAccess(name) && isLiteralLikeAccess(initializer)) { @@ -14959,14 +14984,14 @@ return isElementAccessExpression(node) && isStringOrNumericLiteralLike(node.argumentExpression); } function isBindableStaticAccessExpression(node, excludeThisKeyword) { - return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 108 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( + return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 109 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( node.expression, /*excludeThisKeyword*/ true )) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 108 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( + return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 109 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( node.expression, /*excludeThisKeyword*/ true @@ -15033,7 +15058,7 @@ return void 0; } function getAssignmentDeclarationPropertyAccessKind(lhs) { - if (lhs.expression.kind === 108 /* ThisKeyword */) { + if (lhs.expression.kind === 109 /* ThisKeyword */) { return 4 /* ThisProperty */; } else if (isModuleExportsAccessExpression(lhs)) { return 2 /* ModuleExports */; @@ -15074,7 +15099,7 @@ return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 241 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 242 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; @@ -15087,29 +15112,29 @@ return false; } const decl = symbol.valueDeclaration; - return decl.kind === 259 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 260 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a2, _b; switch (node.kind) { - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: return (_a2 = findAncestor(node.initializer, (node2) => isRequireCall( node2, /*requireStringLiteralLikeArgument*/ true ))) == null ? void 0 : _a2.arguments[0]; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); - case 270 /* ImportClause */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 278 /* NamespaceExport */: return tryCast(node.parent.moduleSpecifier, isStringLiteralLike); - case 271 /* NamespaceImport */: - case 278 /* ExportSpecifier */: + case 272 /* NamespaceImport */: + case 279 /* ExportSpecifier */: return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); default: Debug.assertNever(node); @@ -15120,18 +15145,18 @@ } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: return node.parent; - case 280 /* ExternalModuleReference */: + case 281 /* ExternalModuleReference */: return node.parent.parent; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return isImportCall(node.parent) || isRequireCall( node.parent, /*checkArg*/ false ) ? node.parent : void 0; - case 198 /* LiteralType */: + case 199 /* LiteralType */: Debug.assert(isStringLiteral(node)); return tryCast(node.parent.parent, isImportTypeNode); default: @@ -15140,16 +15165,16 @@ } function getExternalModuleName(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: return node.moduleSpecifier; - case 268 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 280 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 202 /* ImportType */: + case 269 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 281 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 203 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return node.arguments[0]; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return node.name.kind === 10 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -15157,18 +15182,18 @@ } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return node; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 269 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 270 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -15185,13 +15210,13 @@ function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 166 /* Parameter */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 300 /* ShorthandPropertyAssignment */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 167 /* Parameter */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 301 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -15203,7 +15228,7 @@ return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 349 /* JSDocTypedefTag */ || node.kind === 341 /* JSDocCallbackTag */ || node.kind === 343 /* JSDocEnumTag */; + return node.kind === 350 /* JSDocTypedefTag */ || node.kind === 342 /* JSDocCallbackTag */ || node.kind === 344 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -15216,12 +15241,12 @@ } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return node.initializer; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return node.initializer; } } @@ -15229,26 +15254,26 @@ return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 264 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 265 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveFlowNode(node) { - if (node.kind >= 240 /* FirstStatement */ && node.kind <= 256 /* LastStatement */) { + if (node.kind >= 241 /* FirstStatement */ && node.kind <= 257 /* LastStatement */) { return true; } switch (node.kind) { case 79 /* Identifier */: - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 163 /* QualifiedName */: - case 233 /* MetaProperty */: - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: - case 205 /* BindingElement */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 164 /* QualifiedName */: + case 234 /* MetaProperty */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 206 /* BindingElement */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -15256,71 +15281,71 @@ } function canHaveJSDoc(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 238 /* Block */: - case 249 /* BreakStatement */: - case 176 /* CallSignature */: - case 292 /* CaseClause */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 172 /* ClassStaticBlockDeclaration */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 248 /* ContinueStatement */: - case 256 /* DebuggerStatement */: - case 243 /* DoStatement */: - case 209 /* ElementAccessExpression */: - case 239 /* EmptyStatement */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 239 /* Block */: + case 250 /* BreakStatement */: + case 177 /* CallSignature */: + case 293 /* CaseClause */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 173 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 249 /* ContinueStatement */: + case 257 /* DebuggerStatement */: + case 244 /* DoStatement */: + case 210 /* ElementAccessExpression */: + case 240 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: - case 278 /* ExportSpecifier */: - case 241 /* ExpressionStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: + case 279 /* ExportSpecifier */: + case 242 /* ExpressionStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: case 79 /* Identifier */: - case 242 /* IfStatement */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 253 /* LabeledStatement */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 199 /* NamedTupleMember */: - case 267 /* NamespaceExportDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 166 /* Parameter */: - case 214 /* ParenthesizedExpression */: - case 208 /* PropertyAccessExpression */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 250 /* ReturnStatement */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: - case 252 /* SwitchStatement */: - case 254 /* ThrowStatement */: - case 255 /* TryStatement */: - case 262 /* TypeAliasDeclaration */: - case 165 /* TypeParameter */: - case 257 /* VariableDeclaration */: - case 240 /* VariableStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: + case 243 /* IfStatement */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 254 /* LabeledStatement */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 200 /* NamedTupleMember */: + case 268 /* NamespaceExportDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 167 /* Parameter */: + case 215 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 251 /* ReturnStatement */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: + case 253 /* SwitchStatement */: + case 255 /* ThrowStatement */: + case 256 /* TryStatement */: + case 263 /* TypeAliasDeclaration */: + case 166 /* TypeParameter */: + case 258 /* VariableDeclaration */: + case 241 /* VariableStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: return true; default: return false; @@ -15336,11 +15361,11 @@ if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 166 /* Parameter */) { + if (node.kind === 167 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 165 /* TypeParameter */) { + if (node.kind === 166 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -15360,7 +15385,7 @@ } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 299 /* PropertyAssignment */ || parent2.kind === 274 /* ExportAssignment */ || parent2.kind === 169 /* PropertyDeclaration */ || parent2.kind === 241 /* ExpressionStatement */ && node.kind === 208 /* PropertyAccessExpression */ || parent2.kind === 250 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 300 /* PropertyAssignment */ || parent2.kind === 275 /* ExportAssignment */ || parent2.kind === 170 /* PropertyDeclaration */ || parent2.kind === 242 /* ExpressionStatement */ && node.kind === 209 /* PropertyAccessExpression */ || parent2.kind === 251 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { return parent2; } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isBinaryExpression(parent2) && parent2.operatorToken.kind === 63 /* EqualsToken */)) { return parent2.parent; @@ -15430,32 +15455,32 @@ let parent2 = node.parent; while (true) { switch (parent2.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const binaryOperator = parent2.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 63 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: const unaryOperator = parent2.operator; return unaryOperator === 45 /* PlusPlusToken */ || unaryOperator === 46 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 214 /* ParenthesizedExpression */: - case 206 /* ArrayLiteralExpression */: - case 227 /* SpreadElement */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 207 /* ArrayLiteralExpression */: + case 228 /* SpreadElement */: + case 233 /* NonNullExpression */: node = parent2; break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: node = parent2.parent; break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { return 0 /* None */; } node = parent2.parent; break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (parent2.name === node) { return 0 /* None */; } @@ -15472,22 +15497,22 @@ } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 238 /* Block */: - case 240 /* VariableStatement */: - case 251 /* WithStatement */: - case 242 /* IfStatement */: - case 252 /* SwitchStatement */: - case 266 /* CaseBlock */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 253 /* LabeledStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 255 /* TryStatement */: - case 295 /* CatchClause */: + case 239 /* Block */: + case 241 /* VariableStatement */: + case 252 /* WithStatement */: + case 243 /* IfStatement */: + case 253 /* SwitchStatement */: + case 267 /* CaseBlock */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 254 /* LabeledStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 256 /* TryStatement */: + case 296 /* CatchClause */: return true; } return false; @@ -15502,14 +15527,14 @@ return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 193 /* ParenthesizedType */); + return walkUp(node, 194 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 214 /* ParenthesizedExpression */); + return walkUp(node, 215 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 193 /* ParenthesizedType */) { + while (node && node.kind === 194 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -15525,11 +15550,11 @@ return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 208 /* PropertyAccessExpression */ && node.kind !== 209 /* ElementAccessExpression */) { + if (node.kind !== 209 /* PropertyAccessExpression */ && node.kind !== 210 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 217 /* DeleteExpression */; + return node && node.kind === 218 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -15567,55 +15592,55 @@ } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 164 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 165 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent2 = node.parent; switch (parent2.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 302 /* EnumMember */: - case 299 /* PropertyAssignment */: - case 208 /* PropertyAccessExpression */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 303 /* EnumMember */: + case 300 /* PropertyAssignment */: + case 209 /* PropertyAccessExpression */: return parent2.name === node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return parent2.right === node; - case 205 /* BindingElement */: - case 273 /* ImportSpecifier */: + case 206 /* BindingElement */: + case 274 /* ImportSpecifier */: return parent2.propertyName === node; - case 278 /* ExportSpecifier */: - case 288 /* JsxAttribute */: - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: + case 279 /* ExportSpecifier */: + case 289 /* JsxAttribute */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: return true; } return false; } function isAliasSymbolDeclaration(node) { - if (node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 267 /* NamespaceExportDeclaration */ || node.kind === 270 /* ImportClause */ && !!node.name || node.kind === 271 /* NamespaceImport */ || node.kind === 277 /* NamespaceExport */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 278 /* ExportSpecifier */ || node.kind === 274 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { + if (node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 268 /* NamespaceExportDeclaration */ || node.kind === 271 /* ImportClause */ && !!node.name || node.kind === 272 /* NamespaceImport */ || node.kind === 278 /* NamespaceExport */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 279 /* ExportSpecifier */ || node.kind === 275 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { return true; } return isInJSFile(node) && (isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isPropertyAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableExpression(node.parent.right)); } function getAliasDeclarationFromName(node) { switch (node.parent.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 271 /* NamespaceImport */: - case 278 /* ExportSpecifier */: - case 274 /* ExportAssignment */: - case 268 /* ImportEqualsDeclaration */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 272 /* NamespaceImport */: + case 279 /* ExportSpecifier */: + case 275 /* ExportAssignment */: + case 269 /* ImportEqualsDeclaration */: + case 278 /* NamespaceExport */: return node.parent; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 163 /* QualifiedName */); + } while (node.parent.kind === 164 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -15630,7 +15655,7 @@ return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 300 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 299 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 301 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 300 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -15643,14 +15668,14 @@ return baseType; } function getClassExtendsHeritageElement(node) { - const heritageClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : void 0; } function getEffectiveImplementsTypeNodes(node) { if (isInJSFile(node)) { return getJSDocImplementsTags(node).map((n) => n.class); } else { - const heritageClause = getHeritageClause(node.heritageClauses, 117 /* ImplementsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 118 /* ImplementsKeyword */); return heritageClause == null ? void 0 : heritageClause.types; } } @@ -15658,7 +15683,7 @@ return isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || emptyArray : isClassLike(node) ? concatenate(singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || emptyArray : emptyArray; } function getInterfaceBaseTypeNodes(node) { - const heritageClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); return heritageClause ? heritageClause.types : void 0; } function getHeritageClause(clauses, kind) { @@ -15681,16 +15706,16 @@ return void 0; } function isKeyword(token) { - return 81 /* FirstKeyword */ <= token && token <= 162 /* LastKeyword */; + return 82 /* FirstKeyword */ <= token && token <= 163 /* LastKeyword */; } function isContextualKeyword(token) { - return 126 /* FirstContextualKeyword */ <= token && token <= 162 /* LastContextualKeyword */; + return 127 /* FirstContextualKeyword */ <= token && token <= 163 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); } function isFutureReservedKeyword(token) { - return 117 /* FirstFutureReservedWord */ <= token && token <= 125 /* LastFutureReservedWord */; + return 118 /* FirstFutureReservedWord */ <= token && token <= 126 /* LastFutureReservedWord */; } function isStringANonContextualKeyword(name) { const token = stringToToken(name); @@ -15713,13 +15738,13 @@ } let flags = 0 /* Normal */; switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -15732,10 +15757,10 @@ } function isAsyncFunction(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -15751,7 +15776,7 @@ return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 164 /* ComputedPropertyName */ || name.kind === 209 /* ElementAccessExpression */)) { + if (!(name.kind === 165 /* ComputedPropertyName */ || name.kind === 210 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -15765,7 +15790,7 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -15818,13 +15843,13 @@ function isAnonymousFunctionDefinition(node, cb) { node = skipOuterExpressions(node); switch (node.kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: if (node.name) { return false; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: break; default: return false; @@ -15833,19 +15858,19 @@ } function isNamedEvaluationSource(node) { switch (node.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return !isProtoSetter(node.name); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return !!node.objectAssignmentInitializer; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return isIdentifier(node.name) && !!node.initializer; - case 166 /* Parameter */: + case 167 /* Parameter */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return !!node.initializer; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 76 /* AmpersandAmpersandEqualsToken */: @@ -15854,7 +15879,7 @@ return isIdentifier(node.left); } break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return true; } return false; @@ -15863,18 +15888,18 @@ if (!isNamedEvaluationSource(node)) return false; switch (node.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb); - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isAnonymousFunctionDefinition(node.right, cb); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return isAnonymousFunctionDefinition(node.expression, cb); } } @@ -15883,17 +15908,17 @@ } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 166 /* Parameter */; + return root.kind === 167 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 205 /* BindingElement */) { + while (node.kind === 206 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 215 /* FunctionExpression */ || kind === 259 /* FunctionDeclaration */ || kind === 216 /* ArrowFunction */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 264 /* ModuleDeclaration */ || kind === 308 /* SourceFile */; + return kind === 174 /* Constructor */ || kind === 216 /* FunctionExpression */ || kind === 260 /* FunctionDeclaration */ || kind === 217 /* ArrowFunction */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 265 /* ModuleDeclaration */ || kind === 309 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); @@ -15903,22 +15928,22 @@ } function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 211 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 212 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 211 /* NewExpression */: + case 212 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 221 /* PrefixUnaryExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 220 /* AwaitExpression */: - case 224 /* ConditionalExpression */: - case 226 /* YieldExpression */: + case 222 /* PrefixUnaryExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 221 /* AwaitExpression */: + case 225 /* ConditionalExpression */: + case 227 /* YieldExpression */: return 1 /* Right */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (operator) { case 42 /* AsteriskAsteriskToken */: case 63 /* EqualsToken */: @@ -15944,13 +15969,13 @@ } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 211 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 212 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 223 /* BinaryExpression */) { + if (expression.kind === 224 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 221 /* PrefixUnaryExpression */ || expression.kind === 222 /* PostfixUnaryExpression */) { + } else if (expression.kind === 222 /* PrefixUnaryExpression */ || expression.kind === 223 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -15958,15 +15983,15 @@ } function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return 0 /* Comma */; - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return 1 /* Spread */; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return 2 /* Yield */; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return 4 /* Conditional */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (operatorKind) { case 27 /* CommaToken */: return 0 /* Comma */; @@ -15990,51 +16015,51 @@ default: return getBinaryOperatorPrecedence(operatorKind); } - case 213 /* TypeAssertionExpression */: - case 232 /* NonNullExpression */: - case 221 /* PrefixUnaryExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 220 /* AwaitExpression */: + case 214 /* TypeAssertionExpression */: + case 233 /* NonNullExpression */: + case 222 /* PrefixUnaryExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 221 /* AwaitExpression */: return 16 /* Unary */; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return 17 /* Update */; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return 18 /* LeftHandSide */; - case 211 /* NewExpression */: + case 212 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 212 /* TaggedTemplateExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 233 /* MetaProperty */: + case 213 /* TaggedTemplateExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 234 /* MetaProperty */: return 19 /* Member */; - case 231 /* AsExpression */: - case 235 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 236 /* SatisfiesExpression */: return 11 /* Relational */; - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 228 /* ClassExpression */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 229 /* ClassExpression */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 214 /* ParenthesizedExpression */: - case 229 /* OmittedExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: + case 226 /* TemplateExpression */: + case 215 /* ParenthesizedExpression */: + case 230 /* OmittedExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -16063,10 +16088,10 @@ case 31 /* GreaterThanToken */: case 32 /* LessThanEqualsToken */: case 33 /* GreaterThanEqualsToken */: - case 102 /* InstanceOfKeyword */: - case 101 /* InKeyword */: - case 128 /* AsKeyword */: - case 150 /* SatisfiesKeyword */: + case 103 /* InstanceOfKeyword */: + case 102 /* InKeyword */: + case 129 /* AsKeyword */: + case 151 /* SatisfiesKeyword */: return 11 /* Relational */; case 47 /* LessThanLessThanToken */: case 48 /* GreaterThanGreaterThanToken */: @@ -16087,7 +16112,7 @@ function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return !!i.expression; case 11 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -16563,7 +16588,7 @@ while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */; + return node.parent.kind === 184 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.escapedText === "this"; @@ -16575,9 +16600,9 @@ let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 174 /* GetAccessor */) { + if (accessor.kind === 175 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 175 /* SetAccessor */) { + } else if (accessor.kind === 176 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -16593,10 +16618,10 @@ } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 174 /* GetAccessor */ && !getAccessor) { + if (member.kind === 175 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 175 /* SetAccessor */ && !setAccessor) { + if (member.kind === 176 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -16628,7 +16653,7 @@ return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 323 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 324 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -16818,7 +16843,7 @@ return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 162 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 163 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -16893,37 +16918,37 @@ } function modifierToFlag(token) { switch (token) { - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: return 32 /* Static */; - case 123 /* PublicKeyword */: + case 124 /* PublicKeyword */: return 4 /* Public */; - case 122 /* ProtectedKeyword */: + case 123 /* ProtectedKeyword */: return 16 /* Protected */; - case 121 /* PrivateKeyword */: + case 122 /* PrivateKeyword */: return 8 /* Private */; - case 126 /* AbstractKeyword */: + case 127 /* AbstractKeyword */: return 256 /* Abstract */; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return 128 /* Accessor */; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return 1 /* Export */; - case 136 /* DeclareKeyword */: + case 137 /* DeclareKeyword */: return 2 /* Ambient */; - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: return 2048 /* Const */; - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return 1024 /* Default */; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return 512 /* Async */; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: return 64 /* Readonly */; - case 161 /* OverrideKeyword */: + case 162 /* OverrideKeyword */: return 16384 /* Override */; - case 101 /* InKeyword */: + case 102 /* InKeyword */: return 32768 /* In */; - case 145 /* OutKeyword */: + case 146 /* OutKeyword */: return 65536 /* Out */; - case 167 /* Decorator */: + case 168 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -16956,7 +16981,7 @@ function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node) { if (isExpressionWithTypeArguments(node)) { if (isHeritageClause(node.parent) && isClassLike(node.parent.parent)) { - return { class: node.parent.parent, isImplements: node.parent.token === 117 /* ImplementsKeyword */ }; + return { class: node.parent.parent, isImplements: node.parent.token === 118 /* ImplementsKeyword */ }; } if (isJSDocAugmentsTag(node.parent)) { const host = getEffectiveJSDocHost(node.parent); @@ -16980,7 +17005,7 @@ true )) { const kind = node.left.kind; - return kind === 207 /* ObjectLiteralExpression */ || kind === 206 /* ArrayLiteralExpression */; + return kind === 208 /* ObjectLiteralExpression */ || kind === 207 /* ArrayLiteralExpression */; } return false; } @@ -16994,12 +17019,12 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 79 /* Identifier */); @@ -17007,7 +17032,7 @@ } } function isDottedName(node) { - return node.kind === 79 /* Identifier */ || node.kind === 108 /* ThisKeyword */ || node.kind === 106 /* SuperKeyword */ || node.kind === 233 /* MetaProperty */ || node.kind === 208 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 214 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 234 /* MetaProperty */ || node.kind === 209 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 215 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -17032,7 +17057,7 @@ return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 163 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 164 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; @@ -17041,10 +17066,10 @@ return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } function isEmptyObjectLiteral(expression) { - return expression.kind === 207 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 208 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 206 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 207 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -17310,8 +17335,8 @@ const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 263 /* EnumDeclaration */: - case 264 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -17363,34 +17388,29 @@ } function accessKind(node) { const { parent: parent2 } = node; - if (!parent2) - return 0 /* Read */; - switch (parent2.kind) { - case 214 /* ParenthesizedExpression */: + switch (parent2 == null ? void 0 : parent2.kind) { + case 215 /* ParenthesizedExpression */: return accessKind(parent2); - case 222 /* PostfixUnaryExpression */: - case 221 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const { operator } = parent2; - return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? writeOrReadWrite() : 0 /* Read */; - case 223 /* BinaryExpression */: + return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */; + case 224 /* BinaryExpression */: const { left, operatorToken } = parent2; - return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : writeOrReadWrite() : 0 /* Read */; - case 208 /* PropertyAccessExpression */: + return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */; + case 209 /* PropertyAccessExpression */: return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 299 /* PropertyAssignment */: { + case 300 /* PropertyAssignment */: { const parentAccess = accessKind(parent2.parent); return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return accessKind(parent2); default: return 0 /* Read */; } - function writeOrReadWrite() { - return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 241 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; - } } function reverseAccessKind(a) { switch (a) { @@ -17499,16 +17519,16 @@ return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 139 /* IntrinsicKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */; + return kind >= 180 /* FirstTypeNode */ && kind <= 203 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 158 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 161 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 156 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 140 /* IntrinsicKeyword */ || kind === 231 /* ExpressionWithTypeArguments */ || kind === 316 /* JSDocAllType */ || kind === 317 /* JSDocUnknownType */ || kind === 318 /* JSDocNullableType */ || kind === 319 /* JSDocNonNullableType */ || kind === 320 /* JSDocOptionalType */ || kind === 321 /* JSDocFunctionType */ || kind === 322 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */; + return node.kind === 209 /* PropertyAccessExpression */ || node.kind === 210 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 208 /* PropertyAccessExpression */) { + if (node.kind === 209 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 209 /* ElementAccessExpression */); + Debug.assert(node.kind === 210 /* ElementAccessExpression */); return node.argumentExpression; } function isBundleFileTextLike(section) { @@ -17521,7 +17541,7 @@ } } function isNamedImportsOrExports(node) { - return node.kind === 272 /* NamedImports */ || node.kind === 276 /* NamedExports */; + return node.kind === 273 /* NamedImports */ || node.kind === 277 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -17534,12 +17554,12 @@ return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 208 /* PropertyAccessExpression */) { + if (access.kind === 209 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 209 /* ElementAccessExpression */) { + } else if (access.kind === 210 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -17561,28 +17581,28 @@ function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: node = node.operand; continue; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: node = node.left; continue; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: node = node.condition; continue; - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: node = node.tag; continue; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 231 /* AsExpression */: - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: - case 232 /* NonNullExpression */: - case 356 /* PartiallyEmittedExpression */: - case 235 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 233 /* NonNullExpression */: + case 357 /* PartiallyEmittedExpression */: + case 236 /* SatisfiesExpression */: node = node.expression; continue; } @@ -18652,7 +18672,7 @@ result = scanner2.scan(); } const flags = scanner2.getTokenFlags(); - return success && result === 9 /* BigIntLiteral */ && scanner2.getTextPos() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); + return success && result === 9 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); } function isValidTypeOnlyAliasUseSite(useSite) { return !!(useSite.flags & 16777216 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); @@ -18661,33 +18681,33 @@ return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 79 /* Identifier */ || node.kind === 208 /* PropertyAccessExpression */) { + while (node.kind === 79 /* Identifier */ || node.kind === 209 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 164 /* ComputedPropertyName */) { + if (node.kind !== 165 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 261 /* InterfaceDeclaration */ || containerKind === 184 /* TypeLiteral */; + return containerKind === 262 /* InterfaceDeclaration */ || containerKind === 185 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 79 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent2) => { switch (parent2.kind) { - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return true; - case 208 /* PropertyAccessExpression */: - case 230 /* ExpressionWithTypeArguments */: + case 209 /* PropertyAccessExpression */: + case 231 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 117 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 261 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 262 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -18799,20 +18819,20 @@ if (!node.parent) return void 0; switch (node.kind) { - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: const { parent: parent3 } = node; - return parent3.kind === 192 /* InferType */ ? void 0 : parent3.typeParameters; - case 166 /* Parameter */: + return parent3.kind === 193 /* InferType */ ? void 0 : parent3.typeParameters; + case 167 /* Parameter */: return node.parent.parameters; - case 201 /* TemplateLiteralTypeSpan */: + case 202 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return node.parent.templateSpans; - case 167 /* Decorator */: { + case 168 /* Decorator */: { const { parent: parent4 } = node; return canHaveDecorators(parent4) ? parent4.modifiers : void 0; } - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return node.parent.heritageClauses; } const { parent: parent2 } = node; @@ -18820,43 +18840,43 @@ return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent2.kind) { - case 184 /* TypeLiteral */: - case 261 /* InterfaceDeclaration */: + case 185 /* TypeLiteral */: + case 262 /* InterfaceDeclaration */: return isTypeElement(node) ? parent2.members : void 0; - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return parent2.types; - case 186 /* TupleType */: - case 206 /* ArrayLiteralExpression */: - case 357 /* CommaListExpression */: - case 272 /* NamedImports */: - case 276 /* NamedExports */: + case 187 /* TupleType */: + case 207 /* ArrayLiteralExpression */: + case 358 /* CommaListExpression */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: return parent2.elements; - case 207 /* ObjectLiteralExpression */: - case 289 /* JsxAttributes */: + case 208 /* ObjectLiteralExpression */: + case 290 /* JsxAttributes */: return parent2.properties; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 281 /* JsxElement */: - case 285 /* JsxFragment */: + case 282 /* JsxElement */: + case 286 /* JsxFragment */: return isJsxChild(node) ? parent2.children : void 0; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent2.typeArguments : void 0; - case 238 /* Block */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 266 /* ModuleBlock */: return parent2.statements; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return parent2.clauses; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return isClassElement(node) ? parent2.members : void 0; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return isEnumMember(node) ? parent2.members : void 0; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return parent2.statements; } } @@ -18865,7 +18885,7 @@ if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 216 /* ArrowFunction */) { + if (node.kind !== 217 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -18878,14 +18898,14 @@ return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 257 /* VariableDeclaration */ && node.parent.kind === 295 /* CatchClause */; + return node.kind === 258 /* VariableDeclaration */ && node.parent.kind === 296 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 215 /* FunctionExpression */ || node.kind === 216 /* ArrowFunction */; + return node.kind === 216 /* FunctionExpression */ || node.kind === 217 /* ArrowFunction */; } function escapeSnippetText(text) { return text.replace(/\$/gm, () => "\\$"); @@ -18948,23 +18968,23 @@ } function getParameterTypeNode(parameter) { var _a2; - return parameter.kind === 344 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; + return parameter.kind === 345 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; } function isTypeDeclaration(node) { switch (node.kind) { - case 165 /* TypeParameter */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 166 /* TypeParameter */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return true; - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.isTypeOnly; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -18978,7 +18998,7 @@ return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 320 /* JSDocOptionalType */; } function canUsePropertyAccess(name, languageVersion) { if (name.length === 0) { @@ -18993,17 +19013,17 @@ } function isJSDocOptionalParameter(node) { return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType - (node.type && node.type.kind === 319 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */)); + (node.type && node.type.kind === 320 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 320 /* JSDocOptionalType */)); } function isOptionalDeclaration(declaration) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return !!declaration.questionToken; - case 166 /* Parameter */: + case 167 /* Parameter */: return !!declaration.questionToken || isJSDocOptionalParameter(declaration); - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: return isOptionalJSDocPropertyLikeTag(declaration); default: return false; @@ -19011,7 +19031,7 @@ } function isNonNullAccess(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression); + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && isNonNullExpression(node.expression); } function isJSDocSatisfiesExpression(node) { return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); @@ -19329,16 +19349,16 @@ return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(223 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(223 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(224 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(224 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 216 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 217 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 226 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 227 /* YieldExpression */) { return false; } return true; @@ -19372,7 +19392,7 @@ if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { + if (node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -19385,7 +19405,7 @@ } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 214 /* ParenthesizedExpression */) { + if (skipped.kind === 215 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -19411,7 +19431,7 @@ return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(224 /* ConditionalExpression */, 57 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(225 /* ConditionalExpression */, 57 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -19432,8 +19452,8 @@ /*stopAtCallExpression*/ false ).kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: needsParens = true; } } @@ -19446,16 +19466,16 @@ true ); switch (leftmostExpr.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 211 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 212 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -19473,7 +19493,7 @@ function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(223 /* BinaryExpression */, 27 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(224 /* BinaryExpression */, 27 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -19481,7 +19501,7 @@ if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 215 /* FunctionExpression */ || kind === 216 /* ArrowFunction */) { + if (kind === 216 /* FunctionExpression */ || kind === 217 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -19496,7 +19516,7 @@ /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 207 /* ObjectLiteralExpression */ || leftmostExpressionKind === 215 /* FunctionExpression */) { + if (leftmostExpressionKind === 208 /* ObjectLiteralExpression */ || leftmostExpressionKind === 216 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -19506,31 +19526,31 @@ body, /*stopAtCallExpressions*/ false - ).kind === 207 /* ObjectLiteralExpression */)) { + ).kind === 208 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 191 /* ConditionalType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 192 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -19540,8 +19560,8 @@ } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -19551,23 +19571,23 @@ } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 192 /* InferType */: - case 195 /* TypeOperator */: - case 183 /* TypeQuery */: + case 193 /* InferType */: + case 196 /* TypeOperator */: + case 184 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -19732,11 +19752,11 @@ } function convertToAssignmentPattern(node) { switch (node.kind) { - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 203 /* ObjectBindingPattern */: - case 207 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 208 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -20091,40 +20111,40 @@ updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(315 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(316 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(316 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(317 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(318 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(319 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(318 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(319 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(317 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(318 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(317 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(318 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(319 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(320 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(319 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(320 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(321 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(322 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(321 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(322 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(322 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(323 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(322 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(323 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -20164,82 +20184,82 @@ updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(347 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(348 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(347 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(345 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(346 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(345 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(346 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(346 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(347 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(346 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(347 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(333 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(334 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(333 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(334 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(335 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(336 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(335 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(336 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(339 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(339 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(340 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(340 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(341 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(341 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(334 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(335 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(334 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(335 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(352 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(353 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(354 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(354 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -20702,50 +20722,50 @@ return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 162 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 163 /* LastToken */, "Invalid token"); Debug.assert(token <= 14 /* FirstTemplateToken */ || token >= 17 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 8 /* FirstLiteralToken */ || token >= 14 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 79 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); const node = createBaseToken(token); let transformFlags = 0 /* None */; switch (token) { - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; break; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 126 /* AbstractKeyword */: - case 136 /* DeclareKeyword */: - case 85 /* ConstKeyword */: - case 131 /* AnyKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 144 /* NeverKeyword */: - case 149 /* ObjectKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - case 161 /* OverrideKeyword */: - case 152 /* StringKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 114 /* VoidKeyword */: - case 157 /* UnknownKeyword */: - case 155 /* UndefinedKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 127 /* AbstractKeyword */: + case 137 /* DeclareKeyword */: + case 86 /* ConstKeyword */: + case 132 /* AnyKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 145 /* NeverKeyword */: + case 150 /* ObjectKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + case 162 /* OverrideKeyword */: + case 153 /* StringKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 115 /* VoidKeyword */: + case 158 /* UnknownKeyword */: + case 156 /* UndefinedKeyword */: transformFlags = 1 /* ContainsTypeScript */; break; - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: transformFlags = 1024 /* ContainsES2015 */ | 134217728 /* ContainsLexicalSuper */; node.flowNode = void 0; break; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: transformFlags = 1024 /* ContainsES2015 */; break; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: transformFlags = 16777216 /* ContainsClassFields */; break; - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: transformFlags = 16384 /* ContainsLexicalThis */; node.flowNode = void 0; break; @@ -20756,19 +20776,19 @@ return node; } function createSuper() { - return createToken(106 /* SuperKeyword */); + return createToken(107 /* SuperKeyword */); } function createThis() { - return createToken(108 /* ThisKeyword */); + return createToken(109 /* ThisKeyword */); } function createNull() { - return createToken(104 /* NullKeyword */); + return createToken(105 /* NullKeyword */); } function createTrue() { - return createToken(110 /* TrueKeyword */); + return createToken(111 /* TrueKeyword */); } function createFalse() { - return createToken(95 /* FalseKeyword */); + return createToken(96 /* FalseKeyword */); } function createModifier(kind) { return createToken(kind); @@ -20776,39 +20796,39 @@ function createModifiersFromModifierFlags(flags2) { const result = []; if (flags2 & 1 /* Export */) - result.push(createModifier(93 /* ExportKeyword */)); + result.push(createModifier(94 /* ExportKeyword */)); if (flags2 & 2 /* Ambient */) - result.push(createModifier(136 /* DeclareKeyword */)); + result.push(createModifier(137 /* DeclareKeyword */)); if (flags2 & 1024 /* Default */) - result.push(createModifier(88 /* DefaultKeyword */)); + result.push(createModifier(89 /* DefaultKeyword */)); if (flags2 & 2048 /* Const */) - result.push(createModifier(85 /* ConstKeyword */)); + result.push(createModifier(86 /* ConstKeyword */)); if (flags2 & 4 /* Public */) - result.push(createModifier(123 /* PublicKeyword */)); + result.push(createModifier(124 /* PublicKeyword */)); if (flags2 & 8 /* Private */) - result.push(createModifier(121 /* PrivateKeyword */)); + result.push(createModifier(122 /* PrivateKeyword */)); if (flags2 & 16 /* Protected */) - result.push(createModifier(122 /* ProtectedKeyword */)); + result.push(createModifier(123 /* ProtectedKeyword */)); if (flags2 & 256 /* Abstract */) - result.push(createModifier(126 /* AbstractKeyword */)); + result.push(createModifier(127 /* AbstractKeyword */)); if (flags2 & 32 /* Static */) - result.push(createModifier(124 /* StaticKeyword */)); + result.push(createModifier(125 /* StaticKeyword */)); if (flags2 & 16384 /* Override */) - result.push(createModifier(161 /* OverrideKeyword */)); + result.push(createModifier(162 /* OverrideKeyword */)); if (flags2 & 64 /* Readonly */) - result.push(createModifier(146 /* ReadonlyKeyword */)); + result.push(createModifier(147 /* ReadonlyKeyword */)); if (flags2 & 128 /* Accessor */) - result.push(createModifier(127 /* AccessorKeyword */)); + result.push(createModifier(128 /* AccessorKeyword */)); if (flags2 & 512 /* Async */) - result.push(createModifier(132 /* AsyncKeyword */)); + result.push(createModifier(133 /* AsyncKeyword */)); if (flags2 & 32768 /* In */) - result.push(createModifier(101 /* InKeyword */)); + result.push(createModifier(102 /* InKeyword */)); if (flags2 & 65536 /* Out */) - result.push(createModifier(145 /* OutKeyword */)); + result.push(createModifier(146 /* OutKeyword */)); return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(163 /* QualifiedName */); + const node = createBaseNode(164 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -20819,7 +20839,7 @@ return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(164 /* ComputedPropertyName */); + const node = createBaseNode(165 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -20828,7 +20848,7 @@ return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(165 /* TypeParameter */); + const node = createBaseDeclaration(166 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -20843,7 +20863,7 @@ } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { var _a2, _b; - const node = createBaseDeclaration(166 /* Parameter */); + const node = createBaseDeclaration(167 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -20862,7 +20882,7 @@ return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(167 /* Decorator */); + const node = createBaseNode(168 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -20875,7 +20895,7 @@ return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(168 /* PropertySignature */); + const node = createBaseDeclaration(169 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -20895,7 +20915,7 @@ return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(169 /* PropertyDeclaration */); + const node = createBaseDeclaration(170 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; @@ -20911,7 +20931,7 @@ return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(170 /* MethodSignature */); + const node = createBaseDeclaration(171 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -20929,7 +20949,7 @@ return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(171 /* MethodDeclaration */); + const node = createBaseDeclaration(172 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -20966,7 +20986,7 @@ return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(172 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(173 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -20987,7 +21007,7 @@ return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(173 /* Constructor */); + const node = createBaseDeclaration(174 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; @@ -21013,7 +21033,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(174 /* GetAccessor */); + const node = createBaseDeclaration(175 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -21044,7 +21064,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(175 /* SetAccessor */); + const node = createBaseDeclaration(176 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -21076,7 +21096,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(176 /* CallSignature */); + const node = createBaseDeclaration(177 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21091,7 +21111,7 @@ return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(177 /* ConstructSignature */); + const node = createBaseDeclaration(178 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21106,7 +21126,7 @@ return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(178 /* IndexSignature */); + const node = createBaseDeclaration(179 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -21121,7 +21141,7 @@ return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(201 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(202 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -21134,7 +21154,7 @@ return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(179 /* TypePredicate */); + const node = createBaseNode(180 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -21145,7 +21165,7 @@ return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(180 /* TypeReference */); + const node = createBaseNode(181 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21155,7 +21175,7 @@ return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(181 /* FunctionType */); + const node = createBaseDeclaration(182 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21180,7 +21200,7 @@ return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(182 /* ConstructorType */); + const node = createBaseDeclaration(183 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -21211,7 +21231,7 @@ return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(183 /* TypeQuery */); + const node = createBaseNode(184 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21221,7 +21241,7 @@ return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(184 /* TypeLiteral */); + const node = createBaseDeclaration(185 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21230,7 +21250,7 @@ return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(185 /* ArrayType */); + const node = createBaseNode(186 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21239,7 +21259,7 @@ return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(186 /* TupleType */); + const node = createBaseNode(187 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21248,7 +21268,7 @@ return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(199 /* NamedTupleMember */); + const node = createBaseDeclaration(200 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -21261,7 +21281,7 @@ return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(187 /* OptionalType */); + const node = createBaseNode(188 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21270,7 +21290,7 @@ return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(188 /* RestType */); + const node = createBaseNode(189 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21288,19 +21308,19 @@ return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(189 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(190 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(190 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(191 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(191 /* ConditionalType */); + const node = createBaseNode(192 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -21314,7 +21334,7 @@ return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(192 /* InferType */); + const node = createBaseNode(193 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21323,7 +21343,7 @@ return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(200 /* TemplateLiteralType */); + const node = createBaseNode(201 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21333,7 +21353,7 @@ return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(202 /* ImportType */); + const node = createBaseNode(203 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -21346,7 +21366,7 @@ return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(193 /* ParenthesizedType */); + const node = createBaseNode(194 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21355,14 +21375,14 @@ return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(194 /* ThisType */); + const node = createBaseNode(195 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(195 /* TypeOperator */); + const node = createBaseNode(196 /* TypeOperator */); node.operator = operator; - node.type = operator === 146 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); + node.type = operator === 147 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; } @@ -21370,7 +21390,7 @@ return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(196 /* IndexedAccessType */); + const node = createBaseNode(197 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -21380,7 +21400,7 @@ return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(197 /* MappedType */); + const node = createBaseDeclaration(198 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -21396,7 +21416,7 @@ return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(198 /* LiteralType */); + const node = createBaseNode(199 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21405,7 +21425,7 @@ return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(203 /* ObjectBindingPattern */); + const node = createBaseNode(204 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -21417,7 +21437,7 @@ return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(204 /* ArrayBindingPattern */); + const node = createBaseNode(205 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -21426,7 +21446,7 @@ return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(205 /* BindingElement */); + const node = createBaseDeclaration(206 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -21439,7 +21459,7 @@ return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(206 /* ArrayLiteralExpression */); + const node = createBaseNode(207 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -21451,7 +21471,7 @@ return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(207 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(208 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -21462,7 +21482,7 @@ return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(208 /* PropertyAccessExpression */); + const node = createBaseDeclaration(209 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -21512,7 +21532,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(209 /* ElementAccessExpression */); + const node = createBaseDeclaration(210 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -21562,7 +21582,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(210 /* CallExpression */); + const node = createBaseDeclaration(211 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -21619,7 +21639,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(211 /* NewExpression */); + const node = createBaseDeclaration(212 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -21633,7 +21653,7 @@ return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(212 /* TaggedTemplateExpression */); + const node = createBaseNode(213 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -21654,7 +21674,7 @@ return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(213 /* TypeAssertionExpression */); + const node = createBaseNode(214 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -21664,7 +21684,7 @@ return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(214 /* ParenthesizedExpression */); + const node = createBaseNode(215 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -21674,7 +21694,7 @@ return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(215 /* FunctionExpression */); + const node = createBaseDeclaration(216 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -21699,7 +21719,7 @@ return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(216 /* ArrowFunction */); + const node = createBaseDeclaration(217 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -21721,7 +21741,7 @@ return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(217 /* DeleteExpression */); + const node = createBaseNode(218 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21730,7 +21750,7 @@ return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(218 /* TypeOfExpression */); + const node = createBaseNode(219 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21739,7 +21759,7 @@ return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(219 /* VoidExpression */); + const node = createBaseNode(220 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21748,7 +21768,7 @@ return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(220 /* AwaitExpression */); + const node = createBaseNode(221 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -21757,7 +21777,7 @@ return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(221 /* PrefixUnaryExpression */); + const node = createBaseNode(222 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -21770,7 +21790,7 @@ return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(222 /* PostfixUnaryExpression */); + const node = createBaseNode(223 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -21783,7 +21803,7 @@ return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(223 /* BinaryExpression */); + const node = createBaseDeclaration(224 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -21803,7 +21823,7 @@ } else if (isLogicalOrCoalescingAssignmentOperator(operatorKind)) { node.transformFlags |= 16 /* ContainsES2021 */; } - if (operatorKind === 101 /* InKeyword */ && isPrivateIdentifier(node.left)) { + if (operatorKind === 102 /* InKeyword */ && isPrivateIdentifier(node.left)) { node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */; } node.jsDoc = void 0; @@ -21816,7 +21836,7 @@ return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(224 /* ConditionalExpression */); + const node = createBaseNode(225 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken != null ? questionToken : createToken(57 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -21829,7 +21849,7 @@ return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(225 /* TemplateExpression */); + const node = createBaseNode(226 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -21904,7 +21924,7 @@ } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(226 /* YieldExpression */); + const node = createBaseNode(227 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -21914,7 +21934,7 @@ return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(227 /* SpreadElement */); + const node = createBaseNode(228 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -21923,7 +21943,7 @@ return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(228 /* ClassExpression */); + const node = createBaseDeclaration(229 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -21937,10 +21957,10 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(229 /* OmittedExpression */); + return createBaseNode(230 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(230 /* ExpressionWithTypeArguments */); + const node = createBaseNode(231 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -21954,7 +21974,7 @@ return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(231 /* AsExpression */); + const node = createBaseNode(232 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -21964,7 +21984,7 @@ return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(232 /* NonNullExpression */); + const node = createBaseNode(233 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -21980,7 +22000,7 @@ return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(235 /* SatisfiesExpression */); + const node = createBaseNode(236 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -21990,7 +22010,7 @@ return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(232 /* NonNullExpression */); + const node = createBaseNode(233 /* NonNullExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, @@ -22005,15 +22025,15 @@ return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(233 /* MetaProperty */); + const node = createBaseNode(234 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); switch (keywordToken) { - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: node.transformFlags |= 1024 /* ContainsES2015 */; break; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: node.transformFlags |= 4 /* ContainsESNext */; break; default: @@ -22026,7 +22046,7 @@ return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(236 /* TemplateSpan */); + const node = createBaseNode(237 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -22036,12 +22056,12 @@ return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(237 /* SemicolonClassElement */); + const node = createBaseNode(238 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(238 /* Block */); + const node = createBaseNode(239 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -22054,7 +22074,7 @@ return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(240 /* VariableStatement */); + const node = createBaseNode(241 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -22069,12 +22089,12 @@ return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(239 /* EmptyStatement */); + const node = createBaseNode(240 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(241 /* ExpressionStatement */); + const node = createBaseNode(242 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -22085,7 +22105,7 @@ return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(242 /* IfStatement */); + const node = createBaseNode(243 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -22098,7 +22118,7 @@ return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(243 /* DoStatement */); + const node = createBaseNode(244 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -22110,7 +22130,7 @@ return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(244 /* WhileStatement */); + const node = createBaseNode(245 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -22122,7 +22142,7 @@ return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(245 /* ForStatement */); + const node = createBaseNode(246 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -22138,7 +22158,7 @@ return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(246 /* ForInStatement */); + const node = createBaseNode(247 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -22153,7 +22173,7 @@ return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(247 /* ForOfStatement */); + const node = createBaseNode(248 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -22171,7 +22191,7 @@ return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(248 /* ContinueStatement */); + const node = createBaseNode(249 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22182,7 +22202,7 @@ return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(249 /* BreakStatement */); + const node = createBaseNode(250 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22193,7 +22213,7 @@ return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(250 /* ReturnStatement */); + const node = createBaseNode(251 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22204,7 +22224,7 @@ return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(251 /* WithStatement */); + const node = createBaseNode(252 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -22216,7 +22236,7 @@ return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(252 /* SwitchStatement */); + const node = createBaseNode(253 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -22229,7 +22249,7 @@ return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(253 /* LabeledStatement */); + const node = createBaseNode(254 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -22241,7 +22261,7 @@ return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(254 /* ThrowStatement */); + const node = createBaseNode(255 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -22252,7 +22272,7 @@ return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(255 /* TryStatement */); + const node = createBaseNode(256 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -22265,14 +22285,14 @@ return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(256 /* DebuggerStatement */); + const node = createBaseNode(257 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { var _a2; - const node = createBaseDeclaration(257 /* VariableDeclaration */); + const node = createBaseDeclaration(258 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -22285,7 +22305,7 @@ return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(258 /* VariableDeclarationList */); + const node = createBaseNode(259 /* VariableDeclarationList */); node.flags |= flags2 & 3 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -22298,7 +22318,7 @@ return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(259 /* FunctionDeclaration */); + const node = createBaseDeclaration(260 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -22334,7 +22354,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(260 /* ClassDeclaration */); + const node = createBaseDeclaration(261 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22355,7 +22375,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(261 /* InterfaceDeclaration */); + const node = createBaseDeclaration(262 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22369,7 +22389,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(262 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(263 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22384,7 +22404,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(263 /* EnumDeclaration */); + const node = createBaseDeclaration(264 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -22397,7 +22417,7 @@ return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(264 /* ModuleDeclaration */); + const node = createBaseDeclaration(265 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); node.name = name; @@ -22417,7 +22437,7 @@ return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(265 /* ModuleBlock */); + const node = createBaseNode(266 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -22427,7 +22447,7 @@ return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(266 /* CaseBlock */); + const node = createBaseNode(267 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -22438,7 +22458,7 @@ return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(267 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(268 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -22455,7 +22475,7 @@ return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(268 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(269 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -22472,7 +22492,7 @@ return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(269 /* ImportDeclaration */); + const node = createBaseNode(270 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -22486,7 +22506,7 @@ return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(270 /* ImportClause */); + const node = createBaseDeclaration(271 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -22501,7 +22521,7 @@ return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(296 /* AssertClause */); + const node = createBaseNode(297 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -22511,7 +22531,7 @@ return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(297 /* AssertEntry */); + const node = createBaseNode(298 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -22521,7 +22541,7 @@ return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(298 /* ImportTypeAssertionContainer */); + const node = createBaseNode(299 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -22530,7 +22550,7 @@ return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(271 /* NamespaceImport */); + const node = createBaseDeclaration(272 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22540,7 +22560,7 @@ return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(277 /* NamespaceExport */); + const node = createBaseDeclaration(278 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22550,7 +22570,7 @@ return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(272 /* NamedImports */); + const node = createBaseNode(273 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22560,7 +22580,7 @@ return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(273 /* ImportSpecifier */); + const node = createBaseDeclaration(274 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -22572,7 +22592,7 @@ return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment2(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(274 /* ExportAssignment */); + const node = createBaseDeclaration(275 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -22590,7 +22610,7 @@ return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(275 /* ExportDeclaration */); + const node = createBaseDeclaration(276 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -22613,7 +22633,7 @@ return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(276 /* NamedExports */); + const node = createBaseNode(277 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22623,7 +22643,7 @@ return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(278 /* ExportSpecifier */); + const node = createBaseNode(279 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -22636,12 +22656,12 @@ return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(279 /* MissingDeclaration */); + const node = createBaseDeclaration(280 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(280 /* ExternalModuleReference */); + const node = createBaseNode(281 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22673,7 +22693,7 @@ return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(320 /* JSDocFunctionType */); + const node = createBaseDeclaration(321 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -22687,7 +22707,7 @@ return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(325 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(326 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -22696,7 +22716,7 @@ return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(312 /* JSDocTypeExpression */); + const node = createBaseNode(313 /* JSDocTypeExpression */); node.type = type; return node; } @@ -22704,7 +22724,7 @@ return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(326 /* JSDocSignature */); + const node = createBaseDeclaration(327 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -22733,7 +22753,7 @@ return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(348 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); + const node = createBaseJSDocTag(349 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -22742,7 +22762,7 @@ return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(349 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(350 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -22754,7 +22774,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(344 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(345 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -22765,7 +22785,7 @@ return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(351 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(352 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -22776,7 +22796,7 @@ return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(341 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(342 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -22788,7 +22808,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(342 /* JSDocOverloadTag */, tagName != null ? tagName : createIdentifier("overload"), comment); + const node = createBaseJSDocTag(343 /* JSDocOverloadTag */, tagName != null ? tagName : createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -22796,7 +22816,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(331 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); + const node = createBaseJSDocTag(332 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); node.class = className; return node; } @@ -22804,12 +22824,12 @@ return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(332 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); + const node = createBaseJSDocTag(333 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(350 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); + const node = createBaseJSDocTag(351 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); node.name = name; return node; } @@ -22817,7 +22837,7 @@ return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(313 /* JSDocNameReference */); + const node = createBaseNode(314 /* JSDocNameReference */); node.name = name; return node; } @@ -22825,7 +22845,7 @@ return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(314 /* JSDocMemberName */); + const node = createBaseNode(315 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -22835,7 +22855,7 @@ return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(327 /* JSDocLink */); + const node = createBaseNode(328 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -22844,7 +22864,7 @@ return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(328 /* JSDocLinkCode */); + const node = createBaseNode(329 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -22853,7 +22873,7 @@ return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(329 /* JSDocLinkPlain */); + const node = createBaseNode(330 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -22880,14 +22900,14 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(330 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(331 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(343 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(343 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(344 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(344 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -22897,7 +22917,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(324 /* JSDocText */); + const node = createBaseNode(325 /* JSDocText */); node.text = text; return node; } @@ -22905,7 +22925,7 @@ return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(323 /* JSDoc */); + const node = createBaseNode(324 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -22914,7 +22934,7 @@ return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(281 /* JsxElement */); + const node = createBaseNode(282 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -22925,7 +22945,7 @@ return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(282 /* JsxSelfClosingElement */); + const node = createBaseNode(283 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -22939,7 +22959,7 @@ return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(283 /* JsxOpeningElement */); + const node = createBaseNode(284 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -22953,7 +22973,7 @@ return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(284 /* JsxClosingElement */); + const node = createBaseNode(285 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -22962,7 +22982,7 @@ return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(285 /* JsxFragment */); + const node = createBaseNode(286 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -22983,17 +23003,17 @@ return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(286 /* JsxOpeningFragment */); + const node = createBaseNode(287 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(287 /* JsxClosingFragment */); + const node = createBaseNode(288 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(288 /* JsxAttribute */); + const node = createBaseDeclaration(289 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -23003,7 +23023,7 @@ return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(289 /* JsxAttributes */); + const node = createBaseDeclaration(290 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -23012,7 +23032,7 @@ return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(290 /* JsxSpreadAttribute */); + const node = createBaseNode(291 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -23021,7 +23041,7 @@ return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(291 /* JsxExpression */); + const node = createBaseNode(292 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -23031,7 +23051,7 @@ return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(292 /* CaseClause */); + const node = createBaseNode(293 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -23042,7 +23062,7 @@ return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(293 /* DefaultClause */); + const node = createBaseNode(294 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -23051,15 +23071,15 @@ return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(294 /* HeritageClause */); + const node = createBaseNode(295 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); switch (token) { - case 94 /* ExtendsKeyword */: + case 95 /* ExtendsKeyword */: node.transformFlags |= 1024 /* ContainsES2015 */; break; - case 117 /* ImplementsKeyword */: + case 118 /* ImplementsKeyword */: node.transformFlags |= 1 /* ContainsTypeScript */; break; default: @@ -23071,7 +23091,7 @@ return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(295 /* CatchClause */); + const node = createBaseNode(296 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -23083,7 +23103,7 @@ return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(299 /* PropertyAssignment */); + const node = createBaseDeclaration(300 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -23105,7 +23125,7 @@ return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(300 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(301 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -23129,7 +23149,7 @@ return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(301 /* SpreadAssignment */); + const node = createBaseDeclaration(302 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -23139,7 +23159,7 @@ return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(302 /* EnumMember */); + const node = createBaseDeclaration(303 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -23150,7 +23170,7 @@ return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(309 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -23231,7 +23251,7 @@ return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(309 /* SourceFile */); node.flags |= source.flags & ~8 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { @@ -23265,7 +23285,7 @@ return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(309 /* Bundle */); + const node = createBaseNode(310 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; @@ -23278,7 +23298,7 @@ return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(310 /* UnparsedSource */); + const node = createBaseNode(311 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -23295,48 +23315,48 @@ return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(303 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(304 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(304 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(305 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 306 /* UnparsedInternalText */ : 305 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 307 /* UnparsedInternalText */ : 306 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(307 /* UnparsedSyntheticReference */); + const node = createBaseNode(308 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(311 /* InputFiles */); + const node = createBaseNode(312 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(234 /* SyntheticExpression */); + const node = createBaseNode(235 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList3(children) { - const node = createBaseNode(354 /* SyntaxList */); + const node = createBaseNode(355 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(355 /* NotEmittedStatement */); + const node = createBaseNode(356 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(356 /* PartiallyEmittedExpression */); + const node = createBaseNode(357 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -23358,7 +23378,7 @@ return node; } function createCommaListExpression(elements) { - const node = createBaseNode(357 /* CommaListExpression */); + const node = createBaseNode(358 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -23367,19 +23387,19 @@ return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createEndOfDeclarationMarker(original) { - const node = createBaseNode(359 /* EndOfDeclarationMarker */); + const node = createBaseNode(360 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createMergeDeclarationMarker(original) { - const node = createBaseNode(358 /* MergeDeclarationMarker */); + const node = createBaseNode(359 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(360 /* SyntheticReferenceExpression */); + const node = createBaseNode(361 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -23612,17 +23632,17 @@ } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 231 /* AsExpression */: + case 232 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -23657,18 +23677,18 @@ switch (target.kind) { case 79 /* Identifier */: return cacheIdentifiers; - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: return false; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -23980,43 +24000,43 @@ } function getDefaultTagNameForKind(kind) { switch (kind) { - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return "type"; - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: return "returns"; - case 346 /* JSDocThisTag */: + case 347 /* JSDocThisTag */: return "this"; - case 343 /* JSDocEnumTag */: + case 344 /* JSDocEnumTag */: return "enum"; - case 333 /* JSDocAuthorTag */: + case 334 /* JSDocAuthorTag */: return "author"; - case 335 /* JSDocClassTag */: + case 336 /* JSDocClassTag */: return "class"; - case 336 /* JSDocPublicTag */: + case 337 /* JSDocPublicTag */: return "public"; - case 337 /* JSDocPrivateTag */: + case 338 /* JSDocPrivateTag */: return "private"; - case 338 /* JSDocProtectedTag */: + case 339 /* JSDocProtectedTag */: return "protected"; - case 339 /* JSDocReadonlyTag */: + case 340 /* JSDocReadonlyTag */: return "readonly"; - case 340 /* JSDocOverrideTag */: + case 341 /* JSDocOverrideTag */: return "override"; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return "template"; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return "typedef"; - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return "param"; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return "prop"; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: return "callback"; - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return "overload"; - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return "augments"; - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -24098,70 +24118,70 @@ children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */) { + if (kind >= 180 /* FirstTypeNode */ && kind <= 203 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 206 /* ArrayLiteralExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 207 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 166 /* Parameter */: + case 167 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 173 /* Constructor */: + case 174 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; - case 131 /* AnyKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 144 /* NeverKeyword */: - case 152 /* StringKeyword */: - case 149 /* ObjectKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 114 /* VoidKeyword */: - case 165 /* TypeParameter */: - case 168 /* PropertySignature */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 132 /* AnyKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 145 /* NeverKeyword */: + case 153 /* StringKeyword */: + case 150 /* ObjectKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 115 /* VoidKeyword */: + case 166 /* TypeParameter */: + case 169 /* PropertySignature */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 295 /* CatchClause */: + case 296 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 213 /* TypeAssertionExpression */: - case 235 /* SatisfiesExpression */: - case 231 /* AsExpression */: - case 356 /* PartiallyEmittedExpression */: - case 214 /* ParenthesizedExpression */: - case 106 /* SuperKeyword */: + case 214 /* TypeAssertionExpression */: + case 236 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 357 /* PartiallyEmittedExpression */: + case 215 /* ParenthesizedExpression */: + case 107 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -24510,7 +24530,7 @@ var _a2; if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = (_a2 = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node)))) != null ? _a2 : Debug.fail("Could not determine parsed source file."); @@ -24919,7 +24939,7 @@ void 0, factory2.createBinaryExpression( propertyName, - 101 /* InKeyword */, + 102 /* InKeyword */, factory2.createIdentifier("obj") ) ) @@ -25825,619 +25845,619 @@ return node.kind === 80 /* PrivateIdentifier */; } function isExportModifier(node) { - return node.kind === 93 /* ExportKeyword */; + return node.kind === 94 /* ExportKeyword */; } function isDefaultModifier(node) { - return node.kind === 88 /* DefaultKeyword */; + return node.kind === 89 /* DefaultKeyword */; } function isAsyncModifier(node) { - return node.kind === 132 /* AsyncKeyword */; + return node.kind === 133 /* AsyncKeyword */; } function isAssertsKeyword(node) { - return node.kind === 129 /* AssertsKeyword */; + return node.kind === 130 /* AssertsKeyword */; } function isAwaitKeyword(node) { - return node.kind === 133 /* AwaitKeyword */; + return node.kind === 134 /* AwaitKeyword */; } function isReadonlyKeyword(node) { - return node.kind === 146 /* ReadonlyKeyword */; + return node.kind === 147 /* ReadonlyKeyword */; } function isStaticModifier(node) { - return node.kind === 124 /* StaticKeyword */; + return node.kind === 125 /* StaticKeyword */; } function isAbstractModifier(node) { - return node.kind === 126 /* AbstractKeyword */; + return node.kind === 127 /* AbstractKeyword */; } function isOverrideModifier(node) { - return node.kind === 161 /* OverrideKeyword */; + return node.kind === 162 /* OverrideKeyword */; } function isAccessorModifier(node) { - return node.kind === 127 /* AccessorKeyword */; + return node.kind === 128 /* AccessorKeyword */; } function isSuperKeyword(node) { - return node.kind === 106 /* SuperKeyword */; + return node.kind === 107 /* SuperKeyword */; } function isImportKeyword(node) { - return node.kind === 100 /* ImportKeyword */; + return node.kind === 101 /* ImportKeyword */; } function isCaseKeyword(node) { - return node.kind === 82 /* CaseKeyword */; + return node.kind === 83 /* CaseKeyword */; } function isQualifiedName(node) { - return node.kind === 163 /* QualifiedName */; + return node.kind === 164 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 164 /* ComputedPropertyName */; + return node.kind === 165 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 165 /* TypeParameter */; + return node.kind === 166 /* TypeParameter */; } function isParameter(node) { - return node.kind === 166 /* Parameter */; + return node.kind === 167 /* Parameter */; } function isDecorator(node) { - return node.kind === 167 /* Decorator */; + return node.kind === 168 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 168 /* PropertySignature */; + return node.kind === 169 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 169 /* PropertyDeclaration */; + return node.kind === 170 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 170 /* MethodSignature */; + return node.kind === 171 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 171 /* MethodDeclaration */; + return node.kind === 172 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 172 /* ClassStaticBlockDeclaration */; + return node.kind === 173 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 173 /* Constructor */; + return node.kind === 174 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 174 /* GetAccessor */; + return node.kind === 175 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 175 /* SetAccessor */; + return node.kind === 176 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 176 /* CallSignature */; + return node.kind === 177 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 177 /* ConstructSignature */; + return node.kind === 178 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 178 /* IndexSignature */; + return node.kind === 179 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 179 /* TypePredicate */; + return node.kind === 180 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 180 /* TypeReference */; + return node.kind === 181 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 181 /* FunctionType */; + return node.kind === 182 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 182 /* ConstructorType */; + return node.kind === 183 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 183 /* TypeQuery */; + return node.kind === 184 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 184 /* TypeLiteral */; + return node.kind === 185 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 185 /* ArrayType */; + return node.kind === 186 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 186 /* TupleType */; + return node.kind === 187 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 199 /* NamedTupleMember */; + return node.kind === 200 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 187 /* OptionalType */; + return node.kind === 188 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 188 /* RestType */; + return node.kind === 189 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 189 /* UnionType */; + return node.kind === 190 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 190 /* IntersectionType */; + return node.kind === 191 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 191 /* ConditionalType */; + return node.kind === 192 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 192 /* InferType */; + return node.kind === 193 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 193 /* ParenthesizedType */; + return node.kind === 194 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 194 /* ThisType */; + return node.kind === 195 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 195 /* TypeOperator */; + return node.kind === 196 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 196 /* IndexedAccessType */; + return node.kind === 197 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 197 /* MappedType */; + return node.kind === 198 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 198 /* LiteralType */; + return node.kind === 199 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 202 /* ImportType */; + return node.kind === 203 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 201 /* TemplateLiteralTypeSpan */; + return node.kind === 202 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 200 /* TemplateLiteralType */; + return node.kind === 201 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 203 /* ObjectBindingPattern */; + return node.kind === 204 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 204 /* ArrayBindingPattern */; + return node.kind === 205 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 205 /* BindingElement */; + return node.kind === 206 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 206 /* ArrayLiteralExpression */; + return node.kind === 207 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 207 /* ObjectLiteralExpression */; + return node.kind === 208 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 208 /* PropertyAccessExpression */; + return node.kind === 209 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 209 /* ElementAccessExpression */; + return node.kind === 210 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 210 /* CallExpression */; + return node.kind === 211 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 211 /* NewExpression */; + return node.kind === 212 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 212 /* TaggedTemplateExpression */; + return node.kind === 213 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 213 /* TypeAssertionExpression */; + return node.kind === 214 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 214 /* ParenthesizedExpression */; + return node.kind === 215 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 215 /* FunctionExpression */; + return node.kind === 216 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 216 /* ArrowFunction */; + return node.kind === 217 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 217 /* DeleteExpression */; + return node.kind === 218 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 218 /* TypeOfExpression */; + return node.kind === 219 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 219 /* VoidExpression */; + return node.kind === 220 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 220 /* AwaitExpression */; + return node.kind === 221 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 221 /* PrefixUnaryExpression */; + return node.kind === 222 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 222 /* PostfixUnaryExpression */; + return node.kind === 223 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 223 /* BinaryExpression */; + return node.kind === 224 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 224 /* ConditionalExpression */; + return node.kind === 225 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 225 /* TemplateExpression */; + return node.kind === 226 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 226 /* YieldExpression */; + return node.kind === 227 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 227 /* SpreadElement */; + return node.kind === 228 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 228 /* ClassExpression */; + return node.kind === 229 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 229 /* OmittedExpression */; + return node.kind === 230 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 230 /* ExpressionWithTypeArguments */; + return node.kind === 231 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 231 /* AsExpression */; + return node.kind === 232 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 235 /* SatisfiesExpression */; + return node.kind === 236 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 232 /* NonNullExpression */; + return node.kind === 233 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 233 /* MetaProperty */; + return node.kind === 234 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 234 /* SyntheticExpression */; + return node.kind === 235 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 356 /* PartiallyEmittedExpression */; + return node.kind === 357 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 357 /* CommaListExpression */; + return node.kind === 358 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 236 /* TemplateSpan */; + return node.kind === 237 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 237 /* SemicolonClassElement */; + return node.kind === 238 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 238 /* Block */; + return node.kind === 239 /* Block */; } function isVariableStatement(node) { - return node.kind === 240 /* VariableStatement */; + return node.kind === 241 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 239 /* EmptyStatement */; + return node.kind === 240 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 241 /* ExpressionStatement */; + return node.kind === 242 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 242 /* IfStatement */; + return node.kind === 243 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 243 /* DoStatement */; + return node.kind === 244 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 244 /* WhileStatement */; + return node.kind === 245 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 245 /* ForStatement */; + return node.kind === 246 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 246 /* ForInStatement */; + return node.kind === 247 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 247 /* ForOfStatement */; + return node.kind === 248 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 248 /* ContinueStatement */; + return node.kind === 249 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 249 /* BreakStatement */; + return node.kind === 250 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 250 /* ReturnStatement */; + return node.kind === 251 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 251 /* WithStatement */; + return node.kind === 252 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 252 /* SwitchStatement */; + return node.kind === 253 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 253 /* LabeledStatement */; + return node.kind === 254 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 254 /* ThrowStatement */; + return node.kind === 255 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 255 /* TryStatement */; + return node.kind === 256 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 256 /* DebuggerStatement */; + return node.kind === 257 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 257 /* VariableDeclaration */; + return node.kind === 258 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 258 /* VariableDeclarationList */; + return node.kind === 259 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 259 /* FunctionDeclaration */; + return node.kind === 260 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 260 /* ClassDeclaration */; + return node.kind === 261 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 261 /* InterfaceDeclaration */; + return node.kind === 262 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 262 /* TypeAliasDeclaration */; + return node.kind === 263 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 263 /* EnumDeclaration */; + return node.kind === 264 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */; + return node.kind === 265 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 265 /* ModuleBlock */; + return node.kind === 266 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 266 /* CaseBlock */; + return node.kind === 267 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 267 /* NamespaceExportDeclaration */; + return node.kind === 268 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */; + return node.kind === 269 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 269 /* ImportDeclaration */; + return node.kind === 270 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 270 /* ImportClause */; + return node.kind === 271 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 298 /* ImportTypeAssertionContainer */; + return node.kind === 299 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 296 /* AssertClause */; + return node.kind === 297 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 297 /* AssertEntry */; + return node.kind === 298 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 271 /* NamespaceImport */; + return node.kind === 272 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 277 /* NamespaceExport */; + return node.kind === 278 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 272 /* NamedImports */; + return node.kind === 273 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 273 /* ImportSpecifier */; + return node.kind === 274 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 274 /* ExportAssignment */; + return node.kind === 275 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 275 /* ExportDeclaration */; + return node.kind === 276 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 276 /* NamedExports */; + return node.kind === 277 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 278 /* ExportSpecifier */; + return node.kind === 279 /* ExportSpecifier */; } function isMissingDeclaration(node) { - return node.kind === 279 /* MissingDeclaration */; + return node.kind === 280 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 355 /* NotEmittedStatement */; + return node.kind === 356 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 360 /* SyntheticReferenceExpression */; + return node.kind === 361 /* SyntheticReferenceExpression */; } function isMergeDeclarationMarker(node) { - return node.kind === 358 /* MergeDeclarationMarker */; + return node.kind === 359 /* MergeDeclarationMarker */; } function isEndOfDeclarationMarker(node) { - return node.kind === 359 /* EndOfDeclarationMarker */; + return node.kind === 360 /* EndOfDeclarationMarker */; } function isExternalModuleReference(node) { - return node.kind === 280 /* ExternalModuleReference */; + return node.kind === 281 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 281 /* JsxElement */; + return node.kind === 282 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 282 /* JsxSelfClosingElement */; + return node.kind === 283 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 283 /* JsxOpeningElement */; + return node.kind === 284 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 284 /* JsxClosingElement */; + return node.kind === 285 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 285 /* JsxFragment */; + return node.kind === 286 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 286 /* JsxOpeningFragment */; + return node.kind === 287 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 287 /* JsxClosingFragment */; + return node.kind === 288 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 288 /* JsxAttribute */; + return node.kind === 289 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 289 /* JsxAttributes */; + return node.kind === 290 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 290 /* JsxSpreadAttribute */; + return node.kind === 291 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 291 /* JsxExpression */; + return node.kind === 292 /* JsxExpression */; } function isCaseClause(node) { - return node.kind === 292 /* CaseClause */; + return node.kind === 293 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 293 /* DefaultClause */; + return node.kind === 294 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 294 /* HeritageClause */; + return node.kind === 295 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 295 /* CatchClause */; + return node.kind === 296 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 299 /* PropertyAssignment */; + return node.kind === 300 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 300 /* ShorthandPropertyAssignment */; + return node.kind === 301 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 301 /* SpreadAssignment */; + return node.kind === 302 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 302 /* EnumMember */; + return node.kind === 303 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 304 /* UnparsedPrepend */; + return node.kind === 305 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 308 /* SourceFile */; + return node.kind === 309 /* SourceFile */; } function isBundle(node) { - return node.kind === 309 /* Bundle */; + return node.kind === 310 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 310 /* UnparsedSource */; + return node.kind === 311 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 312 /* JSDocTypeExpression */; + return node.kind === 313 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 313 /* JSDocNameReference */; + return node.kind === 314 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 314 /* JSDocMemberName */; + return node.kind === 315 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 327 /* JSDocLink */; + return node.kind === 328 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 328 /* JSDocLinkCode */; + return node.kind === 329 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 329 /* JSDocLinkPlain */; + return node.kind === 330 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 315 /* JSDocAllType */; + return node.kind === 316 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 316 /* JSDocUnknownType */; + return node.kind === 317 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 317 /* JSDocNullableType */; + return node.kind === 318 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 318 /* JSDocNonNullableType */; + return node.kind === 319 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 319 /* JSDocOptionalType */; + return node.kind === 320 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 320 /* JSDocFunctionType */; + return node.kind === 321 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 321 /* JSDocVariadicType */; + return node.kind === 322 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 322 /* JSDocNamepathType */; + return node.kind === 323 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 323 /* JSDoc */; + return node.kind === 324 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 325 /* JSDocTypeLiteral */; + return node.kind === 326 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 326 /* JSDocSignature */; + return node.kind === 327 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 331 /* JSDocAugmentsTag */; + return node.kind === 332 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 333 /* JSDocAuthorTag */; + return node.kind === 334 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 335 /* JSDocClassTag */; + return node.kind === 336 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 341 /* JSDocCallbackTag */; + return node.kind === 342 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 336 /* JSDocPublicTag */; + return node.kind === 337 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 337 /* JSDocPrivateTag */; + return node.kind === 338 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 338 /* JSDocProtectedTag */; + return node.kind === 339 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 339 /* JSDocReadonlyTag */; + return node.kind === 340 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 340 /* JSDocOverrideTag */; + return node.kind === 341 /* JSDocOverrideTag */; } function isJSDocOverloadTag(node) { - return node.kind === 342 /* JSDocOverloadTag */; + return node.kind === 343 /* JSDocOverloadTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 334 /* JSDocDeprecatedTag */; + return node.kind === 335 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 350 /* JSDocSeeTag */; + return node.kind === 351 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 343 /* JSDocEnumTag */; + return node.kind === 344 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 344 /* JSDocParameterTag */; + return node.kind === 345 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 345 /* JSDocReturnTag */; + return node.kind === 346 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 346 /* JSDocThisTag */; + return node.kind === 347 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 347 /* JSDocTypeTag */; + return node.kind === 348 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 348 /* JSDocTemplateTag */; + return node.kind === 349 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 349 /* JSDocTypedefTag */; + return node.kind === 350 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 330 /* JSDocTag */; + return node.kind === 331 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 351 /* JSDocPropertyTag */; + return node.kind === 352 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 332 /* JSDocImplementsTag */; + return node.kind === 333 /* JSDocImplementsTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 353 /* JSDocSatisfiesTag */; + return node.kind === 354 /* JSDocSatisfiesTag */; } function isJSDocThrowsTag(node) { - return node.kind === 352 /* JSDocThrowsTag */; + return node.kind === 353 /* JSDocThrowsTag */; } function isSyntaxList(n) { - return n.kind === 354 /* SyntaxList */; + return n.kind === 355 /* SyntaxList */; } var init_nodeTests = __esm({ "src/compiler/factory/nodeTests.ts"() { @@ -26751,14 +26771,14 @@ Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -26811,7 +26831,7 @@ return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaExpression(node) { - return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */; + return node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -26826,19 +26846,19 @@ } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 235 /* SatisfiesExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 236 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -26975,10 +26995,10 @@ const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 269 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 270 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 275 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 276 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -27041,11 +27061,11 @@ } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -27064,11 +27084,11 @@ } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 166 /* Parameter */: - case 205 /* BindingElement */: + case 167 /* Parameter */: + case 206 /* BindingElement */: return bindingElement.dotDotDotToken; - case 227 /* SpreadElement */: - case 301 /* SpreadAssignment */: + case 228 /* SpreadElement */: + case 302 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -27080,7 +27100,7 @@ } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 205 /* BindingElement */: + case 206 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -27089,7 +27109,7 @@ return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -27098,7 +27118,7 @@ return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -27115,11 +27135,11 @@ } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return name.elements; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return name.properties; } } @@ -27136,19 +27156,19 @@ } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 175 /* SetAccessor */; + return kind === 174 /* Constructor */ || kind === 176 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 174 /* Constructor */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 259 /* FunctionDeclaration */ || kind === 173 /* Constructor */ || kind === 178 /* IndexSignature */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 240 /* VariableStatement */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */; + return kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 260 /* FunctionDeclaration */ || kind === 174 /* Constructor */ || kind === 179 /* IndexSignature */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 280 /* MissingDeclaration */ || kind === 241 /* VariableStatement */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 275 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 172 /* ClassStaticBlockDeclaration */ || kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 279 /* MissingDeclaration */ || kind === 267 /* NamespaceExportDeclaration */; + return kind === 173 /* ClassStaticBlockDeclaration */ || kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 280 /* MissingDeclaration */ || kind === 268 /* NamespaceExportDeclaration */; } function isQuestionOrExclamationToken(node) { return isQuestionToken(node) || isExclamationToken(node); @@ -27167,7 +27187,7 @@ } function isLiteralTypeLikeExpression(node) { const kind = node.kind; - return kind === 104 /* NullKeyword */ || kind === 110 /* TrueKeyword */ || kind === 95 /* FalseKeyword */ || isLiteralExpression(node) || isPrefixUnaryExpression(node); + return kind === 105 /* NullKeyword */ || kind === 111 /* TrueKeyword */ || kind === 96 /* FalseKeyword */ || isLiteralExpression(node) || isPrefixUnaryExpression(node); } function isExponentiationOperator(kind) { return kind === 42 /* AsteriskAsteriskToken */; @@ -27191,7 +27211,7 @@ return isShiftOperator(kind) || isAdditiveOperatorOrHigher(kind); } function isRelationalOperator(kind) { - return kind === 29 /* LessThanToken */ || kind === 32 /* LessThanEqualsToken */ || kind === 31 /* GreaterThanToken */ || kind === 33 /* GreaterThanEqualsToken */ || kind === 102 /* InstanceOfKeyword */ || kind === 101 /* InKeyword */; + return kind === 29 /* LessThanToken */ || kind === 32 /* LessThanEqualsToken */ || kind === 31 /* GreaterThanToken */ || kind === 33 /* GreaterThanEqualsToken */ || kind === 103 /* InstanceOfKeyword */ || kind === 102 /* InKeyword */; } function isRelationalOperatorOrHigher(kind) { return isRelationalOperator(kind) || isShiftOperatorOrHigher(kind); @@ -27240,7 +27260,7 @@ } } function isExportOrDefaultKeywordKind(kind) { - return kind === 93 /* ExportKeyword */ || kind === 88 /* DefaultKeyword */; + return kind === 94 /* ExportKeyword */ || kind === 89 /* DefaultKeyword */; } function isExportOrDefaultModifier(node) { const kind = node.kind; @@ -27553,11 +27573,11 @@ } function canHaveModifiers(node) { const kind = node.kind; - return kind === 165 /* TypeParameter */ || kind === 166 /* Parameter */ || kind === 168 /* PropertySignature */ || kind === 169 /* PropertyDeclaration */ || kind === 170 /* MethodSignature */ || kind === 171 /* MethodDeclaration */ || kind === 173 /* Constructor */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 178 /* IndexSignature */ || kind === 182 /* ConstructorType */ || kind === 215 /* FunctionExpression */ || kind === 216 /* ArrowFunction */ || kind === 228 /* ClassExpression */ || kind === 240 /* VariableStatement */ || kind === 259 /* FunctionDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 275 /* ExportDeclaration */; + return kind === 166 /* TypeParameter */ || kind === 167 /* Parameter */ || kind === 169 /* PropertySignature */ || kind === 170 /* PropertyDeclaration */ || kind === 171 /* MethodSignature */ || kind === 172 /* MethodDeclaration */ || kind === 174 /* Constructor */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 179 /* IndexSignature */ || kind === 183 /* ConstructorType */ || kind === 216 /* FunctionExpression */ || kind === 217 /* ArrowFunction */ || kind === 229 /* ClassExpression */ || kind === 241 /* VariableStatement */ || kind === 260 /* FunctionDeclaration */ || kind === 261 /* ClassDeclaration */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 275 /* ExportAssignment */ || kind === 276 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 166 /* Parameter */ || kind === 169 /* PropertyDeclaration */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 228 /* ClassExpression */ || kind === 260 /* ClassDeclaration */; + return kind === 167 /* Parameter */ || kind === 170 /* PropertyDeclaration */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 229 /* ClassExpression */ || kind === 261 /* ClassDeclaration */; } var init_utilitiesPublic2 = __esm({ "src/compiler/factory/utilitiesPublic.ts"() { @@ -27590,7 +27610,7 @@ return forEach(sourceFile.statements, isAnExternalModuleIndicatorNode) || getImportMetaIfNecessary(sourceFile); } function isAnExternalModuleIndicatorNode(node) { - return canHaveModifiers(node) && hasModifierOfKind(node, 93 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; + return canHaveModifiers(node) && hasModifierOfKind(node, 94 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { return sourceFile.flags & 4194304 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; @@ -27602,7 +27622,7 @@ return some(node.modifiers, (m) => m.kind === kind); } function isImportMeta2(node) { - return isMetaProperty(node) && node.keywordToken === 100 /* ImportKeyword */ && node.name.escapedText === "meta"; + return isMetaProperty(node) && node.keywordToken === 101 /* ImportKeyword */ && node.name.escapedText === "meta"; } function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -27657,7 +27677,7 @@ return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 162 /* LastToken */) { + if (node === void 0 || node.kind <= 163 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -27692,7 +27712,7 @@ continue; return res; } - if (current.kind >= 163 /* FirstNode */) { + if (current.kind >= 164 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -27991,7 +28011,7 @@ if (lhs.kind === 79 /* Identifier */) { return lhs.escapedText === rhs.escapedText; } - if (lhs.kind === 108 /* ThisKeyword */) { + if (lhs.kind === 109 /* ThisKeyword */) { return true; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -28012,425 +28032,425 @@ }; parseNodeFactory = createNodeFactory(1 /* NoParenthesizerRules */, parseBaseNodeFactory); forEachChildTable = { - [163 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [164 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [165 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [166 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [300 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [301 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [301 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [302 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [166 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [167 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [169 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [170 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [168 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [169 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [299 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [300 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [257 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [258 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [205 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [206 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [178 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [179 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [182 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [183 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [181 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [182 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [176 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [177 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [171 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [177 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [178 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [172 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [170 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [171 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [173 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [174 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [174 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [175 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [175 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [176 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [259 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [260 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [215 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [216 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [216 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [217 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [172 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [173 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [180 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [181 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [179 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [180 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [183 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [184 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [184 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [185 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [185 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [186 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [186 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [187 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [189 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [190 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [191 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [190 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [191 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [192 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [192 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [193 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [202 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [203 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [298 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [299 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [193 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [195 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [196 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [194 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [196 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [197 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [197 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [198 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [198 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [199 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [199 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [200 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [203 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [204 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [206 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [204 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [205 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [207 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [207 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [208 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [208 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [209 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [209 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [210 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [210 /* CallExpression */]: forEachChildInCallOrNewExpression, - [211 /* NewExpression */]: forEachChildInCallOrNewExpression, - [212 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [211 /* CallExpression */]: forEachChildInCallOrNewExpression, + [212 /* NewExpression */]: forEachChildInCallOrNewExpression, + [213 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [213 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [214 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [214 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [215 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [217 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [218 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [218 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [219 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [219 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [220 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [222 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [226 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [227 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [220 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [221 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [223 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [223 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [224 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [231 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [232 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [232 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [233 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [235 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [236 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [233 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [234 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [224 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [225 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [227 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [228 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [238 /* Block */]: forEachChildInBlock, - [265 /* ModuleBlock */]: forEachChildInBlock, - [308 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [239 /* Block */]: forEachChildInBlock, + [266 /* ModuleBlock */]: forEachChildInBlock, + [309 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [240 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [241 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [258 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [259 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [241 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [242 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [242 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [243 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [243 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [244 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [244 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [245 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [245 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [246 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [246 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [247 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [247 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [248 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [248 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [249 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [250 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [249 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [250 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [251 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [251 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [252 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [252 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [253 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [266 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [267 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [292 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [293 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [293 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [294 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [253 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [254 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [254 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [255 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [255 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [256 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [295 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [296 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [167 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [168 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [260 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [228 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [261 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [261 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [229 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [262 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [262 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [263 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [263 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [264 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [302 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [303 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [264 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [265 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [268 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [269 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [269 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [270 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [270 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [271 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [296 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [297 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [297 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [298 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [267 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [268 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [271 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [272 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [277 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [278 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [272 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [276 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [275 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [273 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [277 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [276 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [273 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [278 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [274 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [274 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [279 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [275 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [225 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [226 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [236 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [237 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [200 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [201 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [201 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [202 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [164 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [165 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [294 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [295 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [230 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [231 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [280 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [281 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [280 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [358 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [282 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [285 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [286 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [282 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [283 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [289 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [283 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [284 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [290 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [288 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [289 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [290 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [291 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [291 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [292 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [284 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [285 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [187 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [188 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [312 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [317 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [319 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [320 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [188 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [189 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [313 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [319 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [318 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [320 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [322 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [323 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [324 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [350 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [351 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [313 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [314 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [314 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [315 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [344 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [351 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [333 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [345 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [352 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [334 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [332 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [333 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [331 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [332 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [348 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [349 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [349 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 312 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [350 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 313 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [341 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [342 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [345 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [346 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [348 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [347 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [344 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [354 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [353 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [343 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [327 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [327 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [328 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [329 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [325 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [328 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [329 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [330 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [326 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [330 /* JSDocTag */]: forEachChildInJSDocTag, - [335 /* JSDocClassTag */]: forEachChildInJSDocTag, - [336 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [337 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [338 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [340 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [331 /* JSDocTag */]: forEachChildInJSDocTag, + [336 /* JSDocClassTag */]: forEachChildInJSDocTag, + [337 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [338 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [339 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [340 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [335 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [341 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [357 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; ((Parser2) => { var scanner2 = createScanner( @@ -28598,9 +28618,9 @@ case 22 /* OpenBracketToken */: expression2 = parseArrayLiteralExpression(); break; - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: expression2 = parseTokenNode(); break; case 40 /* MinusToken */: @@ -28783,13 +28803,13 @@ speculationHelper(() => { const savedContextFlags = contextFlags; contextFlags |= 32768 /* AwaitContext */; - scanner2.setTextPos(nextStatement.pos); + scanner2.resetTokenState(nextStatement.pos); nextToken(); while (token() !== 1 /* EndOfFileToken */) { - const startPos = scanner2.getStartPos(); + const startPos = scanner2.getTokenFullStart(); const statement = parseListElement(0 /* SourceElements */, parseStatement); statements.push(statement); - if (startPos === scanner2.getStartPos()) { + if (startPos === scanner2.getTokenFullStart()) { nextToken(); } if (pos >= 0) { @@ -28977,7 +28997,7 @@ return inContext(32768 /* AwaitContext */); } function parseErrorAtCurrentToken(message, arg0) { - return parseErrorAt(scanner2.getTokenPos(), scanner2.getTextPos(), message, arg0); + return parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), message, arg0); } function parseErrorAtPosition(start, length2, message, arg0) { const lastError = lastOrUndefined(parseDiagnostics); @@ -28996,10 +29016,10 @@ parseErrorAt(range.pos, range.end, message, arg0); } function scanError(message, length2) { - parseErrorAtPosition(scanner2.getTextPos(), length2, message); + parseErrorAtPosition(scanner2.getTokenEnd(), length2, message); } function getNodePos() { - return scanner2.getStartPos(); + return scanner2.getTokenFullStart(); } function hasPrecedingJSDocComment() { return scanner2.hasPrecedingJSDocComment(); @@ -29016,13 +29036,16 @@ } function nextToken() { if (isKeyword(currentToken) && (scanner2.hasUnicodeEscape() || scanner2.hasExtendedUnicodeEscape())) { - parseErrorAt(scanner2.getTokenPos(), scanner2.getTextPos(), Diagnostics.Keywords_cannot_contain_escape_characters); + parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), Diagnostics.Keywords_cannot_contain_escape_characters); } return nextTokenWithoutCheck(); } function nextTokenJSDoc() { return currentToken = scanner2.scanJsDocToken(); } + function nextJSDocCommentTextToken(inBackticks) { + return currentToken = scanner2.scanJSDocCommentTextToken(inBackticks); + } function reScanGreaterToken() { return currentToken = scanner2.reScanGreaterToken(); } @@ -29076,19 +29099,19 @@ if (token() === 79 /* Identifier */) { return true; } - return token() > 116 /* LastReservedWord */; + return token() > 117 /* LastReservedWord */; } function isIdentifier2() { if (token() === 79 /* Identifier */) { return true; } - if (token() === 125 /* YieldKeyword */ && inYieldContext()) { + if (token() === 126 /* YieldKeyword */ && inYieldContext()) { return false; } - if (token() === 133 /* AwaitKeyword */ && inAwaitContext()) { + if (token() === 134 /* AwaitKeyword */ && inAwaitContext()) { return false; } - return token() > 116 /* LastReservedWord */; + return token() > 117 /* LastReservedWord */; } function parseExpected(kind, diagnosticMessage, shouldAdvance = true) { if (token() === kind) { @@ -29129,7 +29152,7 @@ parseErrorForInvalidName(Diagnostics.Interface_name_cannot_be_0, Diagnostics.Interface_must_be_given_a_name, 18 /* OpenBraceToken */); return; case "is": - parseErrorAt(pos, scanner2.getTextPos(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + parseErrorAt(pos, scanner2.getTokenStart(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); return; case "module": case "namespace": @@ -29284,11 +29307,11 @@ } function createNodeArray(elements, pos, end, hasTrailingComma) { const array = factoryCreateNodeArray(elements, hasTrailingComma); - setTextRangePosEnd(array, pos, end != null ? end : scanner2.getStartPos()); + setTextRangePosEnd(array, pos, end != null ? end : scanner2.getTokenFullStart()); return array; } function finishNode(node, pos, end) { - setTextRangePosEnd(node, pos, end != null ? end : scanner2.getStartPos()); + setTextRangePosEnd(node, pos, end != null ? end : scanner2.getTokenFullStart()); if (contextFlags) { node.flags |= contextFlags; } @@ -29300,7 +29323,7 @@ } function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, arg0) { if (reportAtCurrentPosition) { - parseErrorAtPosition(scanner2.getStartPos(), 0, diagnosticMessage, arg0); + parseErrorAtPosition(scanner2.getTokenFullStart(), 0, diagnosticMessage, arg0); } else if (diagnosticMessage) { parseErrorAtCurrentToken(diagnosticMessage, arg0); } @@ -29323,7 +29346,7 @@ "", /*isSingleQuote*/ void 0 - ) : kind === 279 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 280 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -29428,22 +29451,22 @@ } function nextTokenCanFollowModifier() { switch (token()) { - case 85 /* ConstKeyword */: - return nextToken() === 92 /* EnumKeyword */; - case 93 /* ExportKeyword */: + case 86 /* ConstKeyword */: + return nextToken() === 93 /* EnumKeyword */; + case 94 /* ExportKeyword */: nextToken(); - if (token() === 88 /* DefaultKeyword */) { + if (token() === 89 /* DefaultKeyword */) { return lookAhead(nextTokenCanFollowDefaultKeyword); } - if (token() === 154 /* TypeKeyword */) { + if (token() === 155 /* TypeKeyword */) { return lookAhead(nextTokenCanFollowExportModifier); } return canFollowExportModifier(); - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); - case 124 /* StaticKeyword */: - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: + case 125 /* StaticKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: nextToken(); return canFollowModifier(); default: @@ -29451,7 +29474,7 @@ } } function canFollowExportModifier() { - return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 128 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier(); + return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 129 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier(); } function nextTokenCanFollowExportModifier() { nextToken(); @@ -29465,7 +29488,7 @@ } function nextTokenCanFollowDefaultKeyword() { nextToken(); - return token() === 84 /* ClassKeyword */ || token() === 98 /* FunctionKeyword */ || token() === 118 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 132 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); + return token() === 85 /* ClassKeyword */ || token() === 99 /* FunctionKeyword */ || token() === 119 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 127 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 133 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); } function isListElement2(parsingContext2, inErrorRecovery) { const node = currentNode(parsingContext2); @@ -29478,7 +29501,7 @@ case 3 /* SwitchClauseStatements */: return !(token() === 26 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); case 2 /* SwitchClauses */: - return token() === 82 /* CaseKeyword */ || token() === 88 /* DefaultKeyword */; + return token() === 83 /* CaseKeyword */ || token() === 89 /* DefaultKeyword */; case 4 /* TypeMembers */: return lookAhead(isTypeMemberStart); case 5 /* ClassMembers */: @@ -29515,7 +29538,7 @@ case 10 /* ArrayBindingElements */: return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern(); case 19 /* TypeParameters */: - return token() === 101 /* InKeyword */ || token() === 85 /* ConstKeyword */ || isIdentifier2(); + return token() === 102 /* InKeyword */ || token() === 86 /* ConstKeyword */ || isIdentifier2(); case 15 /* ArrayLiteralMembers */: switch (token()) { case 27 /* CommaToken */: @@ -29552,7 +29575,7 @@ Debug.assert(token() === 18 /* OpenBraceToken */); if (nextToken() === 19 /* CloseBraceToken */) { const next = nextToken(); - return next === 27 /* CommaToken */ || next === 18 /* OpenBraceToken */ || next === 94 /* ExtendsKeyword */ || next === 117 /* ImplementsKeyword */; + return next === 27 /* CommaToken */ || next === 18 /* OpenBraceToken */ || next === 95 /* ExtendsKeyword */ || next === 118 /* ImplementsKeyword */; } return true; } @@ -29569,7 +29592,7 @@ return tokenIsIdentifierOrKeywordOrGreaterThan(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 117 /* ImplementsKeyword */ || token() === 94 /* ExtendsKeyword */) { + if (token() === 118 /* ImplementsKeyword */ || token() === 95 /* ExtendsKeyword */) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -29598,13 +29621,13 @@ case 24 /* AssertEntries */: return token() === 19 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: - return token() === 19 /* CloseBraceToken */ || token() === 82 /* CaseKeyword */ || token() === 88 /* DefaultKeyword */; + return token() === 19 /* CloseBraceToken */ || token() === 83 /* CaseKeyword */ || token() === 89 /* DefaultKeyword */; case 7 /* HeritageClauseElement */: - return token() === 18 /* OpenBraceToken */ || token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 18 /* OpenBraceToken */ || token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; case 8 /* VariableDeclarations */: return isVariableDeclaratorListTerminator(); case 19 /* TypeParameters */: - return token() === 31 /* GreaterThanToken */ || token() === 20 /* OpenParenToken */ || token() === 18 /* OpenBraceToken */ || token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 31 /* GreaterThanToken */ || token() === 20 /* OpenParenToken */ || token() === 18 /* OpenBraceToken */ || token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; case 11 /* ArgumentExpressions */: return token() === 21 /* CloseParenToken */ || token() === 26 /* SemicolonToken */; case 15 /* ArrayLiteralMembers */: @@ -29686,7 +29709,7 @@ if (!syntaxCursor || !isReusableParsingContext(parsingContext2) || parseErrorBeforeNextFinishedNode) { return void 0; } - const node = syntaxCursor.currentNode(pos != null ? pos : scanner2.getStartPos()); + const node = syntaxCursor.currentNode(pos != null ? pos : scanner2.getTokenFullStart()); if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { return void 0; } @@ -29703,7 +29726,7 @@ return node; } function consumeNode(node) { - scanner2.setTextPos(node.end); + scanner2.resetTokenState(node.end); nextToken(); return node; } @@ -29748,14 +29771,14 @@ function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 173 /* Constructor */: - case 178 /* IndexSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: - case 237 /* SemicolonClassElement */: + case 174 /* Constructor */: + case 179 /* IndexSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 238 /* SemicolonClassElement */: return true; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -29766,8 +29789,8 @@ function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return true; } } @@ -29776,65 +29799,65 @@ function isReusableStatement(node) { if (node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 240 /* VariableStatement */: - case 238 /* Block */: - case 242 /* IfStatement */: - case 241 /* ExpressionStatement */: - case 254 /* ThrowStatement */: - case 250 /* ReturnStatement */: - case 252 /* SwitchStatement */: - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 239 /* EmptyStatement */: - case 255 /* TryStatement */: - case 253 /* LabeledStatement */: - case 243 /* DoStatement */: - case 256 /* DebuggerStatement */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + case 241 /* VariableStatement */: + case 239 /* Block */: + case 243 /* IfStatement */: + case 242 /* ExpressionStatement */: + case 255 /* ThrowStatement */: + case 251 /* ReturnStatement */: + case 253 /* SwitchStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 240 /* EmptyStatement */: + case 256 /* TryStatement */: + case 254 /* LabeledStatement */: + case 244 /* DoStatement */: + case 257 /* DebuggerStatement */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 302 /* EnumMember */; + return node.kind === 303 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 168 /* PropertySignature */: - case 176 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 169 /* PropertySignature */: + case 177 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 257 /* VariableDeclaration */) { + if (node.kind !== 258 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 166 /* Parameter */) { + if (node.kind !== 167 /* Parameter */) { return false; } const parameter = node; @@ -29851,7 +29874,7 @@ function parsingContextErrors(context) { switch (context) { case 0 /* SourceElements */: - return token() === 88 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(93 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); + return token() === 89 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(94 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); case 1 /* BlockStatements */: return parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); case 2 /* SwitchClauses */: @@ -29917,14 +29940,14 @@ /*inErrorRecovery*/ false )) { - const startPos = scanner2.getStartPos(); + const startPos = scanner2.getTokenFullStart(); const result = parseListElement(kind, parseElement); if (!result) { parsingContext = saveParsingContext; return void 0; } list.push(result); - commaStart = scanner2.getTokenPos(); + commaStart = scanner2.getTokenStart(); if (parseOptional(27 /* CommaToken */)) { continue; } @@ -29936,7 +29959,7 @@ if (considerSemicolonAsDelimiter && token() === 26 /* SemicolonToken */ && !scanner2.hasPrecedingLineBreak()) { nextToken(); } - if (startPos === scanner2.getStartPos()) { + if (startPos === scanner2.getTokenFullStart()) { nextToken(); } continue; @@ -30167,14 +30190,14 @@ } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return nodeIsMissing(node.typeName); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: { + case 182 /* FunctionType */: + case 183 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -30243,7 +30266,7 @@ function parseJSDocParameter() { const pos = getNodePos(); let name; - if (token() === 108 /* ThisKeyword */ || token() === 103 /* NewKeyword */) { + if (token() === 109 /* ThisKeyword */ || token() === 104 /* NewKeyword */) { name = parseIdentifierName(); parseExpected(58 /* ColonToken */); } @@ -30267,7 +30290,7 @@ function parseJSDocType() { scanner2.setInJSDocType(true); const pos = getNodePos(); - if (parseOptional(142 /* ModuleKeyword */)) { + if (parseOptional(143 /* ModuleKeyword */)) { const moduleTag = factory2.createJSDocNamepathType( /*type*/ void 0 @@ -30301,7 +30324,7 @@ } function parseTypeQuery() { const pos = getNodePos(); - parseExpected(112 /* TypeOfKeyword */); + parseExpected(113 /* TypeOfKeyword */); const entityName = parseEntityName( /*allowReservedWords*/ true @@ -30320,7 +30343,7 @@ const name = parseIdentifier(); let constraint; let expression; - if (parseOptional(94 /* ExtendsKeyword */)) { + if (parseOptional(95 /* ExtendsKeyword */)) { if (isStartOfType() || !isStartOfExpression()) { constraint = parseType(); } else { @@ -30373,7 +30396,7 @@ /*allowDecorators*/ true )); - if (token() === 108 /* ThisKeyword */) { + if (token() === 109 /* ThisKeyword */) { const node2 = factory2.createParameterDeclaration( modifiers, /*dotDotDotToken*/ @@ -30466,8 +30489,8 @@ function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 177 /* ConstructSignature */) { - parseExpected(103 /* NewKeyword */); + if (kind === 178 /* ConstructSignature */) { + parseExpected(104 /* NewKeyword */); } const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); @@ -30477,7 +30500,7 @@ true ); parseTypeMemberSemicolon(); - const node = kind === 176 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 177 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -30540,7 +30563,7 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function isTypeMemberStart() { - if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 137 /* GetKeyword */ || token() === 151 /* SetKeyword */) { + if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 138 /* GetKeyword */ || token() === 152 /* SetKeyword */) { return true; } let idToken = false; @@ -30562,10 +30585,10 @@ } function parseTypeMember() { if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) { - return parseSignatureMember(176 /* CallSignature */); + return parseSignatureMember(177 /* CallSignature */); } - if (token() === 103 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(177 /* ConstructSignature */); + if (token() === 104 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { + return parseSignatureMember(178 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -30573,11 +30596,11 @@ /*allowDecorators*/ false ); - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 4 /* Type */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 4 /* Type */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 4 /* Type */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -30617,17 +30640,17 @@ function isStartOfMappedType() { nextToken(); if (token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { - return nextToken() === 146 /* ReadonlyKeyword */; + return nextToken() === 147 /* ReadonlyKeyword */; } - if (token() === 146 /* ReadonlyKeyword */) { + if (token() === 147 /* ReadonlyKeyword */) { nextToken(); } - return token() === 22 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 101 /* InKeyword */; + return token() === 22 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 102 /* InKeyword */; } function parseMappedTypeParameter() { const pos = getNodePos(); const name = parseIdentifierName(); - parseExpected(101 /* InKeyword */); + parseExpected(102 /* InKeyword */); const type = parseType(); return finishNode(factory2.createTypeParameterDeclaration( /*modifiers*/ @@ -30642,15 +30665,15 @@ const pos = getNodePos(); parseExpected(18 /* OpenBraceToken */); let readonlyToken; - if (token() === 146 /* ReadonlyKeyword */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { + if (token() === 147 /* ReadonlyKeyword */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { readonlyToken = parseTokenNode(); - if (readonlyToken.kind !== 146 /* ReadonlyKeyword */) { - parseExpected(146 /* ReadonlyKeyword */); + if (readonlyToken.kind !== 147 /* ReadonlyKeyword */) { + parseExpected(147 /* ReadonlyKeyword */); } } parseExpected(22 /* OpenBracketToken */); const typeParameter = parseMappedTypeParameter(); - const nameType = parseOptional(128 /* AsKeyword */) ? parseType() : void 0; + const nameType = parseOptional(129 /* AsKeyword */) ? parseType() : void 0; parseExpected(23 /* CloseBracketToken */); let questionToken; if (token() === 57 /* QuestionToken */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { @@ -30720,10 +30743,10 @@ } function parseModifiersForConstructorType() { let modifiers; - if (token() === 126 /* AbstractKeyword */) { + if (token() === 127 /* AbstractKeyword */) { const pos = getNodePos(); nextToken(); - const modifier = finishNode(factoryCreateToken(126 /* AbstractKeyword */), pos); + const modifier = finishNode(factoryCreateToken(127 /* AbstractKeyword */), pos); modifiers = createNodeArray([modifier], pos); } return modifiers; @@ -30732,7 +30755,7 @@ const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiersForConstructorType(); - const isConstructorType = parseOptional(103 /* NewKeyword */); + const isConstructorType = parseOptional(104 /* NewKeyword */); Debug.assert(!modifiers || isConstructorType, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers."); const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); @@ -30753,7 +30776,7 @@ if (negative) { nextToken(); } - let expression = token() === 110 /* TrueKeyword */ || token() === 95 /* FalseKeyword */ || token() === 104 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); + let expression = token() === 111 /* TrueKeyword */ || token() === 96 /* FalseKeyword */ || token() === 105 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); if (negative) { expression = finishNode(factory2.createPrefixUnaryExpression(40 /* MinusToken */, expression), pos); } @@ -30761,14 +30784,14 @@ } function isStartOfTypeOfImportType() { nextToken(); - return token() === 100 /* ImportKeyword */; + return token() === 101 /* ImportKeyword */; } function parseImportTypeAssertions() { const pos = getNodePos(); - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); parseExpected(18 /* OpenBraceToken */); const multiLine = scanner2.hasPrecedingLineBreak(); - parseExpected(130 /* AssertKeyword */); + parseExpected(131 /* AssertKeyword */); parseExpected(58 /* ColonToken */); const clause = parseAssertClause( /*skipAssertKeyword*/ @@ -30788,8 +30811,8 @@ function parseImportType() { sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); - const isTypeOf = parseOptional(112 /* TypeOfKeyword */); - parseExpected(100 /* ImportKeyword */); + const isTypeOf = parseOptional(113 /* TypeOfKeyword */); + parseExpected(101 /* ImportKeyword */); parseExpected(20 /* OpenParenToken */); const type = parseType(); let assertions; @@ -30807,16 +30830,16 @@ } function parseNonArrayType() { switch (token()) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 153 /* SymbolKeyword */: - case 134 /* BooleanKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: - case 149 /* ObjectKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 154 /* SymbolKeyword */: + case 135 /* BooleanKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: + case 150 /* ObjectKeyword */: return tryParse(parseKeywordAndNoDot) || parseTypeReference(); case 66 /* AsteriskEqualsToken */: scanner2.reScanAsteriskEqualsToken(); @@ -30826,7 +30849,7 @@ scanner2.reScanQuestionToken(); case 57 /* QuestionToken */: return parseJSDocUnknownOrNullableType(); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseJSDocFunctionType(); case 53 /* ExclamationToken */: return parseJSDocNonNullableType(); @@ -30834,26 +30857,26 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: return parseLiteralTypeNode(); case 40 /* MinusToken */: return lookAhead(nextTokenIsNumericOrBigIntLiteral) ? parseLiteralTypeNode( /*negative*/ true ) : parseTypeReference(); - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return parseTokenNode(); - case 108 /* ThisKeyword */: { + case 109 /* ThisKeyword */: { const thisKeyword = parseThisTypeNode(); - if (token() === 140 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (token() === 141 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - case 112 /* TypeOfKeyword */: + case 113 /* TypeOfKeyword */: return lookAhead(isStartOfTypeOfImportType) ? parseImportType() : parseTypeQuery(); case 18 /* OpenBraceToken */: return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); @@ -30861,9 +30884,9 @@ return parseTupleType(); case 20 /* OpenParenToken */: return parseParenthesizedType(); - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return parseImportType(); - case 129 /* AssertsKeyword */: + case 130 /* AssertsKeyword */: return lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine) ? parseAssertsTypePredicate() : parseTypeReference(); case 15 /* TemplateHead */: return parseTemplateType(); @@ -30873,44 +30896,44 @@ } function isStartOfType(inStartOfParameter) { switch (token()) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 146 /* ReadonlyKeyword */: - case 153 /* SymbolKeyword */: - case 156 /* UniqueKeyword */: - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 104 /* NullKeyword */: - case 108 /* ThisKeyword */: - case 112 /* TypeOfKeyword */: - case 144 /* NeverKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 147 /* ReadonlyKeyword */: + case 154 /* SymbolKeyword */: + case 157 /* UniqueKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 105 /* NullKeyword */: + case 109 /* ThisKeyword */: + case 113 /* TypeOfKeyword */: + case 145 /* NeverKeyword */: case 18 /* OpenBraceToken */: case 22 /* OpenBracketToken */: case 29 /* LessThanToken */: case 51 /* BarToken */: case 50 /* AmpersandToken */: - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 149 /* ObjectKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 150 /* ObjectKeyword */: case 41 /* AsteriskToken */: case 57 /* QuestionToken */: case 53 /* ExclamationToken */: case 25 /* DotDotDotToken */: - case 138 /* InferKeyword */: - case 100 /* ImportKeyword */: - case 129 /* AssertsKeyword */: + case 139 /* InferKeyword */: + case 101 /* ImportKeyword */: + case 130 /* AssertsKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: return true; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return !inStartOfParameter; case 40 /* MinusToken */: return !inStartOfParameter && lookAhead(nextTokenIsNumericOrBigIntLiteral); @@ -30974,7 +30997,7 @@ return finishNode(factory2.createTypeOperatorNode(operator, parseTypeOperatorOrHigher()), pos); } function tryParseConstraintOfInferType() { - if (parseOptional(94 /* ExtendsKeyword */)) { + if (parseOptional(95 /* ExtendsKeyword */)) { const constraint = disallowConditionalTypesAnd(parseType); if (inDisallowConditionalTypesContext() || token() !== 57 /* QuestionToken */) { return constraint; @@ -30995,17 +31018,17 @@ } function parseInferType() { const pos = getNodePos(); - parseExpected(138 /* InferKeyword */); + parseExpected(139 /* InferKeyword */); return finishNode(factory2.createInferTypeNode(parseTypeParameterOfInferType()), pos); } function parseTypeOperatorOrHigher() { const operator = token(); switch (operator) { - case 141 /* KeyOfKeyword */: - case 156 /* UniqueKeyword */: - case 146 /* ReadonlyKeyword */: + case 142 /* KeyOfKeyword */: + case 157 /* UniqueKeyword */: + case 147 /* ReadonlyKeyword */: return parseTypeOperator(operator); - case 138 /* InferKeyword */: + case 139 /* InferKeyword */: return parseInferType(); } return allowConditionalTypesAnd(parsePostfixTypeOrHigher); @@ -31046,7 +31069,7 @@ } function nextTokenIsNewKeyword() { nextToken(); - return token() === 103 /* NewKeyword */; + return token() === 104 /* NewKeyword */; } function isStartOfFunctionTypeOrConstructorType() { if (token() === 29 /* LessThanToken */) { @@ -31055,7 +31078,7 @@ if (token() === 20 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType)) { return true; } - return token() === 103 /* NewKeyword */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); + return token() === 104 /* NewKeyword */ || token() === 127 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); } function skipParameterStart() { if (isModifierKind(token())) { @@ -31064,7 +31087,7 @@ false ); } - if (isIdentifier2() || token() === 108 /* ThisKeyword */) { + if (isIdentifier2() || token() === 109 /* ThisKeyword */) { nextToken(); return true; } @@ -31110,16 +31133,16 @@ } function parseTypePredicatePrefix() { const id = parseIdentifier(); - if (token() === 140 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (token() === 141 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { nextToken(); return id; } } function parseAssertsTypePredicate() { const pos = getNodePos(); - const assertsModifier = parseExpectedToken(129 /* AssertsKeyword */); - const parameterName = token() === 108 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); - const type = parseOptional(140 /* IsKeyword */) ? parseType() : void 0; + const assertsModifier = parseExpectedToken(130 /* AssertsKeyword */); + const parameterName = token() === 109 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); + const type = parseOptional(141 /* IsKeyword */) ? parseType() : void 0; return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); } function parseType() { @@ -31131,7 +31154,7 @@ } const pos = getNodePos(); const type = parseUnionTypeOrHigher(); - if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(94 /* ExtendsKeyword */)) { + if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(95 /* ExtendsKeyword */)) { const extendsType = disallowConditionalTypesAnd(parseType); parseExpected(57 /* QuestionToken */); const trueType = allowConditionalTypesAnd(parseType); @@ -31146,11 +31169,11 @@ } function isStartOfLeftHandSideExpression() { switch (token()) { - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: @@ -31159,14 +31182,14 @@ case 20 /* OpenParenToken */: case 22 /* OpenBracketToken */: case 18 /* OpenBraceToken */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 103 /* NewKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 104 /* NewKeyword */: case 43 /* SlashToken */: case 68 /* SlashEqualsToken */: case 79 /* Identifier */: return true; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return lookAhead(nextTokenIsOpenParenOrLessThanOrDot); default: return isIdentifier2(); @@ -31181,14 +31204,14 @@ case 40 /* MinusToken */: case 54 /* TildeToken */: case 53 /* ExclamationToken */: - case 89 /* DeleteKeyword */: - case 112 /* TypeOfKeyword */: - case 114 /* VoidKeyword */: + case 90 /* DeleteKeyword */: + case 113 /* TypeOfKeyword */: + case 115 /* VoidKeyword */: case 45 /* PlusPlusToken */: case 46 /* MinusMinusToken */: case 29 /* LessThanToken */: - case 133 /* AwaitKeyword */: - case 125 /* YieldKeyword */: + case 134 /* AwaitKeyword */: + case 126 /* YieldKeyword */: case 80 /* PrivateIdentifier */: case 59 /* AtToken */: return true; @@ -31200,7 +31223,7 @@ } } function isStartOfExpressionStatement() { - return token() !== 18 /* OpenBraceToken */ && token() !== 98 /* FunctionKeyword */ && token() !== 84 /* ClassKeyword */ && token() !== 59 /* AtToken */ && isStartOfExpression(); + return token() !== 18 /* OpenBraceToken */ && token() !== 99 /* FunctionKeyword */ && token() !== 85 /* ClassKeyword */ && token() !== 59 /* AtToken */ && isStartOfExpression(); } function parseExpression() { const saveDecoratorContext = inDecoratorContext(); @@ -31261,7 +31284,7 @@ return parseConditionalExpressionRest(expr, pos, allowReturnTypeInArrowFunction); } function isYieldExpression2() { - if (token() === 125 /* YieldKeyword */) { + if (token() === 126 /* YieldKeyword */) { if (inYieldContext()) { return true; } @@ -31344,7 +31367,7 @@ ) : tryParse(() => parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction)); } function isParenthesizedArrowFunctionExpression() { - if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 132 /* AsyncKeyword */) { + if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 133 /* AsyncKeyword */) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } if (token() === 38 /* EqualsGreaterThanToken */) { @@ -31353,7 +31376,7 @@ return 0 /* False */; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { nextToken(); if (scanner2.hasPrecedingLineBreak()) { return 0 /* False */; @@ -31382,13 +31405,13 @@ if (second === 25 /* DotDotDotToken */) { return 1 /* True */; } - if (isModifierKind(second) && second !== 132 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { - if (nextToken() === 128 /* AsKeyword */) { + if (isModifierKind(second) && second !== 133 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { + if (nextToken() === 129 /* AsKeyword */) { return 0 /* False */; } return 1 /* True */; } - if (!isIdentifier2() && second !== 108 /* ThisKeyword */) { + if (!isIdentifier2() && second !== 109 /* ThisKeyword */) { return 0 /* False */; } switch (nextToken()) { @@ -31408,14 +31431,14 @@ return 0 /* False */; } else { Debug.assert(first2 === 29 /* LessThanToken */); - if (!isIdentifier2() && token() !== 85 /* ConstKeyword */) { + if (!isIdentifier2() && token() !== 86 /* ConstKeyword */) { return 0 /* False */; } if (languageVariant === 1 /* JSX */) { const isArrowFunctionInJsx = lookAhead(() => { - parseOptional(85 /* ConstKeyword */); + parseOptional(86 /* ConstKeyword */); const third = nextToken(); - if (third === 94 /* ExtendsKeyword */) { + if (third === 95 /* ExtendsKeyword */) { const fourth = nextToken(); switch (fourth) { case 63 /* EqualsToken */: @@ -31439,7 +31462,7 @@ } } function parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { - const tokenPos = scanner2.getTokenPos(); + const tokenPos = scanner2.getTokenStart(); if (notParenthesizedArrow == null ? void 0 : notParenthesizedArrow.has(tokenPos)) { return void 0; } @@ -31454,7 +31477,7 @@ return result; } function tryParseAsyncSimpleArrowFunctionExpression(allowReturnTypeInArrowFunction) { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { const pos = getNodePos(); const asyncModifier = parseModifiersForArrowFunction(); @@ -31465,7 +31488,7 @@ return void 0; } function isUnParenthesizedAsyncArrowFunctionWorker() { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { nextToken(); if (scanner2.hasPrecedingLineBreak() || token() === 38 /* EqualsGreaterThanToken */) { return 0 /* False */; @@ -31513,7 +31536,7 @@ return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 193 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 194 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -31535,7 +31558,7 @@ if (token() === 18 /* OpenBraceToken */) { return parseFunctionBlock(isAsync ? 2 /* Await */ : 0 /* None */); } - if (token() !== 26 /* SemicolonToken */ && token() !== 98 /* FunctionKeyword */ && token() !== 84 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { + if (token() !== 26 /* SemicolonToken */ && token() !== 99 /* FunctionKeyword */ && token() !== 85 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { return parseFunctionBlock(16 /* IgnoreMissingOpenBrace */ | (isAsync ? 2 /* Await */ : 0 /* None */)); } const savedTopLevel = topLevel; @@ -31576,7 +31599,7 @@ return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 101 /* InKeyword */ || t === 162 /* OfKeyword */; + return t === 102 /* InKeyword */ || t === 163 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -31586,16 +31609,16 @@ if (!consumeCurrentOperator) { break; } - if (token() === 101 /* InKeyword */ && inDisallowInContext()) { + if (token() === 102 /* InKeyword */ && inDisallowInContext()) { break; } - if (token() === 128 /* AsKeyword */ || token() === 150 /* SatisfiesKeyword */) { + if (token() === 129 /* AsKeyword */ || token() === 151 /* SatisfiesKeyword */) { if (scanner2.hasPrecedingLineBreak()) { break; } else { const keywordKind = token(); nextToken(); - leftOperand = keywordKind === 150 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); + leftOperand = keywordKind === 151 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); } } else { leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence), pos); @@ -31604,7 +31627,7 @@ return leftOperand; } function isBinaryOperator2() { - if (inDisallowInContext() && token() === 101 /* InKeyword */) { + if (inDisallowInContext() && token() === 102 /* InKeyword */) { return false; } return getBinaryOperatorPrecedence(token()) > 0; @@ -31635,7 +31658,7 @@ return finishNode(factory2.createVoidExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos); } function isAwaitExpression2() { - if (token() === 133 /* AwaitKeyword */) { + if (token() === 134 /* AwaitKeyword */) { if (inAwaitContext()) { return true; } @@ -31658,7 +31681,7 @@ if (token() === 42 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 213 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 214 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { parseErrorAt(pos, end, Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, tokenToString(unaryOperator)); @@ -31673,11 +31696,11 @@ case 54 /* TildeToken */: case 53 /* ExclamationToken */: return parsePrefixUnaryExpression(); - case 89 /* DeleteKeyword */: + case 90 /* DeleteKeyword */: return parseDeleteExpression(); - case 112 /* TypeOfKeyword */: + case 113 /* TypeOfKeyword */: return parseTypeOfExpression(); - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return parseVoidExpression(); case 29 /* LessThanToken */: if (languageVariant === 1 /* JSX */) { @@ -31687,7 +31710,7 @@ ); } return parseTypeAssertion(); - case 133 /* AwaitKeyword */: + case 134 /* AwaitKeyword */: if (isAwaitExpression2()) { return parseAwaitExpression(); } @@ -31701,10 +31724,10 @@ case 40 /* MinusToken */: case 54 /* TildeToken */: case 53 /* ExclamationToken */: - case 89 /* DeleteKeyword */: - case 112 /* TypeOfKeyword */: - case 114 /* VoidKeyword */: - case 133 /* AwaitKeyword */: + case 90 /* DeleteKeyword */: + case 113 /* TypeOfKeyword */: + case 115 /* VoidKeyword */: + case 134 /* AwaitKeyword */: return false; case 29 /* LessThanToken */: if (languageVariant !== 1 /* JSX */) { @@ -31736,20 +31759,20 @@ function parseLeftHandSideExpressionOrHigher() { const pos = getNodePos(); let expression; - if (token() === 100 /* ImportKeyword */) { + if (token() === 101 /* ImportKeyword */) { if (lookAhead(nextTokenIsOpenParenOrLessThan)) { sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; expression = parseTokenNode(); } else if (lookAhead(nextTokenIsDot)) { nextToken(); nextToken(); - expression = finishNode(factory2.createMetaProperty(100 /* ImportKeyword */, parseIdentifierName()), pos); + expression = finishNode(factory2.createMetaProperty(101 /* ImportKeyword */, parseIdentifierName()), pos); sourceFlags |= 4194304 /* PossiblyContainsImportMeta */; } else { expression = parseMemberExpressionOrHigher(); } } else { - expression = token() === 106 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); + expression = token() === 107 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); } return parseCallExpressionRest(pos, expression); } @@ -31791,11 +31814,11 @@ const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 283 /* JsxOpeningElement */) { + if (opening.kind === 284 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 281 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 282 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -31819,10 +31842,10 @@ } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 286 /* JsxOpeningFragment */) { + } else if (opening.kind === 287 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 282 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 283 /* JsxSelfClosingElement */); result = opening; } if (inExpressionContext && token() === 29 /* LessThanToken */) { @@ -31895,7 +31918,7 @@ if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 281 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 282 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -31942,7 +31965,7 @@ function parseJsxElementName() { const pos = getNodePos(); scanJsxIdentifier(); - let expression = token() === 108 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); + let expression = token() === 109 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); while (parseOptional(24 /* DotToken */)) { expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot( /*allowIdentifierNames*/ @@ -32145,7 +32168,7 @@ continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 230 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 231 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -32205,7 +32228,7 @@ } } if (typeArguments || token() === 20 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 231 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32269,11 +32292,11 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return parseLiteralNode(); - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: return parseTokenNode(); case 20 /* OpenParenToken */: return parseParenthesizedExpression(); @@ -32281,18 +32304,18 @@ return parseArrayLiteralExpression(); case 18 /* OpenBraceToken */: return parseObjectLiteralExpression(); - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { break; } return parseFunctionExpression(); case 59 /* AtToken */: return parseDecoratedExpression(); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassExpression(); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionExpression(); - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: return parseNewExpressionOrNewDotTarget(); case 43 /* SlashToken */: case 68 /* SlashEqualsToken */: @@ -32338,7 +32361,7 @@ } function parseArrayLiteralExpression() { const pos = getNodePos(); - const openBracketPosition = scanner2.getTokenPos(); + const openBracketPosition = scanner2.getTokenStart(); const openBracketParsed = parseExpected(22 /* OpenBracketToken */); const multiLine = scanner2.hasPrecedingLineBreak(); const elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); @@ -32359,11 +32382,11 @@ /*allowDecorators*/ true ); - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 0 /* None */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -32398,7 +32421,7 @@ } function parseObjectLiteralExpression() { const pos = getNodePos(); - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); const openBraceParsed = parseExpected(18 /* OpenBraceToken */); const multiLine = scanner2.hasPrecedingLineBreak(); const properties = parseDelimitedList( @@ -32422,7 +32445,7 @@ /*allowDecorators*/ false ); - parseExpected(98 /* FunctionKeyword */); + parseExpected(99 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */; @@ -32444,10 +32467,10 @@ } function parseNewExpressionOrNewDotTarget() { const pos = getNodePos(); - parseExpected(103 /* NewKeyword */); + parseExpected(104 /* NewKeyword */); if (parseOptional(24 /* DotToken */)) { const name = parseIdentifierName(); - return finishNode(factory2.createMetaProperty(103 /* NewKeyword */, name), pos); + return finishNode(factory2.createMetaProperty(104 /* NewKeyword */, name), pos); } const expressionPos = getNodePos(); let expression = parseMemberExpressionRest( @@ -32457,7 +32480,7 @@ false ); let typeArguments; - if (expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (expression.kind === 231 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32470,7 +32493,7 @@ function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); const openBraceParsed = parseExpected(18 /* OpenBraceToken */, diagnosticMessage); if (openBraceParsed || ignoreMissingOpenBrace) { const multiLine = scanner2.hasPrecedingLineBreak(); @@ -32526,22 +32549,22 @@ function parseIfStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(99 /* IfKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(100 /* IfKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); const thenStatement = parseStatement(); - const elseStatement = parseOptional(91 /* ElseKeyword */) ? parseStatement() : void 0; + const elseStatement = parseOptional(92 /* ElseKeyword */) ? parseStatement() : void 0; return withJSDoc(finishNode(factoryCreateIfStatement(expression, thenStatement, elseStatement), pos), hasJSDoc); } function parseDoStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(90 /* DoKeyword */); + parseExpected(91 /* DoKeyword */); const statement = parseStatement(); - parseExpected(115 /* WhileKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(116 /* WhileKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -32551,8 +32574,8 @@ function parseWhileStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(115 /* WhileKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(116 /* WhileKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -32562,12 +32585,12 @@ function parseForOrForInOrForOfStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(97 /* ForKeyword */); - const awaitToken = parseOptionalToken(133 /* AwaitKeyword */); + parseExpected(98 /* ForKeyword */); + const awaitToken = parseOptionalToken(134 /* AwaitKeyword */); parseExpected(20 /* OpenParenToken */); let initializer; if (token() !== 26 /* SemicolonToken */) { - if (token() === 113 /* VarKeyword */ || token() === 119 /* LetKeyword */ || token() === 85 /* ConstKeyword */) { + if (token() === 114 /* VarKeyword */ || token() === 120 /* LetKeyword */ || token() === 86 /* ConstKeyword */) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -32577,14 +32600,14 @@ } } let node; - if (awaitToken ? parseExpected(162 /* OfKeyword */) : parseOptional(162 /* OfKeyword */)) { + if (awaitToken ? parseExpected(163 /* OfKeyword */) : parseOptional(163 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ true )); parseExpected(21 /* CloseParenToken */); node = factoryCreateForOfStatement(awaitToken, initializer, expression, parseStatement()); - } else if (parseOptional(101 /* InKeyword */)) { + } else if (parseOptional(102 /* InKeyword */)) { const expression = allowInAnd(parseExpression); parseExpected(21 /* CloseParenToken */); node = factory2.createForInStatement(initializer, expression, parseStatement()); @@ -32601,16 +32624,16 @@ function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 249 /* BreakStatement */ ? 81 /* BreakKeyword */ : 86 /* ContinueKeyword */); + parseExpected(kind === 250 /* BreakStatement */ ? 82 /* BreakKeyword */ : 87 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 249 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 250 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(105 /* ReturnKeyword */); + parseExpected(106 /* ReturnKeyword */); const expression = canParseSemicolon() ? void 0 : allowInAnd(parseExpression); parseSemicolon(); return withJSDoc(finishNode(factory2.createReturnStatement(expression), pos), hasJSDoc); @@ -32618,8 +32641,8 @@ function parseWithStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(116 /* WithKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(117 /* WithKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -32629,7 +32652,7 @@ function parseCaseClause() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(82 /* CaseKeyword */); + parseExpected(83 /* CaseKeyword */); const expression = allowInAnd(parseExpression); parseExpected(58 /* ColonToken */); const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); @@ -32637,13 +32660,13 @@ } function parseDefaultClause() { const pos = getNodePos(); - parseExpected(88 /* DefaultKeyword */); + parseExpected(89 /* DefaultKeyword */); parseExpected(58 /* ColonToken */); const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); return finishNode(factory2.createDefaultClause(statements), pos); } function parseCaseOrDefaultClause() { - return token() === 82 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + return token() === 83 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseCaseBlock() { const pos = getNodePos(); @@ -32655,7 +32678,7 @@ function parseSwitchStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(107 /* SwitchKeyword */); + parseExpected(108 /* SwitchKeyword */); parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpected(21 /* CloseParenToken */); @@ -32665,7 +32688,7 @@ function parseThrowStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(109 /* ThrowKeyword */); + parseExpected(110 /* ThrowKeyword */); let expression = scanner2.hasPrecedingLineBreak() ? void 0 : allowInAnd(parseExpression); if (expression === void 0) { identifierCount++; @@ -32679,15 +32702,15 @@ function parseTryStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(111 /* TryKeyword */); + parseExpected(112 /* TryKeyword */); const tryBlock = parseBlock( /*ignoreMissingOpenBrace*/ false ); - const catchClause = token() === 83 /* CatchKeyword */ ? parseCatchClause() : void 0; + const catchClause = token() === 84 /* CatchKeyword */ ? parseCatchClause() : void 0; let finallyBlock; - if (!catchClause || token() === 96 /* FinallyKeyword */) { - parseExpected(96 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); + if (!catchClause || token() === 97 /* FinallyKeyword */) { + parseExpected(97 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); finallyBlock = parseBlock( /*ignoreMissingOpenBrace*/ false @@ -32697,7 +32720,7 @@ } function parseCatchClause() { const pos = getNodePos(); - parseExpected(83 /* CatchKeyword */); + parseExpected(84 /* CatchKeyword */); let variableDeclaration; if (parseOptional(20 /* OpenParenToken */)) { variableDeclaration = parseVariableDeclaration(); @@ -32714,7 +32737,7 @@ function parseDebuggerStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(87 /* DebuggerKeyword */); + parseExpected(88 /* DebuggerKeyword */); parseSemicolon(); return withJSDoc(finishNode(factory2.createDebuggerStatement(), pos), hasJSDoc); } @@ -32743,11 +32766,11 @@ } function nextTokenIsClassKeywordOnSameLine() { nextToken(); - return token() === 84 /* ClassKeyword */ && !scanner2.hasPrecedingLineBreak(); + return token() === 85 /* ClassKeyword */ && !scanner2.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token() === 98 /* FunctionKeyword */ && !scanner2.hasPrecedingLineBreak(); + return token() === 99 /* FunctionKeyword */ && !scanner2.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine() { nextToken(); @@ -32756,48 +32779,48 @@ function isDeclaration2() { while (true) { switch (token()) { - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: return true; - case 118 /* InterfaceKeyword */: - case 154 /* TypeKeyword */: + case 119 /* InterfaceKeyword */: + case 155 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 146 /* ReadonlyKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 147 /* ReadonlyKeyword */: nextToken(); if (scanner2.hasPrecedingLineBreak()) { return false; } continue; - case 159 /* GlobalKeyword */: + case 160 /* GlobalKeyword */: nextToken(); - return token() === 18 /* OpenBraceToken */ || token() === 79 /* Identifier */ || token() === 93 /* ExportKeyword */; - case 100 /* ImportKeyword */: + return token() === 18 /* OpenBraceToken */ || token() === 79 /* Identifier */ || token() === 94 /* ExportKeyword */; + case 101 /* ImportKeyword */: nextToken(); return token() === 10 /* StringLiteral */ || token() === 41 /* AsteriskToken */ || token() === 18 /* OpenBraceToken */ || tokenIsIdentifierOrKeyword(token()); - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: let currentToken2 = nextToken(); - if (currentToken2 === 154 /* TypeKeyword */) { + if (currentToken2 === 155 /* TypeKeyword */) { currentToken2 = lookAhead(nextToken); } - if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 88 /* DefaultKeyword */ || currentToken2 === 128 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) { + if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 89 /* DefaultKeyword */ || currentToken2 === 129 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) { return true; } continue; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: nextToken(); continue; default: @@ -32813,45 +32836,45 @@ case 59 /* AtToken */: case 26 /* SemicolonToken */: case 18 /* OpenBraceToken */: - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: - case 99 /* IfKeyword */: - case 90 /* DoKeyword */: - case 115 /* WhileKeyword */: - case 97 /* ForKeyword */: - case 86 /* ContinueKeyword */: - case 81 /* BreakKeyword */: - case 105 /* ReturnKeyword */: - case 116 /* WithKeyword */: - case 107 /* SwitchKeyword */: - case 109 /* ThrowKeyword */: - case 111 /* TryKeyword */: - case 87 /* DebuggerKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: + case 100 /* IfKeyword */: + case 91 /* DoKeyword */: + case 116 /* WhileKeyword */: + case 98 /* ForKeyword */: + case 87 /* ContinueKeyword */: + case 82 /* BreakKeyword */: + case 106 /* ReturnKeyword */: + case 117 /* WithKeyword */: + case 108 /* SwitchKeyword */: + case 110 /* ThrowKeyword */: + case 112 /* TryKeyword */: + case 88 /* DebuggerKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return true; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThanOrDot); - case 85 /* ConstKeyword */: - case 93 /* ExportKeyword */: + case 86 /* ConstKeyword */: + case 94 /* ExportKeyword */: return isStartOfDeclaration(); - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 118 /* InterfaceKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 154 /* TypeKeyword */: - case 159 /* GlobalKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 119 /* InterfaceKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 155 /* TypeKeyword */: + case 160 /* GlobalKeyword */: return true; - case 127 /* AccessorKeyword */: - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 124 /* StaticKeyword */: - case 146 /* ReadonlyKeyword */: + case 128 /* AccessorKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 125 /* StaticKeyword */: + case 147 /* ReadonlyKeyword */: return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); default: return isStartOfExpression(); @@ -32873,14 +32896,14 @@ /*ignoreMissingOpenBrace*/ false ); - case 113 /* VarKeyword */: + case 114 /* VarKeyword */: return parseVariableStatement( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 119 /* LetKeyword */: + case 120 /* LetKeyword */: if (isLetDeclaration()) { return parseVariableStatement( getNodePos(), @@ -32890,66 +32913,66 @@ ); } break; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionDeclaration( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassDeclaration( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 99 /* IfKeyword */: + case 100 /* IfKeyword */: return parseIfStatement(); - case 90 /* DoKeyword */: + case 91 /* DoKeyword */: return parseDoStatement(); - case 115 /* WhileKeyword */: + case 116 /* WhileKeyword */: return parseWhileStatement(); - case 97 /* ForKeyword */: + case 98 /* ForKeyword */: return parseForOrForInOrForOfStatement(); - case 86 /* ContinueKeyword */: - return parseBreakOrContinueStatement(248 /* ContinueStatement */); - case 81 /* BreakKeyword */: - return parseBreakOrContinueStatement(249 /* BreakStatement */); - case 105 /* ReturnKeyword */: + case 87 /* ContinueKeyword */: + return parseBreakOrContinueStatement(249 /* ContinueStatement */); + case 82 /* BreakKeyword */: + return parseBreakOrContinueStatement(250 /* BreakStatement */); + case 106 /* ReturnKeyword */: return parseReturnStatement(); - case 116 /* WithKeyword */: + case 117 /* WithKeyword */: return parseWithStatement(); - case 107 /* SwitchKeyword */: + case 108 /* SwitchKeyword */: return parseSwitchStatement(); - case 109 /* ThrowKeyword */: + case 110 /* ThrowKeyword */: return parseThrowStatement(); - case 111 /* TryKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 112 /* TryKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return parseTryStatement(); - case 87 /* DebuggerKeyword */: + case 88 /* DebuggerKeyword */: return parseDebuggerStatement(); case 59 /* AtToken */: return parseDeclaration(); - case 132 /* AsyncKeyword */: - case 118 /* InterfaceKeyword */: - case 154 /* TypeKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 136 /* DeclareKeyword */: - case 85 /* ConstKeyword */: - case 92 /* EnumKeyword */: - case 93 /* ExportKeyword */: - case 100 /* ImportKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 124 /* StaticKeyword */: - case 146 /* ReadonlyKeyword */: - case 159 /* GlobalKeyword */: + case 133 /* AsyncKeyword */: + case 119 /* InterfaceKeyword */: + case 155 /* TypeKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 137 /* DeclareKeyword */: + case 86 /* ConstKeyword */: + case 93 /* EnumKeyword */: + case 94 /* ExportKeyword */: + case 101 /* ImportKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 125 /* StaticKeyword */: + case 147 /* ReadonlyKeyword */: + case 160 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -32958,7 +32981,7 @@ return parseExpressionOrLabeledStatement(); } function isDeclareModifier(modifier) { - return modifier.kind === 136 /* DeclareKeyword */; + return modifier.kind === 137 /* DeclareKeyword */; } function parseDeclaration() { const pos = getNodePos(); @@ -32991,33 +33014,33 @@ } function parseDeclarationWorker(pos, hasJSDoc, modifiersIn) { switch (token()) { - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: return parseVariableStatement(pos, hasJSDoc, modifiersIn); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassDeclaration(pos, hasJSDoc, modifiersIn); - case 118 /* InterfaceKeyword */: + case 119 /* InterfaceKeyword */: return parseInterfaceDeclaration(pos, hasJSDoc, modifiersIn); - case 154 /* TypeKeyword */: + case 155 /* TypeKeyword */: return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); - case 92 /* EnumKeyword */: + case 93 /* EnumKeyword */: return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 159 /* GlobalKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: + case 160 /* GlobalKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiersIn); - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: nextToken(); switch (token()) { - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: case 63 /* EqualsToken */: return parseExportAssignment(pos, hasJSDoc, modifiersIn); - case 128 /* AsKeyword */: + case 129 /* AsKeyword */: return parseNamespaceExportDeclaration(pos, hasJSDoc, modifiersIn); default: return parseExportDeclaration(pos, hasJSDoc, modifiersIn); @@ -33025,7 +33048,7 @@ default: if (modifiersIn) { const missing = createMissingNode( - 279 /* MissingDeclaration */, + 280 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -33135,12 +33158,12 @@ const pos = getNodePos(); let flags = 0; switch (token()) { - case 113 /* VarKeyword */: + case 114 /* VarKeyword */: break; - case 119 /* LetKeyword */: + case 120 /* LetKeyword */: flags |= 1 /* Let */; break; - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: flags |= 2 /* Const */; break; default: @@ -33148,7 +33171,7 @@ } nextToken(); let declarations; - if (token() === 162 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 163 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -33176,7 +33199,7 @@ function parseFunctionDeclaration(pos, hasJSDoc, modifiers) { const savedAwaitContext = inAwaitContext(); const modifierFlags = modifiersToFlags(modifiers); - parseExpected(98 /* FunctionKeyword */); + parseExpected(99 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; @@ -33199,8 +33222,8 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseConstructorName() { - if (token() === 135 /* ConstructorKeyword */) { - return parseExpected(135 /* ConstructorKeyword */); + if (token() === 136 /* ConstructorKeyword */) { + return parseExpected(136 /* ConstructorKeyword */); } if (token() === 10 /* StringLiteral */ && lookAhead(nextToken) === 20 /* OpenParenToken */) { return tryParse(() => { @@ -33294,7 +33317,7 @@ false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 174 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 175 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -33323,7 +33346,7 @@ return true; } if (idToken !== void 0) { - if (!isKeyword(idToken) || idToken === 151 /* SetKeyword */ || idToken === 137 /* GetKeyword */) { + if (!isKeyword(idToken) || idToken === 152 /* SetKeyword */ || idToken === 138 /* GetKeyword */) { return true; } switch (token()) { @@ -33341,7 +33364,7 @@ return false; } function parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers) { - parseExpectedToken(124 /* StaticKeyword */); + parseExpectedToken(125 /* StaticKeyword */); const body = parseClassStaticBlockBody(); const node = withJSDoc(finishNode(factory2.createClassStaticBlockDeclaration(body), pos), hasJSDoc); node.modifiers = modifiers; @@ -33361,7 +33384,7 @@ return body; } function parseDecoratorExpression() { - if (inAwaitContext() && token() === 133 /* AwaitKeyword */) { + if (inAwaitContext() && token() === 134 /* AwaitKeyword */) { const pos = getNodePos(); const awaitExpression = parseIdentifier(Diagnostics.Expression_expected); nextToken(); @@ -33386,13 +33409,13 @@ function tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock) { const pos = getNodePos(); const kind = token(); - if (token() === 85 /* ConstKeyword */ && permitConstAsModifier) { + if (token() === 86 /* ConstKeyword */ && permitConstAsModifier) { if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { return void 0; } - } else if (stopOnStartOfClassStaticBlock && token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + } else if (stopOnStartOfClassStaticBlock && token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return void 0; - } else if (hasSeenStaticModifier && token() === 124 /* StaticKeyword */) { + } else if (hasSeenStaticModifier && token() === 125 /* StaticKeyword */) { return void 0; } else { if (!parseAnyContextualModifier()) { @@ -33411,7 +33434,7 @@ } } while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 124 /* StaticKeyword */) + if (modifier.kind === 125 /* StaticKeyword */) hasSeenStaticModifier = true; list = append(list, modifier); hasLeadingModifier = true; @@ -33424,7 +33447,7 @@ } if (hasTrailingDecorator) { while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 124 /* StaticKeyword */) + if (modifier.kind === 125 /* StaticKeyword */) hasSeenStaticModifier = true; list = append(list, modifier); } @@ -33433,10 +33456,10 @@ } function parseModifiersForArrowFunction() { let modifiers; - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { const pos = getNodePos(); nextToken(); - const modifier = finishNode(factoryCreateToken(132 /* AsyncKeyword */), pos); + const modifier = finishNode(factoryCreateToken(133 /* AsyncKeyword */), pos); modifiers = createNodeArray([modifier], pos); } return modifiers; @@ -33456,16 +33479,16 @@ /*stopOnStartOfClassStaticBlock*/ true ); - if (token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 0 /* None */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 0 /* None */); } - if (token() === 135 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); if (constructorDeclaration) { return constructorDeclaration; @@ -33510,11 +33533,11 @@ /*allowDecorators*/ true ); - if (token() === 84 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 228 /* ClassExpression */); + if (token() === 85 /* ClassKeyword */) { + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 229 /* ClassExpression */); } const missing = createMissingNode( - 279 /* MissingDeclaration */, + 280 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -33529,15 +33552,15 @@ hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 228 /* ClassExpression */ + 229 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 260 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 261 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); - parseExpected(84 /* ClassKeyword */); + parseExpected(85 /* ClassKeyword */); const name = parseNameOfClassDeclarationOrExpression(); const typeParameters = parseTypeParameters(); if (some(modifiers, isExportModifier)) @@ -33554,14 +33577,14 @@ members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 260 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 261 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { return isBindingIdentifier() && !isImplementsClause() ? createIdentifier(isBindingIdentifier()) : void 0; } function isImplementsClause() { - return token() === 117 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 118 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses() { if (isHeritageClause2()) { @@ -33572,7 +33595,7 @@ function parseHeritageClause() { const pos = getNodePos(); const tok = token(); - Debug.assert(tok === 94 /* ExtendsKeyword */ || tok === 117 /* ImplementsKeyword */); + Debug.assert(tok === 95 /* ExtendsKeyword */ || tok === 118 /* ImplementsKeyword */); nextToken(); const types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); return finishNode(factory2.createHeritageClause(tok, types), pos); @@ -33580,7 +33603,7 @@ function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (expression.kind === 231 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -33590,13 +33613,13 @@ return token() === 29 /* LessThanToken */ ? parseBracketedList(20 /* TypeArguments */, parseType, 29 /* LessThanToken */, 31 /* GreaterThanToken */) : void 0; } function isHeritageClause2() { - return token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; } function parseClassMembers() { return parseList(5 /* ClassMembers */, parseClassElement); } function parseInterfaceDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(118 /* InterfaceKeyword */); + parseExpected(119 /* InterfaceKeyword */); const name = parseIdentifier(); const typeParameters = parseTypeParameters(); const heritageClauses = parseHeritageClauses(); @@ -33605,11 +33628,11 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(154 /* TypeKeyword */); + parseExpected(155 /* TypeKeyword */); const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(63 /* EqualsToken */); - const type = token() === 139 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); + const type = token() === 140 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); parseSemicolon(); const node = factory2.createTypeAliasDeclaration(modifiers, name, typeParameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -33622,7 +33645,7 @@ return withJSDoc(finishNode(factory2.createEnumMember(name, initializer), pos), hasJSDoc); } function parseEnumDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(92 /* EnumKeyword */); + parseExpected(93 /* EnumKeyword */); const name = parseIdentifier(); let members; if (parseExpected(18 /* OpenBraceToken */)) { @@ -33662,7 +33685,7 @@ function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; let name; - if (token() === 159 /* GlobalKeyword */) { + if (token() === 160 /* GlobalKeyword */) { name = parseIdentifier(); flags |= 1024 /* GlobalAugmentation */; } else { @@ -33680,12 +33703,12 @@ } function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; - if (token() === 159 /* GlobalKeyword */) { + if (token() === 160 /* GlobalKeyword */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); - } else if (parseOptional(143 /* NamespaceKeyword */)) { + } else if (parseOptional(144 /* NamespaceKeyword */)) { flags |= 16 /* Namespace */; } else { - parseExpected(142 /* ModuleKeyword */); + parseExpected(143 /* ModuleKeyword */); if (token() === 10 /* StringLiteral */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); } @@ -33693,7 +33716,7 @@ return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiersIn, flags); } function isExternalModuleReference2() { - return token() === 147 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); + return token() === 148 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { return nextToken() === 20 /* OpenParenToken */; @@ -33705,8 +33728,8 @@ return nextToken() === 43 /* SlashToken */; } function parseNamespaceExportDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(128 /* AsKeyword */); - parseExpected(143 /* NamespaceKeyword */); + parseExpected(129 /* AsKeyword */); + parseExpected(144 /* NamespaceKeyword */); const name = parseIdentifier(); parseSemicolon(); const node = factory2.createNamespaceExportDeclaration(name); @@ -33714,14 +33737,14 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(100 /* ImportKeyword */); - const afterImportPos = scanner2.getStartPos(); + parseExpected(101 /* ImportKeyword */); + const afterImportPos = scanner2.getTokenFullStart(); let identifier; if (isIdentifier2()) { identifier = parseIdentifier(); } let isTypeOnly = false; - if (token() !== 158 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { + if (token() !== 159 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { isTypeOnly = true; identifier = isIdentifier2() ? parseIdentifier() : void 0; } @@ -33733,11 +33756,11 @@ token() === 41 /* AsteriskToken */ || // import * token() === 18 /* OpenBraceToken */) { importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(158 /* FromKeyword */); + parseExpected(159 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); let assertClause; - if (token() === 130 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (token() === 131 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { assertClause = parseAssertClause(); } parseSemicolon(); @@ -33757,9 +33780,9 @@ function parseAssertClause(skipAssertKeyword) { const pos = getNodePos(); if (!skipAssertKeyword) { - parseExpected(130 /* AssertKeyword */); + parseExpected(131 /* AssertKeyword */); } - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); if (parseExpected(18 /* OpenBraceToken */)) { const multiLine = scanner2.hasPrecedingLineBreak(); const elements = parseDelimitedList( @@ -33798,7 +33821,7 @@ return token() === 41 /* AsteriskToken */ || token() === 18 /* OpenBraceToken */; } function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 27 /* CommaToken */ || token() === 158 /* FromKeyword */; + return token() === 27 /* CommaToken */ || token() === 159 /* FromKeyword */; } function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { parseExpected(63 /* EqualsToken */); @@ -33811,7 +33834,7 @@ function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(27 /* CommaToken */)) { - namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(272 /* NamedImports */); + namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(273 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -33823,7 +33846,7 @@ } function parseExternalModuleReference() { const pos = getNodePos(); - parseExpected(147 /* RequireKeyword */); + parseExpected(148 /* RequireKeyword */); parseExpected(20 /* OpenParenToken */); const expression = parseModuleSpecifier(); parseExpected(21 /* CloseParenToken */); @@ -33841,35 +33864,35 @@ function parseNamespaceImport() { const pos = getNodePos(); parseExpected(41 /* AsteriskToken */); - parseExpected(128 /* AsKeyword */); + parseExpected(129 /* AsKeyword */); const name = parseIdentifier(); return finishNode(factory2.createNamespaceImport(name), pos); } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 272 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); + const node = kind === 273 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(278 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(279 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(273 /* ImportSpecifier */); + return parseImportOrExportSpecifier(274 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); let checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - let checkIdentifierStart = scanner2.getTokenPos(); - let checkIdentifierEnd = scanner2.getTextPos(); + let checkIdentifierStart = scanner2.getTokenStart(); + let checkIdentifierEnd = scanner2.getTokenEnd(); let isTypeOnly = false; let propertyName; let canParseAsKeyword = true; let name = parseIdentifierName(); if (name.escapedText === "type") { - if (token() === 128 /* AsKeyword */) { + if (token() === 129 /* AsKeyword */) { const firstAs = parseIdentifierName(); - if (token() === 128 /* AsKeyword */) { + if (token() === 129 /* AsKeyword */) { const secondAs = parseIdentifierName(); if (tokenIsIdentifierOrKeyword(token())) { isTypeOnly = true; @@ -33894,20 +33917,20 @@ name = parseNameWithKeywordCheck(); } } - if (canParseAsKeyword && token() === 128 /* AsKeyword */) { + if (canParseAsKeyword && token() === 129 /* AsKeyword */) { propertyName = name; - parseExpected(128 /* AsKeyword */); + parseExpected(129 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 273 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 274 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 273 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 274 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - checkIdentifierStart = scanner2.getTokenPos(); - checkIdentifierEnd = scanner2.getTextPos(); + checkIdentifierStart = scanner2.getTokenStart(); + checkIdentifierEnd = scanner2.getTokenEnd(); return parseIdentifierName(); } } @@ -33923,22 +33946,22 @@ let exportClause; let moduleSpecifier; let assertClause; - const isTypeOnly = parseOptional(154 /* TypeKeyword */); + const isTypeOnly = parseOptional(155 /* TypeKeyword */); const namespaceExportPos = getNodePos(); if (parseOptional(41 /* AsteriskToken */)) { - if (parseOptional(128 /* AsKeyword */)) { + if (parseOptional(129 /* AsKeyword */)) { exportClause = parseNamespaceExport(namespaceExportPos); } - parseExpected(158 /* FromKeyword */); + parseExpected(159 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(276 /* NamedExports */); - if (token() === 158 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { - parseExpected(158 /* FromKeyword */); + exportClause = parseNamedImportsOrExports(277 /* NamedExports */); + if (token() === 159 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { + parseExpected(159 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } } - if (moduleSpecifier && token() === 130 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (moduleSpecifier && token() === 131 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { assertClause = parseAssertClause(); } parseSemicolon(); @@ -33956,7 +33979,7 @@ if (parseOptional(63 /* EqualsToken */)) { isExportEquals = true; } else { - parseExpected(88 /* DefaultKeyword */); + parseExpected(89 /* DefaultKeyword */); } const expression = parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ @@ -34154,16 +34177,12 @@ while (true) { switch (token()) { case 59 /* AtToken */: - if (state === 0 /* BeginningOfLine */ || state === 1 /* SawAsterisk */) { - removeTrailingWhitespace(comments); - if (!commentsPos) - commentsPos = getNodePos(); - addTag(parseTag(indent3)); - state = 0 /* BeginningOfLine */; - margin = void 0; - } else { - pushComment(scanner2.getTokenText()); - } + removeTrailingWhitespace(comments); + if (!commentsPos) + commentsPos = getNodePos(); + addTag(parseTag(indent3)); + state = 0 /* BeginningOfLine */; + margin = void 0; break; case 4 /* NewLineTrivia */: comments.push(scanner2.getTokenText()); @@ -34172,29 +34191,33 @@ break; case 41 /* AsteriskToken */: const asterisk = scanner2.getTokenText(); - if (state === 1 /* SawAsterisk */ || state === 2 /* SavingComments */) { + if (state === 1 /* SawAsterisk */) { state = 2 /* SavingComments */; pushComment(asterisk); } else { + Debug.assert(state === 0 /* BeginningOfLine */); state = 1 /* SawAsterisk */; indent3 += asterisk.length; } break; case 5 /* WhitespaceTrivia */: + Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text"); const whitespace = scanner2.getTokenText(); - if (state === 2 /* SavingComments */) { - comments.push(whitespace); - } else if (margin !== void 0 && indent3 + whitespace.length > margin) { + if (margin !== void 0 && indent3 + whitespace.length > margin) { comments.push(whitespace.slice(margin - indent3)); } indent3 += whitespace.length; break; case 1 /* EndOfFileToken */: break loop; + case 81 /* JSDocCommentTextToken */: + state = 2 /* SavingComments */; + pushComment(scanner2.getTokenValue()); + break; case 18 /* OpenBraceToken */: state = 2 /* SavingComments */; - const commentEnd = scanner2.getStartPos(); - const linkStart = scanner2.getTextPos() - 1; + const commentEnd = scanner2.getTokenFullStart(); + const linkStart = scanner2.getTokenEnd() - 1; const link = parseJSDocLink(linkStart); if (link) { if (!linkEnd) { @@ -34203,7 +34226,7 @@ parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd != null ? linkEnd : start, commentEnd)); parts.push(link); comments = []; - linkEnd = scanner2.getTextPos(); + linkEnd = scanner2.getTokenEnd(); break; } default: @@ -34211,16 +34234,23 @@ pushComment(scanner2.getTokenText()); break; } - nextTokenJSDoc(); + if (state === 2 /* SavingComments */) { + nextJSDocCommentTextToken( + /*inBackticks*/ + false + ); + } else { + nextTokenJSDoc(); + } } - removeTrailingWhitespace(comments); - if (parts.length && comments.length) { - parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd != null ? linkEnd : start, commentsPos)); + const trimmedComments = trimStringEnd(comments.join("")); + if (parts.length && trimmedComments.length) { + parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd != null ? linkEnd : start, commentsPos)); } if (parts.length && tags) Debug.assertIsDefined(commentsPos, "having parsed tags implies that the end of the comment span should be set"); const tagsArray = tags && createNodeArray(tags, tagsPos, tagsEnd); - return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : comments.length ? comments.join("") : void 0, tagsArray), start, end); + return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : trimmedComments.length ? trimmedComments : void 0, tagsArray), start, end); }); function removeLeadingNewlines(comments2) { while (comments2.length && (comments2[0] === "\n" || comments2[0] === "\r")) { @@ -34228,8 +34258,16 @@ } } function removeTrailingWhitespace(comments2) { - while (comments2.length && comments2[comments2.length - 1].trim() === "") { - comments2.pop(); + while (comments2.length) { + const trimmed = trimStringEnd(comments2[comments2.length - 1]); + if (trimmed === "") { + comments2.pop(); + } else if (trimmed.length < comments2[comments2.length - 1].length) { + comments2[comments2.length - 1] = trimmed; + break; + } else { + break; + } } } function isNextNonwhitespaceTokenEndOfFile() { @@ -34277,7 +34315,7 @@ } function parseTag(margin) { Debug.assert(token() === 59 /* AtToken */); - const start2 = scanner2.getTokenPos(); + const start2 = scanner2.getTokenStart(); nextTokenJSDoc(); const tagName = parseJSDocIdentifierName( /*message*/ @@ -34376,7 +34414,6 @@ const parts2 = []; let linkEnd2; let state = 0 /* BeginningOfLine */; - let previousWhitespace = true; let margin; function pushComment(text) { if (!margin) { @@ -34401,34 +34438,29 @@ indent3 = 0; break; case 59 /* AtToken */: - if (state === 3 /* SavingBackticks */ || state === 2 /* SavingComments */ && (!previousWhitespace || lookAhead(isNextJSDocTokenWhitespace))) { - comments2.push(scanner2.getTokenText()); - break; - } - scanner2.setTextPos(scanner2.getTextPos() - 1); + scanner2.resetTokenState(scanner2.getTokenEnd() - 1); + break loop; case 1 /* EndOfFileToken */: break loop; case 5 /* WhitespaceTrivia */: - if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { - pushComment(scanner2.getTokenText()); - } else { - const whitespace = scanner2.getTokenText(); - if (margin !== void 0 && indent3 + whitespace.length > margin) { - comments2.push(whitespace.slice(margin - indent3)); - } - indent3 += whitespace.length; + Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text"); + const whitespace = scanner2.getTokenText(); + if (margin !== void 0 && indent3 + whitespace.length > margin) { + comments2.push(whitespace.slice(margin - indent3)); + state = 2 /* SavingComments */; } + indent3 += whitespace.length; break; case 18 /* OpenBraceToken */: state = 2 /* SavingComments */; - const commentEnd = scanner2.getStartPos(); - const linkStart = scanner2.getTextPos() - 1; + const commentEnd = scanner2.getTokenFullStart(); + const linkStart = scanner2.getTokenEnd() - 1; const link = parseJSDocLink(linkStart); if (link) { parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 != null ? linkEnd2 : commentsPos2, commentEnd)); parts2.push(link); comments2 = []; - linkEnd2 = scanner2.getTextPos(); + linkEnd2 = scanner2.getTokenEnd(); } else { pushComment(scanner2.getTokenText()); } @@ -34441,6 +34473,12 @@ } pushComment(scanner2.getTokenText()); break; + case 81 /* JSDocCommentTextToken */: + if (state !== 3 /* SavingBackticks */) { + state = 2 /* SavingComments */; + } + pushComment(scanner2.getTokenValue()); + break; case 41 /* AsteriskToken */: if (state === 0 /* BeginningOfLine */) { state = 1 /* SawAsterisk */; @@ -34454,24 +34492,23 @@ pushComment(scanner2.getTokenText()); break; } - previousWhitespace = token() === 5 /* WhitespaceTrivia */; - tok = nextTokenJSDoc(); + if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { + tok = nextJSDocCommentTextToken(state === 3 /* SavingBackticks */); + } else { + tok = nextTokenJSDoc(); + } } removeLeadingNewlines(comments2); - removeTrailingWhitespace(comments2); + const trimmedComments = trimStringEnd(comments2.join("")); if (parts2.length) { - if (comments2.length) { - parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 != null ? linkEnd2 : commentsPos2)); + if (trimmedComments.length) { + parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 != null ? linkEnd2 : commentsPos2)); } - return createNodeArray(parts2, commentsPos2, scanner2.getTextPos()); - } else if (comments2.length) { - return comments2.join(""); + return createNodeArray(parts2, commentsPos2, scanner2.getTokenEnd()); + } else if (trimmedComments.length) { + return trimmedComments; } } - function isNextJSDocTokenWhitespace() { - const next = nextTokenJSDoc(); - return next === 5 /* WhitespaceTrivia */ || next === 4 /* NewLineTrivia */; - } function parseJSDocLink(start2) { const linkType = tryParse(parseJSDocLinkPrefix); if (!linkType) { @@ -34497,7 +34534,7 @@ nextTokenJSDoc(); } const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain; - return finishNode(create(name, text.join("")), start2, scanner2.getTextPos()); + return finishNode(create(name, text.join("")), start2, scanner2.getTokenEnd()); } function parseJSDocLinkPrefix() { skipWhitespaceOrAsterisk(); @@ -34550,9 +34587,9 @@ } function isObjectOrObjectArrayTypeReference(node) { switch (node.kind) { - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return true; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -34582,26 +34619,26 @@ let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) { - if (child.kind === 344 /* JSDocParameterTag */ || child.kind === 351 /* JSDocPropertyTag */) { + if (child.kind === 345 /* JSDocParameterTag */ || child.kind === 352 /* JSDocPropertyTag */) { children = append(children, child); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 185 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 186 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } } function parseReturnTag(start2, tagName, indent3, indentText) { if (some(tags, isJSDocReturnTag)) { - parseErrorAt(tagName.pos, scanner2.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText); + parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText); } const typeExpression = tryParseTypeExpression(); return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2); } function parseTypeTag(start2, tagName, indent3, indentText) { if (some(tags, isJSDocTypeTag)) { - parseErrorAt(tagName.pos, scanner2.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText); + parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText); } const typeExpression = parseJSDocTypeExpression( /*mayOmitBraces*/ @@ -34624,10 +34661,10 @@ function parseAuthorTag(start2, tagName, indent3, indentText) { const commentStart = getNodePos(); const textOnly = parseAuthorNameAndEmail(); - let commentEnd = scanner2.getStartPos(); + let commentEnd = scanner2.getTokenFullStart(); const comments2 = parseTrailingTagComments(start2, commentEnd, indent3, indentText); if (!comments2) { - commentEnd = scanner2.getStartPos(); + commentEnd = scanner2.getTokenFullStart(); } const allParts = typeof comments2 !== "string" ? createNodeArray(concatenate([finishNode(textOnly, commentStart, commentEnd)], comments2), commentStart) : textOnly.text + comments2; return finishNode(factory2.createJSDocAuthorTag(tagName, allParts), start2); @@ -34643,7 +34680,7 @@ break; } else if (token2 === 31 /* GreaterThanToken */ && inEmail) { comments2.push(scanner2.getTokenText()); - scanner2.setTextPos(scanner2.getTokenPos() + 1); + scanner2.resetTokenState(scanner2.getTokenEnd()); break; } comments2.push(scanner2.getTokenText()); @@ -34722,7 +34759,7 @@ let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent3))) { hasChildren = true; - if (child.kind === 347 /* JSDocTypeTag */) { + if (child.kind === 348 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -34737,7 +34774,7 @@ } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 185 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 186 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -34751,7 +34788,7 @@ return finishNode(typedefTag, start2, end2); } function parseJSDocTypeNameWithNamespace(nested) { - const pos = scanner2.getTokenPos(); + const start2 = scanner2.getTokenStart(); if (!tokenIsIdentifierOrKeyword(token())) { return void 0; } @@ -34768,7 +34805,7 @@ body, nested ? 4 /* NestedNamespace */ : void 0 ); - return finishNode(jsDocNamespaceNode, pos); + return finishNode(jsDocNamespaceNode, start2); } if (nested) { typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */; @@ -34789,7 +34826,7 @@ const returnTag = tryParse(() => { if (parseOptionalJsdoc(59 /* AtToken */)) { const tag = parseTag(indent3); - if (tag && tag.kind === 345 /* JSDocReturnTag */) { + if (tag && tag.kind === 346 /* JSDocReturnTag */) { return tag; } } @@ -34844,7 +34881,7 @@ case 59 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent3); - if (child && (child.kind === 344 /* JSDocParameterTag */ || child.kind === 351 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 345 /* JSDocParameterTag */ || child.kind === 352 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -34871,7 +34908,7 @@ } function tryParseChildTag(target, indent3) { Debug.assert(token() === 59 /* AtToken */); - const start2 = scanner2.getStartPos(); + const start2 = scanner2.getTokenFullStart(); nextTokenJSDoc(); const tagName = parseJSDocIdentifierName(); skipWhitespace(); @@ -34971,11 +35008,11 @@ ); } identifierCount++; - const pos = scanner2.getTokenPos(); - const end2 = scanner2.getTextPos(); + const start2 = scanner2.getTokenStart(); + const end2 = scanner2.getTokenEnd(); const originalKeywordKind = token(); const text = internIdentifier(scanner2.getTokenValue()); - const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), pos, end2); + const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), start2, end2); nextTokenJSDoc(); return result; } @@ -35761,7 +35798,7 @@ var _a2; const rootExpression = (_a2 = sourceFile.statements[0]) == null ? void 0 : _a2.expression; const knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : void 0; - if (rootExpression && rootExpression.kind !== 207 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 208 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -35819,7 +35856,7 @@ function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 299 /* PropertyAssignment */) { + if (element.kind !== 300 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -35877,19 +35914,19 @@ function convertPropertyValueToJson(valueExpression, option) { let invalidReported; switch (valueExpression.kind) { - case 110 /* TrueKeyword */: + case 111 /* TrueKeyword */: reportInvalidOptionValue(option && option.type !== "boolean" && (option.type !== "listOrElement" || option.element.type !== "boolean")); return validateValue( /*value*/ true ); - case 95 /* FalseKeyword */: + case 96 /* FalseKeyword */: reportInvalidOptionValue(option && option.type !== "boolean" && (option.type !== "listOrElement" || option.element.type !== "boolean")); return validateValue( /*value*/ false ); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: reportInvalidOptionValue(option && option.name === "extends"); return validateValue( /*value*/ @@ -35920,13 +35957,13 @@ case 8 /* NumericLiteral */: reportInvalidOptionValue(option && option.type !== "number" && (option.type !== "listOrElement" || option.element.type !== "number")); return validateValue(Number(valueExpression.text)); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: if (valueExpression.operator !== 40 /* MinusToken */ || valueExpression.operand.kind !== 8 /* NumericLiteral */) { break; } reportInvalidOptionValue(option && option.type !== "number" && (option.type !== "listOrElement" || option.element.type !== "number")); return validateValue(-Number(valueExpression.operand.text)); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: reportInvalidOptionValue(option && option.type !== "object" && (option.type !== "listOrElement" || option.element.type !== "object")); const objectLiteralExpression = valueExpression; if (option) { @@ -35948,7 +35985,7 @@ void 0 )); } - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: reportInvalidOptionValue(option && option.type !== "list" && option.type !== "listOrElement"); return validateValue(convertArrayLiteralExpressionToJson( valueExpression.elements, @@ -41204,23 +41241,23 @@ } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 276 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 277 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -41234,7 +41271,7 @@ return state; } break; - case 265 /* ModuleBlock */: { + case 266 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -41253,7 +41290,7 @@ }); return state; } - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 79 /* Identifier */: if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { @@ -41418,7 +41455,7 @@ } } function getDeclarationName(node) { - if (node.kind === 274 /* ExportAssignment */) { + if (node.kind === 275 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -41427,7 +41464,7 @@ const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 164 /* ComputedPropertyName */) { + if (name.kind === 165 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -41449,31 +41486,31 @@ return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return "__constructor" /* Constructor */; - case 181 /* FunctionType */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: + case 182 /* FunctionType */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: return "__call" /* Call */; - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: return "__new" /* New */; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return "__index" /* Index */; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return "export=" /* ExportEquals */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); break; - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 166 /* Parameter */: - Debug.assert(node.parent.kind === 320 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 167 /* Parameter */: + Debug.assert(node.parent.kind === 321 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); const functionType = node.parent; const index = functionType.parameters.indexOf(node); return "arg" + index; @@ -41520,7 +41557,7 @@ messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 274 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 275 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -41559,7 +41596,7 @@ function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 278 /* ExportSpecifier */ || node.kind === 268 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 279 /* ExportSpecifier */ || node.kind === 269 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { Debug.assertNode(container, canHaveLocals); @@ -41626,7 +41663,7 @@ const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 216 /* ArrowFunction */) { + if (node.kind !== 217 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -41648,14 +41685,14 @@ const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 172 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 173 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 173 /* Constructor */ || isInJSFile(node) && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 174 /* Constructor */ || isInJSFile(node) && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; @@ -41669,14 +41706,14 @@ node.flags |= 512 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 173 /* Constructor */ || node.kind === 172 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */)) { + if (node.kind === 174 /* Constructor */ || node.kind === 173 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -41702,8 +41739,8 @@ blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 259 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 259 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 260 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 260 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -41723,59 +41760,59 @@ inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 240 /* FirstStatement */ && node.kind <= 256 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 241 /* FirstStatement */ && node.kind <= 257 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: bindWhileStatement(node); break; - case 243 /* DoStatement */: + case 244 /* DoStatement */: bindDoStatement(node); break; - case 245 /* ForStatement */: + case 246 /* ForStatement */: bindForStatement(node); break; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 242 /* IfStatement */: + case 243 /* IfStatement */: bindIfStatement(node); break; - case 250 /* ReturnStatement */: - case 254 /* ThrowStatement */: + case 251 /* ReturnStatement */: + case 255 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: bindTryStatement(node); break; - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: bindSwitchStatement(node); break; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: bindCaseBlock(node); break; - case 292 /* CaseClause */: + case 293 /* CaseClause */: bindCaseClause(node); break; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: bindLabeledStatement(node); break; - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -41783,49 +41820,49 @@ } bindBinaryExpressionFlow(node); break; - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: bindCallExpressionFlow(node); break; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 308 /* SourceFile */: { + case 309 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 238 /* Block */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 266 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: bindBindingElementFlow(node); break; - case 166 /* Parameter */: + case 167 /* Parameter */: bindParameterFlow(node); break; - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: - case 299 /* PropertyAssignment */: - case 227 /* SpreadElement */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: + case 300 /* PropertyAssignment */: + case 228 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -41838,20 +41875,20 @@ switch (expr.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 108 /* ThisKeyword */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 109 /* ThisKeyword */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return hasNarrowableArgument(expr); - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return expr.operator === 53 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -41870,7 +41907,7 @@ } } } - if (expr.expression.kind === 208 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 209 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -41890,9 +41927,9 @@ case 36 /* EqualsEqualsEqualsToken */: case 37 /* ExclamationEqualsEqualsToken */: return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return isNarrowableOperand(expr.left); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return isNarrowingExpression(expr.right); case 27 /* CommaToken */: return isNarrowingExpression(expr.right); @@ -41901,9 +41938,9 @@ } function isNarrowableOperand(expr) { switch (expr.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 63 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -41938,7 +41975,7 @@ if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if ((expression.kind === 110 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || expression.kind === 95 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && !isExpressionOfOptionalChainRoot(expression) && !isNullishCoalesce(expression.parent)) { + if ((expression.kind === 111 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || expression.kind === 96 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && !isExpressionOfOptionalChainRoot(expression) && !isNullishCoalesce(expression.parent)) { return unreachableFlow; } if (!isNarrowingExpression(expression)) { @@ -41976,21 +42013,21 @@ function isStatementCondition(node) { const parent3 = node.parent; switch (parent3.kind) { - case 242 /* IfStatement */: - case 244 /* WhileStatement */: - case 243 /* DoStatement */: + case 243 /* IfStatement */: + case 245 /* WhileStatement */: + case 244 /* DoStatement */: return parent3.expression === node; - case 245 /* ForStatement */: - case 224 /* ConditionalExpression */: + case 246 /* ForStatement */: + case 225 /* ConditionalExpression */: return parent3.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 214 /* ParenthesizedExpression */) { + if (node.kind === 215 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { + } else if (node.kind === 222 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { node = node.operand; } else { return isLogicalOrCoalescingBinaryExpression(node); @@ -42033,7 +42070,7 @@ } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 253 /* LabeledStatement */) { + while (label && node.parent.kind === 254 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -42084,12 +42121,12 @@ bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 247 /* ForOfStatement */) { + if (node.kind === 248 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 258 /* VariableDeclarationList */) { + if (node.initializer.kind !== 259 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -42111,7 +42148,7 @@ } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 250 /* ReturnStatement */) { + if (node.kind === 251 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -42128,7 +42165,7 @@ return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 249 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 250 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -42198,7 +42235,7 @@ preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 293 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 294 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -42241,9 +42278,9 @@ maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { const call = node; - if (call.expression.kind !== 106 /* SuperKeyword */ && isDottedName(call.expression)) { + if (call.expression.kind !== 107 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); } } @@ -42267,7 +42304,7 @@ currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -42276,21 +42313,21 @@ function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 206 /* ArrayLiteralExpression */) { + } else if (node.kind === 207 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 227 /* SpreadElement */) { + if (e.kind === 228 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 207 /* ObjectLiteralExpression */) { + } else if (node.kind === 208 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 299 /* PropertyAssignment */) { + if (p.kind === 300 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 300 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 301 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 301 /* SpreadAssignment */) { + } else if (p.kind === 302 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -42421,7 +42458,7 @@ const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 63 /* EqualsToken */ && node.left.kind === 209 /* ElementAccessExpression */) { + if (operator === 63 /* EqualsToken */ && node.left.kind === 210 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -42449,7 +42486,7 @@ } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 208 /* PropertyAccessExpression */) { + if (node.expression.kind === 209 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -42514,7 +42551,7 @@ } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 343 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 344 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive( node.fullName, @@ -42529,7 +42566,7 @@ function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 171 /* MethodDeclaration */) { + if (host && host.kind !== 172 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -42542,15 +42579,15 @@ } function bindOptionalChainRest(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -42597,18 +42634,18 @@ bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 215 /* FunctionExpression */ || expr.kind === 216 /* ArrowFunction */) { + if (expr.kind === 216 /* FunctionExpression */ || expr.kind === 217 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); } else { bindEachChild(node); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { currentFlow = createFlowCall(currentFlow, node); } } } - if (node.expression.kind === 208 /* PropertyAccessExpression */) { + if (node.expression.kind === 209 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -42623,39 +42660,39 @@ } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 308 /* SourceFile */: + case 309 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 207 /* ObjectLiteralExpression */: - case 261 /* InterfaceDeclaration */: - case 289 /* JsxAttributes */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 208 /* ObjectLiteralExpression */: + case 262 /* InterfaceDeclaration */: + case 290 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 326 /* JSDocSignature */: - case 178 /* IndexSignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 320 /* JSDocFunctionType */: - case 172 /* ClassStaticBlockDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 197 /* MappedType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 327 /* JSDocSignature */: + case 179 /* IndexSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 321 /* JSDocFunctionType */: + case 173 /* ClassStaticBlockDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 198 /* MappedType */: if (container.locals) Debug.assertNode(container, canHaveLocals); return declareSymbol( @@ -42757,10 +42794,10 @@ } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -42855,13 +42892,13 @@ if (originalKeywordKind === void 0) { return; } - if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) { + if (inStrictMode && originalKeywordKind >= 118 /* FirstFutureReservedWord */ && originalKeywordKind <= 126 /* LastFutureReservedWord */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, getStrictModeIdentifierMessage(node), declarationNameToString(node) )); - } else if (originalKeywordKind === 133 /* AwaitKeyword */) { + } else if (originalKeywordKind === 134 /* AwaitKeyword */) { if (isExternalModule(file) && isInTopLevelContext(node)) { file.bindDiagnostics.push(createDiagnosticForNode2( node, @@ -42875,7 +42912,7 @@ declarationNameToString(node) )); } - } else if (originalKeywordKind === 125 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { + } else if (originalKeywordKind === 126 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, @@ -42963,7 +43000,7 @@ } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 308 /* SourceFile */ && blockScopeContainer.kind !== 264 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 309 /* SourceFile */ && blockScopeContainer.kind !== 265 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -43030,7 +43067,7 @@ node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 162 /* LastToken */) { + if (node.kind > 163 /* LastToken */) { const saveParent = parent2; parent2 = node; const containerFlags = getContainerFlags(node); @@ -43095,24 +43132,24 @@ bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); break; } - case 108 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 300 /* ShorthandPropertyAssignment */)) { + case 109 /* ThisKeyword */: + if (currentFlow && (isExpression(node) || parent2.kind === 301 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 233 /* MetaProperty */: - case 106 /* SuperKeyword */: + case 234 /* MetaProperty */: + case 107 /* SuperKeyword */: node.flowNode = currentFlow; break; case 80 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -43131,7 +43168,7 @@ ); } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -43166,83 +43203,83 @@ Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return checkStrictModeCatchClause(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return checkStrictModeWithStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 194 /* ThisType */: + case 195 /* ThisType */: seenThisKeyword = true; return; - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return bindTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return bindParameter(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return bindPropertyWorker(node); - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 302 /* EnumMember */: + case 303 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return declareSymbolAndAddToSymbolTable( node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */ ); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 181 /* FunctionType */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 183 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 197 /* MappedType */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 198 /* MappedType */: return bindAnonymousTypeWorker(node); - case 335 /* JSDocClassTag */: + case 336 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return bindFunctionExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -43260,60 +43297,60 @@ bindCallExpression(node); } break; - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return bindJsxAttributes(node); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 268 /* ImportEqualsDeclaration */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 269 /* ImportEqualsDeclaration */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return bindImportClause(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return bindExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return bindExportAssignment(node); - case 308 /* SourceFile */: + case 309 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 238 /* Block */: + case 239 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 344 /* JSDocParameterTag */: - if (node.parent.kind === 326 /* JSDocSignature */) { + case 345 /* JSDocParameterTag */: + if (node.parent.kind === 327 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 325 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 326 /* JSDocTypeLiteral */) { break; } - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 319 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 320 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return bind(node.typeExpression); } } @@ -43465,8 +43502,8 @@ false ); switch (thisContainer.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 63 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -43484,12 +43521,12 @@ addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -43506,7 +43543,7 @@ ); } break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -43539,9 +43576,9 @@ } } function bindSpecialPropertyDeclaration(node) { - if (node.expression.kind === 108 /* ThisKeyword */) { + if (node.expression.kind === 109 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 308 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 309 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -43590,7 +43627,7 @@ } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 308 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 309 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces( namespaceSymbol, node.arguments[0], @@ -43704,7 +43741,7 @@ declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 308 /* SourceFile */ : propertyAccess.parent.parent.kind === 308 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 309 /* SourceFile */ : propertyAccess.parent.parent.kind === 309 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -43766,7 +43803,7 @@ } } function bindClassLikeDeclaration(node) { - if (node.kind === 260 /* ClassDeclaration */) { + if (node.kind === 261 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -43795,7 +43832,7 @@ checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 257 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 258 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && getEmitModuleResolutionKind(options) !== 100 /* Bundler */ && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -43808,7 +43845,7 @@ } } function bindParameter(node) { - if (node.kind === 344 /* JSDocParameterTag */ && container.kind !== 326 /* JSDocSignature */) { + if (node.kind === 345 /* JSDocParameterTag */ && container.kind !== 327 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { @@ -43882,7 +43919,7 @@ } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 192 /* InferType */) { + } else if (node.parent.kind === 193 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { Debug.assertNode(container2, canHaveLocals); @@ -43913,9 +43950,9 @@ if (currentFlow === unreachableFlow) { const reportError = ( // report error on all statements except empty ones - isStatementButNotDeclaration(node) && node.kind !== 239 /* EmptyStatement */ || // report error on class declarations - node.kind === 260 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - node.kind === 264 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) + isStatementButNotDeclaration(node) && node.kind !== 240 /* EmptyStatement */ || // report error on class declarations + node.kind === 261 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + node.kind === 265 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) ); if (reportError) { currentFlow = reportedUnreachableFlow; @@ -43943,12 +43980,12 @@ } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -43983,54 +44020,54 @@ } function getContainerFlags(node) { switch (node.kind) { - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 289 /* JsxAttributes */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 290 /* JsxAttributes */: return 1 /* IsContainer */; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 197 /* MappedType */: - case 178 /* IndexSignature */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 198 /* MappedType */: + case 179 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: - case 320 /* JSDocFunctionType */: - case 181 /* FunctionType */: - case 177 /* ConstructSignature */: - case 182 /* ConstructorType */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: + case 321 /* JSDocFunctionType */: + case 182 /* FunctionType */: + case 178 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 173 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 295 /* CatchClause */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 266 /* CaseBlock */: + case 296 /* CatchClause */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 267 /* CaseBlock */: return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - case 238 /* Block */: + case 239 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; } return 0 /* None */; @@ -44206,7 +44243,7 @@ symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 183 /* TypeQuery */) { + if (d.type && d.type.kind === 184 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -45324,7 +45361,10 @@ createIndexInfo, getAnyType: () => anyType, getStringType: () => stringType, + getStringLiteralType, getNumberType: () => numberType, + getNumberLiteralType, + getBigIntType: () => bigintType, createPromiseType, createArrayType, getElementTypeOfArrayType, @@ -46238,7 +46278,7 @@ return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 308 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 309 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function getSymbol2(symbols, name, meaning) { if (meaning) { @@ -46282,13 +46322,13 @@ return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 205 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 205 /* BindingElement */); + if (declaration.kind === 206 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 206 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 257 /* VariableDeclaration */), usage); - } else if (declaration.kind === 257 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 258 /* VariableDeclaration */), usage); + } else if (declaration.kind === 258 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -46304,10 +46344,10 @@ } return true; } - if (usage.parent.kind === 278 /* ExportSpecifier */ || usage.parent.kind === 274 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 279 /* ExportSpecifier */ || usage.parent.kind === 275 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 274 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 275 /* ExportAssignment */ && usage.isExportEquals) { return true; } if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { @@ -46328,9 +46368,9 @@ return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 240 /* VariableStatement */: - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: + case 241 /* VariableStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -46355,7 +46395,7 @@ const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 171 /* MethodDeclaration */) { + if (declaration2.kind === 172 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -46369,7 +46409,7 @@ } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 169 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 170 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -46388,15 +46428,15 @@ return "quit"; } switch (node.kind) { - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return true; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 238 /* Block */: + case 239 /* Block */: switch (node.parent.kind) { - case 174 /* GetAccessor */: - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: return true; default: return false; @@ -46426,17 +46466,17 @@ } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 173 /* Constructor */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 174 /* Constructor */: return false; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 299 /* PropertyAssignment */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 300 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (hasStaticModifier(node)) { return target < 99 /* ESNext */ || !useDefineForClassFields; } @@ -46481,17 +46521,17 @@ if (result = lookup(location.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 323 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 166 /* Parameter */ || lastLocation.kind === 344 /* JSDocParameterTag */ || lastLocation.kind === 345 /* JSDocReturnTag */ || lastLocation.kind === 165 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 324 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 167 /* Parameter */ || lastLocation.kind === 345 /* JSDocParameterTag */ || lastLocation.kind === 346 /* JSDocReturnTag */ || lastLocation.kind === 166 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 166 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 167 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 191 /* ConditionalType */) { + } else if (location.kind === 192 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -46503,13 +46543,13 @@ } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const moduleExports = ((_a2 = getSymbolOfDeclaration(location)) == null ? void 0 : _a2.exports) || emptySymbols; - if (location.kind === 308 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 309 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { if (result = moduleExports.get("default" /* Default */)) { const localSymbol = getLocalSymbolForExportDefault(result); if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { @@ -46518,7 +46558,7 @@ result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 278 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 277 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 279 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 278 /* NamespaceExport */))) { break; } } @@ -46530,7 +46570,7 @@ } } break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 16777216 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { error( @@ -46544,7 +46584,7 @@ break loop; } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -46555,9 +46595,9 @@ } } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -46579,8 +46619,8 @@ } } break; - case 230 /* ExpressionWithTypeArguments */: - if (lastLocation === location.expression && location.parent.token === 94 /* ExtendsKeyword */) { + case 231 /* ExpressionWithTypeArguments */: + if (lastLocation === location.expression && location.parent.token === 95 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) { if (nameNotFoundMessage) { @@ -46590,9 +46630,9 @@ } } break; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 261 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 262 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -46601,21 +46641,21 @@ } } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -46628,37 +46668,37 @@ } } break; - case 167 /* Decorator */: - if (location.parent && location.parent.kind === 166 /* Parameter */) { + case 168 /* Decorator */: + if (location.parent && location.parent.kind === 167 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 260 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 261 /* ClassDeclaration */)) { location = location.parent; } break; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 192 /* InferType */: + case 193 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -46786,7 +46826,7 @@ if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */); if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 277 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + const message = typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 278 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; const unescapedName = unescapeLeadingUnderscores(name); addTypeOnlyDeclarationRelatedInfo( error(errorLocation, message, unescapedName), @@ -46806,14 +46846,14 @@ diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 277 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 278 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 216 /* ArrowFunction */ && location.kind !== 215 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 169 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 217 /* ArrowFunction */ && location.kind !== 216 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 170 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -46825,12 +46865,12 @@ } function isSelfReferenceLocation(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 264 /* ModuleDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 265 /* ModuleDeclaration */: return true; default: return false; @@ -46842,7 +46882,7 @@ function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 165 /* TypeParameter */) { + if (decl.kind === 166 /* TypeParameter */) { const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent2 === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -46903,9 +46943,9 @@ function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -46973,7 +47013,7 @@ return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 278 /* ExportSpecifier */) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 279 /* ExportSpecifier */) { error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } @@ -47019,7 +47059,7 @@ const grandparent = node.parent.parent; const parentOfGrandparent = grandparent.parent; if (grandparent && parentOfGrandparent) { - const isExtending = isHeritageClause(grandparent) && grandparent.token === 94 /* ExtendsKeyword */; + const isExtending = isHeritageClause(grandparent) && grandparent.token === 95 /* ExtendsKeyword */; const isInterface = isInterfaceDeclaration(parentOfGrandparent); return isExtending && isInterface; } @@ -47097,7 +47137,7 @@ return; } const declaration = (_a2 = result.declarations) == null ? void 0 : _a2.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 263 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 264 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); @@ -47129,13 +47169,13 @@ } function getAnyImportSyntax(node) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return node; - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.parent; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.parent; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -47145,7 +47185,7 @@ return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); } function isAliasSymbolDeclaration2(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 267 /* NamespaceExportDeclaration */ || node.kind === 270 /* ImportClause */ && !!node.name || node.kind === 271 /* NamespaceImport */ || node.kind === 277 /* NamespaceExport */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 278 /* ExportSpecifier */ || node.kind === 274 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 300 /* ShorthandPropertyAssignment */ || node.kind === 299 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 257 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 205 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 268 /* NamespaceExportDeclaration */ || node.kind === 271 /* ImportClause */ && !!node.name || node.kind === 272 /* NamespaceImport */ || node.kind === 278 /* NamespaceExport */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 279 /* ExportSpecifier */ || node.kind === 275 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 301 /* ShorthandPropertyAssignment */ || node.kind === 300 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 258 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 206 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -47156,7 +47196,7 @@ const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; } - if (isVariableDeclaration(node) || node.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 281 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -47185,10 +47225,10 @@ false ) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node)); - const isExport = typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */; + const isExport = typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */; const message = isExport ? Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; - const name = typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + const name = typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); addRelatedInfo(error(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); } } @@ -47330,15 +47370,15 @@ } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.parent.moduleSpecifier; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -47671,26 +47711,26 @@ } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: - case 257 /* VariableDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 258 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 273 /* ImportSpecifier */: - case 205 /* BindingElement */: + case 274 /* ImportSpecifier */: + case 206 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 274 /* ExportAssignment */: - case 223 /* BinaryExpression */: + case 275 /* ExportAssignment */: + case 224 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return resolveEntityName( node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -47698,10 +47738,10 @@ true, dontRecursivelyResolve ); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -47802,7 +47842,7 @@ return links.typeOnlyDeclaration || void 0; } if (links.typeOnlyDeclaration) { - const resolved = links.typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); + const resolved = links.typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; } return void 0; @@ -47845,7 +47885,7 @@ if (entityName.kind === 79 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 163 /* QualifiedName */) { + if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 164 /* QualifiedName */) { return resolveEntityName( entityName, 1920 /* Namespace */, @@ -47854,7 +47894,7 @@ dontResolveAlias ); } else { - Debug.assert(entityName.parent.kind === 268 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 269 /* ImportEqualsDeclaration */); return resolveEntityName( entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -47925,9 +47965,9 @@ if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 163 /* QualifiedName */ || name.kind === 208 /* PropertyAccessExpression */) { - const left = name.kind === 163 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 163 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 164 /* QualifiedName */ || name.kind === 209 /* PropertyAccessExpression */) { + const left = name.kind === 164 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 164 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName( left, namespaceMeaning, @@ -47991,7 +48031,7 @@ throw Debug.assertNever(name, "Unknown entity name kind."); } Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 274 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 275 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly( getAliasDeclarationFromName(name), symbol, @@ -48343,7 +48383,7 @@ var _a2; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 308 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 309 /* SourceFile */)) { const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; error(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); return symbol; @@ -48448,7 +48488,7 @@ return shouldTreatPropertiesOfExternalModuleAsExports(type) ? getPropertyOfType(type, memberName) : void 0; } function shouldTreatPropertiesOfExternalModuleAsExports(resolvedExternalModuleType) { - return !(resolvedExternalModuleType.flags & 134348796 /* Primitive */ || getObjectFlags(resolvedExternalModuleType) & 1 /* Class */ || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path + return !(resolvedExternalModuleType.flags & 402784252 /* Primitive */ || getObjectFlags(resolvedExternalModuleType) & 1 /* Class */ || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path isArrayType(resolvedExternalModuleType) || isTupleType(resolvedExternalModuleType)); } function getExportsOfSymbol(symbol) { @@ -48705,7 +48745,7 @@ function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 173 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 174 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -48823,11 +48863,11 @@ } } switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const sym = getSymbolOfDeclaration(location); if (result = callback( (sym == null ? void 0 : sym.exports) || emptySymbols, @@ -48840,9 +48880,9 @@ return result; } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: let table; (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -48920,7 +48960,7 @@ return [symbol]; } const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => { - if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 278 /* ExportSpecifier */))) { + if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 279 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -48965,7 +49005,7 @@ if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 278 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 279 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { @@ -48980,10 +49020,10 @@ if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: continue; default: return false; @@ -49119,10 +49159,10 @@ return node && getSymbolOfDeclaration(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -49170,9 +49210,9 @@ } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 183 /* TypeQuery */ || entityName.parent.kind === 230 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 164 /* ComputedPropertyName */) { + if (entityName.parent.kind === 184 /* TypeQuery */ || entityName.parent.kind === 231 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 165 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 163 /* QualifiedName */ || entityName.kind === 208 /* PropertyAccessExpression */ || entityName.parent.kind === 268 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 164 /* QualifiedName */ || entityName.kind === 209 /* PropertyAccessExpression */ || entityName.parent.kind === 269 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -49238,7 +49278,7 @@ return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 309 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode( 4 /* Unspecified */, @@ -49255,9 +49295,9 @@ function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 182 /* ConstructorType */ : 181 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 183 /* ConstructorType */ : 182 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 178 /* ConstructSignature */ : 177 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -49403,7 +49443,7 @@ return void 0; } context.approximateLength += 3; - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (!(context.flags & 536870912 /* NoTypeReduction */)) { type = getReducedType(type); @@ -49413,29 +49453,29 @@ return factory.createTypeReferenceNode(symbolToEntityNameNode(type.aliasSymbol), mapToTypeNodes(type.aliasTypeArguments, context)); } if (type === unresolvedType) { - return addSyntheticLeadingComment(factory.createKeywordTypeNode(131 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "unresolved"); + return addSyntheticLeadingComment(factory.createKeywordTypeNode(132 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "unresolved"); } context.approximateLength += 3; - return factory.createKeywordTypeNode(type === intrinsicMarkerType ? 139 /* IntrinsicKeyword */ : 131 /* AnyKeyword */); + return factory.createKeywordTypeNode(type === intrinsicMarkerType ? 140 /* IntrinsicKeyword */ : 132 /* AnyKeyword */); } if (type.flags & 2 /* Unknown */) { - return factory.createKeywordTypeNode(157 /* UnknownKeyword */); + return factory.createKeywordTypeNode(158 /* UnknownKeyword */); } if (type.flags & 4 /* String */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(152 /* StringKeyword */); + return factory.createKeywordTypeNode(153 /* StringKeyword */); } if (type.flags & 8 /* Number */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(148 /* NumberKeyword */); + return factory.createKeywordTypeNode(149 /* NumberKeyword */); } if (type.flags & 64 /* BigInt */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(160 /* BigIntKeyword */); + return factory.createKeywordTypeNode(161 /* BigIntKeyword */); } if (type.flags & 16 /* Boolean */ && !type.aliasSymbol) { context.approximateLength += 7; - return factory.createKeywordTypeNode(134 /* BooleanKeyword */); + return factory.createKeywordTypeNode(135 /* BooleanKeyword */); } if (type.flags & 1056 /* EnumLike */) { if (type.symbol.flags & 8 /* EnumMember */) { @@ -49494,15 +49534,15 @@ } } context.approximateLength += 13; - return factory.createTypeOperatorNode(156 /* UniqueKeyword */, factory.createKeywordTypeNode(153 /* SymbolKeyword */)); + return factory.createTypeOperatorNode(157 /* UniqueKeyword */, factory.createKeywordTypeNode(154 /* SymbolKeyword */)); } if (type.flags & 16384 /* Void */) { context.approximateLength += 4; - return factory.createKeywordTypeNode(114 /* VoidKeyword */); + return factory.createKeywordTypeNode(115 /* VoidKeyword */); } if (type.flags & 32768 /* Undefined */) { context.approximateLength += 9; - return factory.createKeywordTypeNode(155 /* UndefinedKeyword */); + return factory.createKeywordTypeNode(156 /* UndefinedKeyword */); } if (type.flags & 65536 /* Null */) { context.approximateLength += 4; @@ -49510,15 +49550,15 @@ } if (type.flags & 131072 /* Never */) { context.approximateLength += 5; - return factory.createKeywordTypeNode(144 /* NeverKeyword */); + return factory.createKeywordTypeNode(145 /* NeverKeyword */); } if (type.flags & 4096 /* ESSymbol */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(153 /* SymbolKeyword */); + return factory.createKeywordTypeNode(154 /* SymbolKeyword */); } if (type.flags & 67108864 /* NonPrimitive */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(149 /* ObjectKeyword */); + return factory.createKeywordTypeNode(150 /* ObjectKeyword */); } if (isThisTypeParameter(type)) { if (context.flags & 4194304 /* InObjectTypeLiteral */) { @@ -49612,7 +49652,7 @@ const indexedType = type.type; context.approximateLength += 6; const indexTypeNode = typeToTypeNodeHelper(indexedType, context); - return factory.createTypeOperatorNode(141 /* KeyOfKeyword */, indexTypeNode); + return factory.createTypeOperatorNode(142 /* KeyOfKeyword */, indexTypeNode); } if (type.flags & 134217728 /* TemplateLiteral */) { const texts = type.texts; @@ -49670,9 +49710,9 @@ factory.createTypeReferenceNode(factory.cloneNode(name)), typeToTypeNodeHelper(type2.checkType, context), factory.createConditionalTypeNode(newTypeVariable, extendsTypeNode2, trueTypeNode2, falseTypeNode2), - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ), - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ); } const saveInferTypeParameters = context.inferTypeParameters; @@ -49712,7 +49752,7 @@ const name = typeParameterToName(newParam, context); newTypeVariable = factory.createTypeReferenceNode(name); } - appropriateConstraintTypeNode = factory.createTypeOperatorNode(141 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); + appropriateConstraintTypeNode = factory.createTypeOperatorNode(142 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); } else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context); } @@ -49741,7 +49781,7 @@ originalConstraint.flags & 2 /* Unknown */ ? void 0 : typeToTypeNodeHelper(originalConstraint, context) )), result, - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ); } return result; @@ -49794,7 +49834,7 @@ const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method some(symbol.declarations, (declaration) => isStatic(declaration)); const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol - forEach(symbol.declarations, (declaration) => declaration.parent.kind === 308 /* SourceFile */ || declaration.parent.kind === 265 /* ModuleBlock */)); + forEach(symbol.declarations, (declaration) => declaration.parent.kind === 309 /* SourceFile */ || declaration.parent.kind === 266 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a4 = context.visitedTypes) == null ? void 0 : _a4.has(typeId))) && // it is type of the symbol uses itself recursively (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); @@ -49877,12 +49917,12 @@ } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 181 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 182 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 182 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 183 /* ConstructorType */, context); return signatureNode; } } @@ -49915,7 +49955,7 @@ } const elementType = typeToTypeNodeHelper(typeArguments[0], context); const arrayType = factory.createArrayTypeNode(elementType); - return type2.target === globalArrayType ? arrayType : factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, arrayType); + return type2.target === globalArrayType ? arrayType : factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, arrayType); } else if (type2.target.objectFlags & 8 /* Tuple */) { typeArguments = sameMap(typeArguments, (t, i) => removeMissingType(t, !!(type2.target.elementFlags[i] & 2 /* Optional */))); if (typeArguments.length > 0) { @@ -49939,12 +49979,12 @@ } } const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode(tupleConstituentNodes), 1 /* SingleLine */); - return type2.target.readonly ? factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; + return type2.target.readonly ? factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; } } if (context.encounteredError || context.flags & 524288 /* AllowEmptyTuple */) { const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode([]), 1 /* SingleLine */); - return type2.target.readonly ? factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; + return type2.target.readonly ? factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; } context.encounteredError = true; return void 0; @@ -50068,12 +50108,12 @@ } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 176 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 177 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 177 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 178 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -50120,7 +50160,7 @@ void 0 ); } - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } function shouldUsePlaceholderForProperty(propertySymbol, context) { var _a2; @@ -50157,7 +50197,7 @@ if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); for (const signature of signatures) { - const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 170 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 171 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } } else { @@ -50169,12 +50209,12 @@ context.reverseMappedStack || (context.reverseMappedStack = []); context.reverseMappedStack.push(propertySymbol); } - propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(131 /* AnyKeyword */); + propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(132 /* AnyKeyword */); if (propertyIsReverseMapped) { context.reverseMappedStack.pop(); } } - const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(146 /* ReadonlyKeyword */)] : void 0; + const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(147 /* ReadonlyKeyword */)] : void 0; if (modifiers) { context.approximateLength += 9; } @@ -50188,8 +50228,8 @@ } function preserveCommentsOn(node) { var _a3; - if (some(propertySymbol.declarations, (d) => d.kind === 351 /* JSDocPropertyTag */)) { - const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 351 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 352 /* JSDocPropertyTag */)) { + const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 352 /* JSDocPropertyTag */); const commentText = getTextOfJSDocComment(d.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -50289,7 +50329,7 @@ } context.approximateLength += name.length + 4; return factory.createIndexSignature( - indexInfo.isReadonly ? [factory.createToken(146 /* ReadonlyKeyword */)] : void 0, + indexInfo.isReadonly ? [factory.createToken(147 /* ReadonlyKeyword */)] : void 0, [indexingParameter], typeNode ); @@ -50345,7 +50385,7 @@ } } } - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 173 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); + const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 174 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context); if (thisParameter) { parameters.unshift(thisParameter); @@ -50353,7 +50393,7 @@ let returnTypeNode; const typePredicate = getTypePredicateOfSignature(signature); if (typePredicate) { - const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(129 /* AssertsKeyword */) : void 0; + const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(130 /* AssertsKeyword */) : void 0; const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 33554432 /* NoAsciiEscaping */) : factory.createThisTypeNode(); const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context); returnTypeNode = factory.createTypePredicateNode(assertsModifier, parameterName, typeNode); @@ -50362,15 +50402,15 @@ if (returnType && !(suppressAny && isTypeAny(returnType))) { returnTypeNode = serializeReturnTypeForSignature(context, returnType, signature, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports); } else if (!suppressAny) { - returnTypeNode = factory.createKeywordTypeNode(131 /* AnyKeyword */); + returnTypeNode = factory.createKeywordTypeNode(132 /* AnyKeyword */); } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 182 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 183 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 176 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 177 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 170 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 171 /* MethodDeclaration */ ? factory.createMethodDeclaration( + const node = kind === 177 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 178 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 171 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 172 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -50382,25 +50422,25 @@ returnTypeNode, /*body*/ void 0 - ) : kind === 173 /* Constructor */ ? factory.createConstructorDeclaration( + ) : kind === 174 /* Constructor */ ? factory.createConstructorDeclaration( modifiers, parameters, /*body*/ void 0 - ) : kind === 174 /* GetAccessor */ ? factory.createGetAccessorDeclaration( + ) : kind === 175 /* GetAccessor */ ? factory.createGetAccessorDeclaration( modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, returnTypeNode, /*body*/ void 0 - ) : kind === 175 /* SetAccessor */ ? factory.createSetAccessorDeclaration( + ) : kind === 176 /* SetAccessor */ ? factory.createSetAccessorDeclaration( modifiers, (_e = options == null ? void 0 : options.name) != null ? _e : factory.createIdentifier(""), parameters, /*body*/ void 0 - ) : kind === 178 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 320 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 181 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 182 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 259 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( + ) : kind === 179 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 321 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 182 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 183 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 260 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -50410,7 +50450,7 @@ returnTypeNode, /*body*/ void 0 - ) : kind === 215 /* FunctionExpression */ ? factory.createFunctionExpression( + ) : kind === 216 /* FunctionExpression */ ? factory.createFunctionExpression( modifiers, /*asteriskToken*/ void 0, @@ -50419,7 +50459,7 @@ parameters, returnTypeNode, factory.createBlock([]) - ) : kind === 216 /* ArrowFunction */ ? factory.createArrowFunction( + ) : kind === 217 /* ArrowFunction */ ? factory.createArrowFunction( modifiers, typeParameters, parameters, @@ -50469,9 +50509,9 @@ return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 166 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 167 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 344 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 345 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -50481,7 +50521,7 @@ const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(25 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 33554432 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 163 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 33554432 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 33554432 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 164 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 33554432 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(57 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -50662,11 +50702,11 @@ } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { var _a2; - let file = getDeclarationOfKind(symbol, 308 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 309 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 308 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 309 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -51146,17 +51186,17 @@ } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 322 /* JSDocNamepathType */) { - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + if (isJSDocAllType(node) || node.kind === 323 /* JSDocNamepathType */) { + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { - return factory.createKeywordTypeNode(157 /* UnknownKeyword */); + return factory.createKeywordTypeNode(158 /* UnknownKeyword */); } if (isJSDocNullableType(node)) { return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]); } if (isJSDocOptionalType(node)) { - return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]); + return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(156 /* UndefinedKeyword */)]); } if (isJSDocNonNullableType(node)) { return visitNode(node.type, visitExistingNodeTreeSymbols); @@ -51174,12 +51214,12 @@ void 0, name, t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0, - overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); })); } if (isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "") { - return setOriginalNode(factory.createKeywordTypeNode(131 /* AnyKeyword */), node); + return setOriginalNode(factory.createKeywordTypeNode(132 /* AnyKeyword */), node); } if ((isExpressionWithTypeArguments(node) || isTypeReferenceNode(node)) && isJSDocIndexSignature(node)) { return factory.createTypeLiteralNode([factory.createIndexSignature( @@ -51215,7 +51255,7 @@ /*initializer*/ void 0 )), - visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); } else { return factory.createFunctionTypeNode( @@ -51230,7 +51270,7 @@ /*initializer*/ void 0 )), - visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); } } @@ -51310,13 +51350,13 @@ function symbolTableToDeclarationStatements(symbolTable, context, bundled) { const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, - 171 /* MethodDeclaration */, + 172 /* MethodDeclaration */, /*useAcessors*/ true ); const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol( (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), - 170 /* MethodSignature */, + 171 /* MethodSignature */, /*useAcessors*/ false ); @@ -51775,10 +51815,10 @@ const baseTypes = getBaseTypes(interfaceType); const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0; const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType)); - const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 176 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 177 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 177 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 178 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); - const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(94 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; + const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(95 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( /*modifiers*/ void 0, @@ -51857,7 +51897,7 @@ function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 259 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 260 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); addResult(setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags); } if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) { @@ -51997,8 +52037,8 @@ const isClass = !!((_b = staticType.symbol) == null ? void 0 : _b.valueDeclaration) && isClassLike(staticType.symbol.valueDeclaration); const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType) : anyType; const heritageClauses = [ - ...!length(baseTypes) ? [] : [factory.createHeritageClause(94 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))], - ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(117 /* ImplementsKeyword */, implementsExpressions)] + ...!length(baseTypes) ? [] : [factory.createHeritageClause(95 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))], + ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(118 /* ImplementsKeyword */, implementsExpressions)] ]; const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType)); const publicSymbolProps = filter(symbolProps, (s) => { @@ -52041,7 +52081,7 @@ [], /*body*/ void 0 - )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 173 /* Constructor */); + )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 174 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -52093,8 +52133,8 @@ const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 205 /* BindingElement */: - if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 257 /* VariableDeclaration */) { + case 206 /* BindingElement */: + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 258 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -52120,15 +52160,15 @@ } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); break; - case 300 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 223 /* BinaryExpression */) { + case 301 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 224 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -52151,7 +52191,7 @@ ), modifierFlags); break; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) { serializeMaybeAliasAssignment(symbol); break; @@ -52172,10 +52212,10 @@ ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 270 /* ImportClause */: { + case 271 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52193,7 +52233,7 @@ ), 0 /* None */); break; } - case 271 /* NamespaceImport */: { + case 272 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52211,7 +52251,7 @@ ), 0 /* None */); break; } - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: addResult(factory.createExportDeclaration( /*modifiers*/ void 0, @@ -52221,7 +52261,7 @@ factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 273 /* ImportSpecifier */: { + case 274 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52246,7 +52286,7 @@ ), 0 /* None */); break; } - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -52254,12 +52294,12 @@ specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 223 /* BinaryExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 224 /* BinaryExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -52675,7 +52715,7 @@ return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker); function typePredicateToStringWorker(writer2) { const predicate = factory.createTypePredicateNode( - typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(129 /* AssertsKeyword */) : void 0, + typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(130 /* AssertsKeyword */) : void 0, typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createIdentifier(typePredicate.parameterName) : factory.createThisTypeNode(), typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */) // TODO: GH#18217 @@ -52738,10 +52778,10 @@ return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 265 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 266 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 308 /* SourceFile */ || isAmbientModule(location); + return location.kind === 309 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -52789,17 +52829,17 @@ if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 257 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 258 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 228 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 229 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -52816,66 +52856,66 @@ return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: - case 343 /* JSDocEnumTag */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 344 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 259 /* FunctionDeclaration */: - case 263 /* EnumDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + case 264 /* EnumDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 268 /* ImportEqualsDeclaration */ && parent2.kind !== 308 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 269 /* ImportEqualsDeclaration */ && parent2.kind !== 309 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 173 /* Constructor */: - case 177 /* ConstructSignature */: - case 176 /* CallSignature */: - case 178 /* IndexSignature */: - case 166 /* Parameter */: - case 265 /* ModuleBlock */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 184 /* TypeLiteral */: - case 180 /* TypeReference */: - case 185 /* ArrayType */: - case 186 /* TupleType */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: + case 174 /* Constructor */: + case 178 /* ConstructSignature */: + case 177 /* CallSignature */: + case 179 /* IndexSignature */: + case 167 /* Parameter */: + case 266 /* ModuleBlock */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 185 /* TypeLiteral */: + case 181 /* TypeReference */: + case 186 /* ArrayType */: + case 187 /* TupleType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: return false; - case 165 /* TypeParameter */: - case 308 /* SourceFile */: - case 267 /* NamespaceExportDeclaration */: + case 166 /* TypeParameter */: + case 309 /* SourceFile */: + case 268 /* NamespaceExportDeclaration */: return true; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return false; default: return false; @@ -52884,7 +52924,7 @@ } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 274 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 275 /* ExportAssignment */) { exportSymbol = resolveName( node, node.escapedText, @@ -52895,7 +52935,7 @@ /*isUse*/ false ); - } else if (node.parent.kind === 278 /* ExportSpecifier */) { + } else if (node.parent.kind === 279 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -52997,12 +53037,12 @@ function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 257 /* VariableDeclaration */: - case 258 /* VariableDeclarationList */: - case 273 /* ImportSpecifier */: - case 272 /* NamedImports */: - case 271 /* NamespaceImport */: - case 270 /* ImportClause */: + case 258 /* VariableDeclaration */: + case 259 /* VariableDeclarationList */: + case 274 /* ImportSpecifier */: + case 273 /* NamedImports */: + case 272 /* NamespaceImport */: + case 271 /* ImportClause */: return false; default: return true; @@ -53120,23 +53160,23 @@ function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return ancestor.initializer; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent2 = node.parent; - if (node.kind === 205 /* BindingElement */ && parent2.kind === 203 /* ObjectBindingPattern */) { + if (node.kind === 206 /* BindingElement */ && parent2.kind === 204 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 299 /* PropertyAssignment */ || node.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.kind === 300 /* PropertyAssignment */ || node.kind === 301 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent2.elements.indexOf(node); @@ -53161,7 +53201,7 @@ parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 203 /* ObjectBindingPattern */) { + if (pattern.kind === 204 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { @@ -53217,7 +53257,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 104 /* NullKeyword */ || expr.kind === 79 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; + return expr.kind === 105 /* NullKeyword */ || expr.kind === 79 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; } function isEmptyArrayLiteral2(node) { const expr = skipParentheses( @@ -53225,13 +53265,13 @@ /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 206 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 207 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, isProperty = false, isOptional = true) { return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type; } function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) { - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 246 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression( declaration.parent.parent.expression, /*checkMode*/ @@ -53239,7 +53279,7 @@ ))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -53268,8 +53308,8 @@ } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 175 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 174 /* GetAccessor */); + if (func.kind === 176 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 175 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -53343,7 +53383,7 @@ const links = getSymbolLinks(symbol); if (links.isConstructorDeclaredProperty === void 0) { links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 209 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 210 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( /*declaredType*/ void 0, declaration, @@ -53371,7 +53411,7 @@ /*includeClassComputedPropertyName*/ false ); - if (container && (container.kind === 173 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 174 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -53641,7 +53681,7 @@ return type; } function containsSameNamedThisProperty(thisProperty, expression) { - return isPropertyAccessExpression(thisProperty) && thisProperty.expression.kind === 108 /* ThisKeyword */ && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); + return isPropertyAccessExpression(thisProperty) && thisProperty.expression.kind === 109 /* ThisKeyword */ && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); } function isDeclarationInConstructor(expression) { const thisContainer = getThisContainer( @@ -53651,7 +53691,7 @@ /*includeClassComputedPropertyName*/ false ); - return thisContainer.kind === 173 /* Constructor */ || thisContainer.kind === 259 /* FunctionDeclaration */ || thisContainer.kind === 215 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 174 /* Constructor */ || thisContainer.kind === 260 /* FunctionDeclaration */ || thisContainer.kind === 216 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -53718,7 +53758,7 @@ function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 205 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 206 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -53734,7 +53774,7 @@ return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 203 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 204 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration( @@ -53775,7 +53815,7 @@ } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 166 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 167 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -53849,7 +53889,7 @@ return reportCircularityError(symbol); } let type; - if (declaration.kind === 274 /* ExportAssignment */) { + if (declaration.kind === 275 /* ExportAssignment */) { type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) { type = getWidenedTypeForAssignmentDeclaration(symbol); @@ -53890,13 +53930,13 @@ function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -53921,9 +53961,9 @@ if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 174 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 175 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 169 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 175 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 176 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration( accessor, /*includeOptionality*/ @@ -53962,7 +54002,7 @@ if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = (_a2 = getDeclarationOfKind(symbol, 175 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 169 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = (_a2 = getDeclarationOfKind(symbol, 176 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { @@ -54002,7 +54042,7 @@ const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 223 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 223 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 224 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 224 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -54066,7 +54106,7 @@ ); return errorType; } - if (noImplicitAny && (declaration.kind !== 166 /* Parameter */ || declaration.initializer)) { + if (noImplicitAny && (declaration.kind !== 167 /* Parameter */ || declaration.initializer)) { error( symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, @@ -54180,43 +54220,43 @@ return void 0; } switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 320 /* JSDocFunctionType */: - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 262 /* TypeAliasDeclaration */: - case 348 /* JSDocTemplateTag */: - case 349 /* JSDocTypedefTag */: - case 343 /* JSDocEnumTag */: - case 341 /* JSDocCallbackTag */: - case 197 /* MappedType */: - case 191 /* ConditionalType */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 321 /* JSDocFunctionType */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 263 /* TypeAliasDeclaration */: + case 349 /* JSDocTemplateTag */: + case 350 /* JSDocTypedefTag */: + case 344 /* JSDocEnumTag */: + case 342 /* JSDocCallbackTag */: + case 198 /* MappedType */: + case 192 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 197 /* MappedType */) { + if (node.kind === 198 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))); - } else if (node.kind === 191 /* ConditionalType */) { + } else if (node.kind === 192 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */ || node.kind === 261 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; + const thisType = includeThisTypes && (node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */ || node.kind === 262 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 323 /* JSDoc */: { + case 324 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -54226,14 +54266,14 @@ function getOuterTypeParametersOfClassOrInterface(symbol) { var _a2; const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a2 = symbol.declarations) == null ? void 0 : _a2.find((decl) => { - if (decl.kind === 261 /* InterfaceDeclaration */) { + if (decl.kind === 262 /* InterfaceDeclaration */) { return true; } - if (decl.kind !== 257 /* VariableDeclaration */) { + if (decl.kind !== 258 /* VariableDeclaration */) { return false; } const initializer = decl.initializer; - return !!initializer && (initializer.kind === 215 /* FunctionExpression */ || initializer.kind === 216 /* ArrowFunction */); + return !!initializer && (initializer.kind === 216 /* FunctionExpression */ || initializer.kind === 217 /* ArrowFunction */); }); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); @@ -54244,7 +54284,7 @@ } let result; for (const node of symbol.declarations) { - if (node.kind === 261 /* InterfaceDeclaration */ || node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 262 /* InterfaceDeclaration */ || node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -54382,7 +54422,7 @@ } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 260 /* ClassDeclaration */ || declaration.kind === 261 /* InterfaceDeclaration */) { + if (declaration.kind === 261 /* ClassDeclaration */ || declaration.kind === 262 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -54471,7 +54511,7 @@ type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 261 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 262 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -54499,7 +54539,7 @@ return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 261 /* InterfaceDeclaration */) { + if (declaration.kind === 262 /* InterfaceDeclaration */) { if (declaration.flags & 128 /* ContainsThis */) { return false; } @@ -54571,7 +54611,7 @@ } } else { type = errorType; - if (declaration.kind === 343 /* JSDocEnumTag */) { + if (declaration.kind === 344 /* JSDocEnumTag */) { error(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } else { error(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); @@ -54590,7 +54630,7 @@ const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 263 /* EnumDeclaration */) { + if (declaration.kind === 264 /* EnumDeclaration */) { for (const member of declaration.members) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); @@ -54671,22 +54711,22 @@ } function isThislessType(node) { switch (node.kind) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 149 /* ObjectKeyword */: - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: - case 198 /* LiteralType */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 150 /* ObjectKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: + case 199 /* LiteralType */: return true; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return isThislessType(node.elementType); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -54702,21 +54742,21 @@ function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 173 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 174 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); } function isThisless(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { const declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -54731,10 +54771,15 @@ return result; } function addInheritedMembers(symbols, baseSymbols) { - for (const s of baseSymbols) { - if (!symbols.has(s.escapedName) && !isStaticPrivateIdentifierProperty(s)) { - symbols.set(s.escapedName, s); + for (const base of baseSymbols) { + if (isStaticPrivateIdentifierProperty(base)) { + continue; } + const derived = symbols.get(base.escapedName); + if (!derived || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration) && !isConstructorDeclaredProperty(derived) && !getContainingClassStaticBlock(derived.valueDeclaration)) { + symbols.set(base.escapedName, base); + symbols.set(base.escapedName, base); + } } } function isStaticPrivateIdentifierProperty(s) { @@ -55675,7 +55720,7 @@ } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 195 /* TypeOperator */ && constraintDeclaration.operator === 141 /* KeyOfKeyword */; + return constraintDeclaration.kind === 196 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -56542,7 +56587,7 @@ } else { parameters.push(paramSymbol); } - if (type && type.kind === 198 /* LiteralType */) { + if (type && type.kind === 199 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -56550,8 +56595,8 @@ minArgumentCount = parameters.length; } } - if ((declaration.kind === 174 /* GetAccessor */ || declaration.kind === 175 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 174 /* GetAccessor */ ? 175 /* SetAccessor */ : 174 /* GetAccessor */; + if ((declaration.kind === 175 /* GetAccessor */ || declaration.kind === 176 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { + const otherKind = declaration.kind === 175 /* GetAccessor */ ? 176 /* SetAccessor */ : 175 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); @@ -56563,7 +56608,7 @@ thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, "this" /* This */), getTypeFromTypeNode(thisTag.typeExpression)); } } - const classType = declaration.kind === 173 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; + const classType = declaration.kind === 174 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { flags |= 1 /* HasRestParameter */; @@ -56641,15 +56686,15 @@ switch (node.kind) { case 79 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - return node.name.kind === 164 /* ComputedPropertyName */ && traverse(node.name); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + return node.name.kind === 165 /* ComputedPropertyName */ && traverse(node.name); + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return traverse(node.expression); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -56736,7 +56781,7 @@ function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 194 /* ThisType */ ? createTypePredicate( + return parameterName.kind === 195 /* ThisType */ ? createTypePredicate( node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, /*parameterName*/ void 0, @@ -56786,7 +56831,7 @@ return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 173 /* Constructor */) { + if (declaration.kind === 174 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } if (isJSDocSignature(declaration)) { @@ -56802,12 +56847,12 @@ if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 174 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 175 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 175 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 176 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -56910,7 +56955,7 @@ var _a2; if (!signature.isolatedSignatureType) { const kind = (_a2 = signature.declaration) == null ? void 0 : _a2.kind; - const isConstructor = kind === void 0 || kind === 173 /* Constructor */ || kind === 177 /* ConstructSignature */ || kind === 182 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 174 /* Constructor */ || kind === 178 /* ConstructSignature */ || kind === 183 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -56969,9 +57014,9 @@ let inferences; if ((_a2 = typeParameter.symbol) == null ? void 0 : _a2.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 192 /* InferType */) { + if (declaration.parent.kind === 193 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 180 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 181 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference); if (typeParameters) { @@ -56989,13 +57034,13 @@ } } } - } else if (grandParent.kind === 166 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 188 /* RestType */ || grandParent.kind === 199 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 167 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 189 /* RestType */ || grandParent.kind === 200 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 201 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 202 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 165 /* TypeParameter */ && grandParent.parent.kind === 197 /* MappedType */) { + } else if (grandParent.kind === 166 /* TypeParameter */ && grandParent.parent.kind === 198 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 197 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 191 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 197 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 198 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 192 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 198 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -57020,7 +57065,7 @@ } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 197 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 198 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -57029,7 +57074,7 @@ return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 165 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 166 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -57114,7 +57159,7 @@ return ((_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 180 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 185 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 181 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 186 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { @@ -57153,7 +57198,7 @@ return errorType; } } - if (node.kind === 180 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 181 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference( type, node, @@ -57244,9 +57289,9 @@ } function getTypeReferenceName(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -57258,10 +57303,10 @@ return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 163 /* QualifiedName */ ? name.right : name.kind === 208 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 164 /* QualifiedName */ ? name.right : name.kind === 209 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 163 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 208 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 164 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 209 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -57313,7 +57358,7 @@ const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 202 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 203 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -57341,7 +57386,7 @@ return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 186 /* TupleType */ && node.elements.length === 1; + return node.kind === 187 /* TupleType */ && node.elements.length === 1; } function getImpliedConstraint(type, checkNode, extendsNode) { return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0; @@ -57349,17 +57394,17 @@ function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 323 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 324 /* JSDoc */) { const parent2 = node.parent; - if (parent2.kind === 166 /* Parameter */) { + if (parent2.kind === 167 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 191 /* ConditionalType */ && node === parent2.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 192 /* ConditionalType */ && node === parent2.trueType) { const constraint = getImpliedConstraint(type, parent2.checkType, parent2.extendsType); if (constraint) { constraints = append(constraints, constraint); } - } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 197 /* MappedType */ && node === parent2.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 198 /* MappedType */ && node === parent2.type) { const mappedType = getTypeFromTypeNode(parent2); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -57376,7 +57421,7 @@ return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 180 /* TypeReference */ || node.kind === 202 /* ImportType */); + return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 181 /* TypeReference */ || node.kind === 203 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { @@ -57492,9 +57537,9 @@ if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: return declaration; } } @@ -57874,11 +57919,11 @@ } function getTupleElementFlags(node) { switch (node.kind) { - case 187 /* OptionalType */: + case 188 /* OptionalType */: return 2 /* Optional */; - case 188 /* RestType */: + case 189 /* RestType */: return getRestTypeElementFlags(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -57894,7 +57939,7 @@ return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 199 /* NamedTupleMember */); + const missingName = some(node.elements, (e) => e.kind !== 200 /* NamedTupleMember */); return getTupleTargetType( elementFlags, readonly, @@ -57903,51 +57948,51 @@ ); } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 185 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 186 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 186 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 187 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent2 = node.parent; switch (parent2.kind) { - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: - case 180 /* TypeReference */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 196 /* IndexedAccessType */: - case 191 /* ConditionalType */: - case 195 /* TypeOperator */: - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: + case 181 /* TypeReference */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 197 /* IndexedAccessType */: + case 192 /* ConditionalType */: + case 196 /* TypeOperator */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return isResolvedByTypeAlias(parent2); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return true; - case 195 /* TypeOperator */: - return node.operator !== 156 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 193 /* ParenthesizedType */: - case 187 /* OptionalType */: - case 199 /* NamedTupleMember */: - case 319 /* JSDocOptionalType */: - case 317 /* JSDocNullableType */: - case 318 /* JSDocNonNullableType */: - case 312 /* JSDocTypeExpression */: + case 196 /* TypeOperator */: + return node.operator !== 157 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); + case 194 /* ParenthesizedType */: + case 188 /* OptionalType */: + case 200 /* NamedTupleMember */: + case 320 /* JSDocOptionalType */: + case 318 /* JSDocNullableType */: + case 319 /* JSDocNonNullableType */: + case 313 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 188 /* RestType */: - return node.type.kind !== 185 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 189 /* RestType */: + return node.type.kind !== 186 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 190 /* UnionType */: + case 191 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -57958,22 +58003,22 @@ const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 186 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 186 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( + } else if (!(node.kind === 187 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 187 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( target, node, /*mapper*/ void 0 ); } else { - const elementTypes = node.kind === 185 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 186 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } return links.resolvedType; } function isReadonlyTypeOperator(node) { - return isTypeOperatorNode(node) && node.operator === 146 /* ReadonlyKeyword */; + return isTypeOperatorNode(node) && node.operator === 147 /* ReadonlyKeyword */; } function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations) { const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, (_) => 1 /* Required */), readonly, namedMemberDeclarations); @@ -58181,7 +58226,7 @@ return addTypesToUnion(typeSet, includes | (isNamedUnionType(type) ? 1048576 /* Union */ : 0), type.types); } if (!(flags & 131072 /* Never */)) { - includes |= flags & 205258751 /* IncludesMask */; + includes |= flags & 473694207 /* IncludesMask */; if (flags & 465829888 /* Instantiable */) includes |= 33554432 /* IncludesInstantiable */; if (type === wildcardType) @@ -58453,7 +58498,7 @@ typeSet.set(type.id.toString(), type); } } - includes |= flags & 205258751 /* IncludesMask */; + includes |= flags & 473694207 /* IncludesMask */; } return includes; } @@ -58656,12 +58701,15 @@ function getConstituentCountOfTypes(types) { return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0); } + function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) { + return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType; + } function getTypeFromIntersectionTypeNode(node) { const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); const types = map(node.types, getTypeFromTypeNode); - const noSupertypeReduction = types.length === 2 && !!(types[0].flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && types[1] === emptyTypeLiteralType; + const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0])); links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction); } return links.resolvedType; @@ -58723,7 +58771,7 @@ const typeVariable = getTypeParameterFromMappedType(mappedType); return isDistributive(getNameTypeFromMappedType(mappedType) || typeVariable); function isDistributive(type) { - return type.flags & (3 /* AnyOrUnknown */ | 134348796 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false; + return type.flags & (3 /* AnyOrUnknown */ | 402784252 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false; } } function getLiteralTypeFromPropertyName(name) { @@ -58792,13 +58840,13 @@ const links = getNodeLinks(node); if (!links.resolvedType) { switch (node.operator) { - case 141 /* KeyOfKeyword */: + case 142 /* KeyOfKeyword */: links.resolvedType = getIndexType(getTypeFromTypeNode(node.type)); break; - case 156 /* UniqueKeyword */: - links.resolvedType = node.type.kind === 153 /* SymbolKeyword */ ? getESSymbolLikeTypeForNode(walkUpParenthesizedTypes(node.parent)) : errorType; + case 157 /* UniqueKeyword */: + links.resolvedType = node.type.kind === 154 /* SymbolKeyword */ ? getESSymbolLikeTypeForNode(walkUpParenthesizedTypes(node.parent)) : errorType; break; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: links.resolvedType = getTypeFromTypeNode(node.type); break; default: @@ -58984,7 +59032,7 @@ } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { var _a2; - const accessExpression = accessNode && accessNode.kind === 209 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 210 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -59182,7 +59230,7 @@ } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 209 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 196 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 164 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 210 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 197 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 165 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); @@ -59319,7 +59367,7 @@ } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 196 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 197 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -59659,7 +59707,7 @@ } function getAliasSymbolForTypeNode(node) { let host2 = node.parent; - while (isParenthesizedTypeNode(host2) || isJSDocTypeExpression(host2) || isTypeOperatorNode(host2) && host2.operator === 146 /* ReadonlyKeyword */) { + while (isParenthesizedTypeNode(host2) || isJSDocTypeExpression(host2) || isTypeOperatorNode(host2) && host2.operator === 147 /* ReadonlyKeyword */) { host2 = host2.parent; } return isTypeAlias(host2) ? getSymbolOfDeclaration(host2) : void 0; @@ -59849,7 +59897,7 @@ return enumLiteralTypes.get(key) || (enumLiteralTypes.set(key, type = createLiteralType(flags, value, symbol)), type); } function getTypeFromLiteralTypeNode(node) { - if (node.literal.kind === 104 /* NullKeyword */) { + if (node.literal.kind === 105 /* NullKeyword */) { return nullType; } const links = getNodeLinks(node); @@ -59882,7 +59930,7 @@ false ); const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 261 /* InterfaceDeclaration */)) { + if (parent2 && (isClassLike(parent2) || parent2.kind === 262 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent2)).thisType; } @@ -59912,17 +59960,17 @@ } function getArrayElementTypeNode(node) { switch (node.kind) { - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 186 /* TupleType */: + case 187 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 188 /* RestType */ || node.kind === 199 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 189 /* RestType */ || node.kind === 200 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return node.elementType; } return void 0; @@ -59941,94 +59989,94 @@ } function getTypeFromTypeNodeWorker(node) { switch (node.kind) { - case 131 /* AnyKeyword */: - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: + case 132 /* AnyKeyword */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: return anyType; - case 157 /* UnknownKeyword */: + case 158 /* UnknownKeyword */: return unknownType; - case 152 /* StringKeyword */: + case 153 /* StringKeyword */: return stringType; - case 148 /* NumberKeyword */: + case 149 /* NumberKeyword */: return numberType; - case 160 /* BigIntKeyword */: + case 161 /* BigIntKeyword */: return bigintType; - case 134 /* BooleanKeyword */: + case 135 /* BooleanKeyword */: return booleanType; - case 153 /* SymbolKeyword */: + case 154 /* SymbolKeyword */: return esSymbolType; - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return voidType; - case 155 /* UndefinedKeyword */: + case 156 /* UndefinedKeyword */: return undefinedType; - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return nullType; - case 144 /* NeverKeyword */: + case 145 /* NeverKeyword */: return neverType; - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; - case 139 /* IntrinsicKeyword */: + case 140 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 194 /* ThisType */: - case 108 /* ThisKeyword */: + case 195 /* ThisType */: + case 109 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return getTypeFromTypeReference(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 187 /* OptionalType */: + case 188 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 189 /* UnionType */: + case 190 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 193 /* ParenthesizedType */: - case 318 /* JSDocNonNullableType */: - case 312 /* JSDocTypeExpression */: + case 194 /* ParenthesizedType */: + case 319 /* JSDocNonNullableType */: + case 313 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 188 /* RestType */: + case 189 /* RestType */: return getTypeFromRestTypeNode(node); - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 192 /* InferType */: + case 193 /* InferType */: return getTypeFromInferTypeNode(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return getTypeFromImportTypeNode(node); case 79 /* Identifier */: - case 163 /* QualifiedName */: - case 208 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -60233,13 +60281,13 @@ return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 180 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 202 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 181 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 203 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); } function isTypeParameterPossiblyReferenced(tp, node) { if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { const container = tp.symbol.declarations[0].parent; for (let n = node; n !== container; n = n.parent) { - if (!n || n.kind === 238 /* Block */ || n.kind === 191 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 239 /* Block */ || n.kind === 192 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -60248,17 +60296,17 @@ return true; function containsReference(node2) { switch (node2.kind) { - case 194 /* ThisType */: + case 195 /* ThisType */: return !!tp.isThisType; case 79 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; let tpScope; - if (tpDeclaration.kind === 165 /* TypeParameter */) { + if (tpDeclaration.kind === 166 /* TypeParameter */) { tpScope = tpDeclaration.parent; } else if (tp.isThisType) { tpScope = tpDeclaration; @@ -60269,8 +60317,8 @@ return some(firstIdentifierSymbol.declarations, (idDecl) => isNodeDescendantOf(idDecl, tpScope)) || some(node2.typeArguments, containsReference); } return true; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -60506,13 +60554,13 @@ return type; } function getUniqueLiteralFilledInstantiation(type) { - return type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper)); + return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper)); } function getPermissiveInstantiation(type) { - return type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper)); + return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper)); } function getRestrictiveInstantiation(type) { - if (type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */)) { + if (type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */)) { return type; } if (type.restrictiveInstantiation) { @@ -60526,32 +60574,32 @@ return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return (node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 288 /* JsxAttribute */: { + case 289 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 291 /* JsxExpression */: { + case 292 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -60562,7 +60610,7 @@ return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node); } function hasContextSensitiveReturnExpression(node) { - return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 238 /* Block */ && isContextSensitive(node.body); + return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 239 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func); @@ -60654,23 +60702,23 @@ return true; } switch (node.kind) { - case 291 /* JsxExpression */: - case 214 /* ParenthesizedExpression */: + case 292 /* JsxExpression */: + case 215 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 27 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -60970,16 +61018,16 @@ } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return { errorNode: child, innerExpression: child.expression, nameType }; case 11 /* JsxText */: if (child.containsOnlyTriviaWhiteSpaces) { break; } return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() }; - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -61095,7 +61143,7 @@ } } function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (target.flags & (134348796 /* Primitive */ | 131072 /* Never */)) + if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) return false; if (isTupleLikeType(source)) { return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); @@ -61129,13 +61177,13 @@ continue; } switch (prop.kind) { - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: - case 171 /* MethodDeclaration */: - case 300 /* ShorthandPropertyAssignment */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: + case 172 /* MethodDeclaration */: + case 301 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; break; default: @@ -61144,7 +61192,7 @@ } } function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (target.flags & (134348796 /* Primitive */ | 131072 /* Never */)) + if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) return false; return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer); } @@ -61207,7 +61255,7 @@ void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 171 /* MethodDeclaration */ && kind !== 170 /* MethodSignature */ && kind !== 173 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 172 /* MethodDeclaration */ && kind !== 171 /* MethodSignature */ && kind !== 174 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -61801,7 +61849,7 @@ return isRelatedTo(source2, target2, 3 /* Both */, reportErrors2); } function isRelatedTo(originalSource, originalTarget, recursionFlags = 3 /* Both */, reportErrors2 = false, headMessage2, intersectionState = 0 /* None */) { - if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 134348796 /* Primitive */) { + if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 402784252 /* Primitive */) { if (relation === comparableRelation && !(originalTarget.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(originalTarget, originalSource, relation) || isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors2 ? reportError : void 0)) { return -1 /* True */; } @@ -61865,7 +61913,7 @@ return 0 /* False */; } } - const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (134348796 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2)); + const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (402784252 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2)); const isComparingJsxAttributes = !!(getObjectFlags(source2) & 2048 /* JsxAttributes */); if (isPerformingCommonPropertyChecks && !hasCommonProperties(source2, target2, isComparingJsxAttributes)) { if (reportErrors2) { @@ -61927,7 +61975,7 @@ maybeSuppress = !!errorInfo; } } - if (source2.flags & 524288 /* Object */ && target2.flags & 134348796 /* Primitive */) { + if (source2.flags & 524288 /* Object */ && target2.flags & 402784252 /* Primitive */) { tryElaborateErrorsForPrimitivesAndObjects(source2, target2); } else if (source2.symbol && source2.flags & 524288 /* Object */ && globalObjectType === source2) { reportError(Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead); @@ -62034,8 +62082,8 @@ if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, (d) => d === objectLiteralDeclaration) && getSourceFileOfNode(objectLiteralDeclaration) === getSourceFileOfNode(errorNode)) { const propDeclaration = prop.valueDeclaration; Debug.assertNode(propDeclaration, isObjectLiteralElementLike); - errorNode = propDeclaration; const name = propDeclaration.name; + errorNode = name; if (isIdentifier(name)) { suggestion = getSuggestionForNonexistentProperty(name, errorTarget); } @@ -62073,15 +62121,15 @@ } function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) { if (source2.flags & 1048576 /* Union */) { - return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */), intersectionState); + return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState); } if (target2.flags & 1048576 /* Union */) { - return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source2), target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */) && !(target2.flags & 134348796 /* Primitive */)); + return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source2), target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */) && !(target2.flags & 402784252 /* Primitive */)); } if (target2.flags & 2097152 /* Intersection */) { return typeRelatedToEachType(source2, target2, reportErrors2, 2 /* Target */); } - if (relation === comparableRelation && target2.flags & 134348796 /* Primitive */) { + if (relation === comparableRelation && target2.flags & 402784252 /* Primitive */) { const constraints = sameMap(source2.types, (t) => t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(t) || unknownType : t); if (constraints !== source2.types) { source2 = getIntersectionType(constraints); @@ -62975,7 +63023,7 @@ } return 0 /* False */; } - const sourceIsPrimitive = !!(sourceFlags & 134348796 /* Primitive */); + const sourceIsPrimitive = !!(sourceFlags & 402784252 /* Primitive */); if (relation !== identityRelation) { source2 = getApparentType(source2); sourceFlags = source2.flags; @@ -63567,7 +63615,7 @@ const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 173 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 173 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 174 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 174 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString( signature, /*enclosingDeclaration*/ @@ -64267,7 +64315,7 @@ const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 208 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 209 /* PropertyAccessExpression */) { return void 0; } } @@ -64667,12 +64715,12 @@ } let diagnostic; switch (declaration.kind) { - case 223 /* BinaryExpression */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 224 /* BinaryExpression */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 166 /* Parameter */: + case 167 /* Parameter */: const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); @@ -64693,27 +64741,27 @@ } diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 326 /* JSDocSignature */: + case 327 /* JSDocSignature */: if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) { error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); } return; - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (noImplicitAny && !declaration.name) { if (wideningKind === 3 /* GeneratorYield */) { error(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); @@ -64724,7 +64772,7 @@ } diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; - case 197 /* MappedType */: + case 198 /* MappedType */: if (noImplicitAny) { error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } @@ -64822,7 +64870,7 @@ function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 171 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); + const contextualType = node.kind === 172 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -64874,8 +64922,8 @@ } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 262 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 308 /* SourceFile */ ? true : n.kind === 264 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 263 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 309 /* SourceFile */ ? true : n.kind === 265 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -65690,7 +65738,7 @@ function inferFromSignature(source, target) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 173 /* Constructor */; + bivariant = bivariant || kind === 172 /* MethodDeclaration */ || kind === 171 /* MethodSignature */ || kind === 174 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; applyToReturnTypes(source, target, inferFromTypes); @@ -65733,7 +65781,7 @@ } function hasPrimitiveConstraint(type) { const constraint = getConstraintOfTypeParameter(type); - return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 134348796 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); + return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); } function isObjectLiteralType2(type) { return !!(getObjectFlags(type) & 128 /* ObjectLiteral */); @@ -65847,7 +65895,7 @@ return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 301 /* ShorthandPropertyAssignment */) { return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer; } else { return Diagnostics.Cannot_find_name_0; @@ -65873,7 +65921,7 @@ function isInTypeQuery(node) { return !!findAncestor( node, - (n) => n.kind === 183 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 163 /* QualifiedName */ ? false : "quit" + (n) => n.kind === 184 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 164 /* QualifiedName */ ? false : "quit" ); } function isInAmbientOrTypeNode(node) { @@ -65886,61 +65934,61 @@ const symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? `${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}|${getSymbolId(symbol)}` : void 0; } - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 233 /* MetaProperty */: - return target.kind === 233 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 234 /* MetaProperty */: + return target.kind === 234 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - return isThisInTypeQuery(source) ? target.kind === 108 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); - case 108 /* ThisKeyword */: - return target.kind === 108 /* ThisKeyword */; - case 106 /* SuperKeyword */: - return target.kind === 106 /* SuperKeyword */; - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: + return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); + case 109 /* ThisKeyword */: + return target.kind === 109 /* ThisKeyword */; + case 107 /* SuperKeyword */: + return target.kind === 107 /* SuperKeyword */; + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const sourcePropertyName = getAccessedPropertyName(source); const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0; return sourcePropertyName !== void 0 && targetPropertyName !== void 0 && targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -66095,7 +66143,7 @@ } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 299 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 300 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -66110,7 +66158,7 @@ } } } - if (expression.expression.kind === 208 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 209 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -66215,7 +66263,7 @@ return 83886079 /* UnknownFacts */; } function getIntersectionTypeFacts(type) { - const ignoreObjects = maybeTypeOfKind(type, 134348796 /* Primitive */); + const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */); let oredFacts = 0 /* None */; let andedFacts = 134217727 /* All */; for (const t of type.types) { @@ -66283,11 +66331,11 @@ ) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 206 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 299 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 207 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 300 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 223 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 247 /* ForOfStatement */ && parent2.parent.initializer === parent2; + return parent2.parent.kind === 224 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 248 /* ForOfStatement */ && parent2.parent.initializer === parent2; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -66304,21 +66352,21 @@ function getAssignedType(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return stringType; - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return checkRightHandSideOfForOf(parent2) || errorType; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent2); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return undefinedType; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent2); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent2); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent2); } return errorType; @@ -66326,7 +66374,7 @@ function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 203 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 204 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); return getTypeWithDefault(type, node.initializer); } function getTypeOfInitializer(node) { @@ -66337,25 +66385,25 @@ if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 246 /* ForInStatement */) { + if (node.parent.parent.kind === 247 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 247 /* ForOfStatement */) { + if (node.parent.parent.kind === 248 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 257 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 258 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 257 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 205 /* BindingElement */ && node.parent.kind === 223 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 258 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 206 /* BindingElement */ && node.parent.kind === 224 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 75 /* BarBarEqualsToken */: @@ -66370,10 +66418,10 @@ } function getReferenceRoot(node) { const { parent: parent2 } = node; - return parent2.kind === 214 /* ParenthesizedExpression */ || parent2.kind === 223 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 223 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; + return parent2.kind === 215 /* ParenthesizedExpression */ || parent2.kind === 224 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 224 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -66389,12 +66437,12 @@ return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 292 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 293 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 292 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 293 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -66552,8 +66600,8 @@ function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 210 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 209 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 223 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 63 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); + const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 211 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isElementAssignment = parent2.kind === 210 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 224 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 63 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); return isLengthPushOrUnshift || isElementAssignment; } function isDeclarationWithExplicitTypeAnnotation(node) { @@ -66576,7 +66624,7 @@ if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName( statement.expression, @@ -66606,11 +66654,11 @@ case 79 /* Identifier */: const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node)); return getExplicitTypeOfSymbol(symbol, diagnostic); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return getExplicitThisType(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 208 /* PropertyAccessExpression */: { + case 209 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -66627,7 +66675,7 @@ } return void 0; } - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -66637,13 +66685,13 @@ let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 241 /* ExpressionStatement */) { + if (node.parent.kind === 242 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ void 0 ); - } else if (node.expression.kind !== 106 /* SuperKeyword */) { + } else if (node.expression.kind !== 107 /* SuperKeyword */) { if (isOptionalChain(node)) { funcType = checkNonNullType( getOptionalExpressionType(checkExpression(node.expression), node.expression), @@ -66691,7 +66739,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 95 /* FalseKeyword */ || node.kind === 223 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + return node.kind === 96 /* FalseKeyword */ || node.kind === 224 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { @@ -66780,7 +66828,7 @@ if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 128 /* SwitchClause */)) { flow = flow.antecedent; } else if (flags & 512 /* Call */) { - if (flow.node.expression.kind === 106 /* SuperKeyword */) { + if (flow.node.expression.kind === 107 /* SuperKeyword */) { return true; } flow = flow.antecedent; @@ -66816,8 +66864,8 @@ return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } break; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -66837,7 +66885,7 @@ const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode)); sharedFlowCount = sharedFlowStart; const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType); - if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 232 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 233 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -66906,7 +66954,7 @@ target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 208 /* PropertyAccessExpression */ && reference.kind !== 209 /* ElementAccessExpression */ && reference.kind !== 108 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 209 /* PropertyAccessExpression */ && reference.kind !== 210 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { flow = container.flowNode; continue; } @@ -66925,7 +66973,7 @@ } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -66955,13 +67003,13 @@ } if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 215 /* FunctionExpression */ || init.kind === 216 /* ArrowFunction */)) { + if (init && (init.kind === 216 /* FunctionExpression */ || init.kind === 217 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 246 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 247 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -66972,10 +67020,10 @@ /*excludeJSDocTypeAssertions*/ true ); - if (node.kind === 95 /* FalseKeyword */) { + if (node.kind === 96 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 223 /* BinaryExpression */) { + if (node.kind === 224 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -67015,13 +67063,13 @@ function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 210 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 211 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { const flowType = getTypeAtFlowNode(flow.antecedent); const type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { let evolvedType2 = type; - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -67058,7 +67106,7 @@ let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 218 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 219 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -67070,7 +67118,7 @@ flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 218 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 219 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -67333,10 +67381,10 @@ const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 218 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 219 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 218 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 219 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -67367,9 +67415,9 @@ return narrowTypeByConstructor(type, operator, left, assumeTrue); } break; - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return narrowTypeByInstanceof(type, expr, assumeTrue); - case 101 /* InKeyword */: + case 102 /* InKeyword */: if (isPrivateIdentifier(expr.left)) { return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue); } @@ -67478,7 +67526,7 @@ } if (assumeTrue) { if (!doubleEquals && (type.flags & 2 /* Unknown */ || someType(type, isEmptyAnonymousObjectType))) { - if (valueType.flags & (134348796 /* Primitive */ | 67108864 /* NonPrimitive */) || isEmptyAnonymousObjectType(valueType)) { + if (valueType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) || isEmptyAnonymousObjectType(valueType)) { return valueType; } if (valueType.flags & 524288 /* Object */) { @@ -67528,7 +67576,7 @@ let groundClauseTypes; for (let i = 0; i < clauseTypes.length; i += 1) { const t = clauseTypes[i]; - if (t.flags & (134348796 /* Primitive */ | 67108864 /* NonPrimitive */)) { + if (t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) { if (groundClauseTypes !== void 0) { groundClauseTypes.push(t); } @@ -67595,7 +67643,7 @@ if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 293 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 294 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -67770,19 +67818,19 @@ } } } - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: if (expr.operator === 53 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -67820,7 +67868,7 @@ return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 266 /* ModuleBlock */ || node2.kind === 309 /* SourceFile */ || node2.kind === 170 /* PropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -67871,12 +67919,12 @@ return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 166 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 167 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { const parent2 = node.parent; - return parent2.kind === 208 /* PropertyAccessExpression */ || parent2.kind === 163 /* QualifiedName */ || parent2.kind === 210 /* CallExpression */ && parent2.expression === node || parent2.kind === 209 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); + return parent2.kind === 209 /* PropertyAccessExpression */ || parent2.kind === 164 /* QualifiedName */ || parent2.kind === 211 /* CallExpression */ && parent2.expression === node || parent2.kind === 210 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); } function isGenericTypeWithUnionConstraint(type) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */)); @@ -67937,14 +67985,14 @@ if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent2 = declaration.parent.parent; - if (parent2.kind === 257 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 166 /* Parameter */) { + if (parent2.kind === 258 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 167 /* Parameter */) { const links = getNodeLinks(parent2); if (!(links.flags & 16777216 /* InCheckIdentifier */)) { links.flags |= 16777216 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); links.flags &= ~16777216 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 166 /* Parameter */ && isSymbolAssigned(symbol))) { + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 167 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference( pattern, @@ -68001,7 +68049,7 @@ } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 216 /* ArrowFunction */) { + if (container.kind === 217 /* ArrowFunction */) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (hasSyntacticModifier(container, 512 /* Async */)) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); @@ -68020,7 +68068,7 @@ } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 260 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { + if (declaration.kind === 261 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { let container = getContainingClass(node); while (container !== void 0) { if (container === declaration && container.name !== node) { @@ -68030,7 +68078,7 @@ } container = getContainingClass(container); } - } else if (declaration.kind === 228 /* ClassExpression */) { + } else if (declaration.kind === 229 /* ClassExpression */) { let container = getThisContainer( node, /*includeArrowFunctions*/ @@ -68038,7 +68086,7 @@ /*includeClassComputedPropertyName*/ false ); - while (container.kind !== 308 /* SourceFile */) { + while (container.kind !== 309 /* SourceFile */) { if (container.parent === declaration) { if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; @@ -68088,16 +68136,16 @@ return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 167 /* Parameter */; const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); const isModuleExports = symbol.flags & 134217728 /* ModuleExports */; - while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + while (flowContainer !== declarationContainer && (flowContainer.kind === 216 /* FunctionExpression */ || flowContainer.kind === 217 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } - const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; + const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 279 /* ExportSpecifier */) || node.parent.kind === 233 /* NonNullExpression */ || declaration.kind === 258 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type); const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer); if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) { @@ -68151,7 +68199,7 @@ )); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 295 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 296 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -68161,7 +68209,7 @@ if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 259 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -68180,7 +68228,7 @@ } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 259 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */; } @@ -68197,13 +68245,13 @@ } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 214 /* ParenthesizedExpression */) { + while (current.parent.kind === 215 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 221 /* PrefixUnaryExpression */ || current.parent.kind === 222 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 222 /* PrefixUnaryExpression */ || current.parent.kind === 223 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; } @@ -68214,7 +68262,7 @@ } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 169 /* PropertyDeclaration */ || container.kind === 173 /* Constructor */) { + if (container.kind === 170 /* PropertyDeclaration */ || container.kind === 174 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -68259,11 +68307,11 @@ ); let capturedByArrowFunction = false; let thisInComputedPropertyName = false; - if (container.kind === 173 /* Constructor */) { + if (container.kind === 174 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } while (true) { - if (container.kind === 216 /* ArrowFunction */) { + if (container.kind === 217 /* ArrowFunction */) { container = getThisContainer( container, /* includeArrowFunctions */ @@ -68272,7 +68320,7 @@ ); capturedByArrowFunction = true; } - if (container.kind === 164 /* ComputedPropertyName */) { + if (container.kind === 165 /* ComputedPropertyName */) { container = getThisContainer( container, !capturedByArrowFunction, @@ -68289,13 +68337,13 @@ error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); } else { switch (container.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 173 /* Constructor */: + case 174 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } @@ -68389,13 +68437,13 @@ } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 215 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 216 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 171 /* MethodDeclaration */ && container.parent.kind === 207 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 172 /* MethodDeclaration */ && container.parent.kind === 208 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 215 /* FunctionExpression */ && container.parent.kind === 299 /* PropertyAssignment */ && container.parent.parent.kind === 207 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 216 /* FunctionExpression */ && container.parent.kind === 300 /* PropertyAssignment */ && container.parent.parent.kind === 208 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 215 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { + } else if (container.kind === 216 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.parent.arguments[0].expression; } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.arguments[0].expression; @@ -68403,7 +68451,7 @@ } function getTypeForThisExpressionFromJSDoc(node) { const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 320 /* JSDocFunctionType */) { + if (jsdocType && jsdocType.kind === 321 /* JSDocFunctionType */) { const jsDocFunctionType = jsdocType; if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].name && jsDocFunctionType.parameters[0].name.escapedText === "this" /* This */) { return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); @@ -68415,10 +68463,10 @@ } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 166 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 167 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 210 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 211 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer( node, /*stopOnFunctions*/ @@ -68428,7 +68476,7 @@ let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 216 /* ArrowFunction */) { + while (container && container.kind === 217 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer( @@ -68443,19 +68491,19 @@ } let nodeCheckFlag = 0; if (!container || !isLegalUsageOfSuperExpression(container)) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 164 /* ComputedPropertyName */); - if (current && current.kind === 164 /* ComputedPropertyName */) { + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 165 /* ComputedPropertyName */); + if (current && current.kind === 165 /* ComputedPropertyName */) { error(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression2) { error(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 207 /* ObjectLiteralExpression */)) { + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 208 /* ObjectLiteralExpression */)) { error(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { error(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); } return errorType; } - if (!isCallExpression2 && immediateContainer.kind === 173 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 174 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if (isStatic(container) || isCallExpression2) { @@ -68471,7 +68519,7 @@ nodeCheckFlag = 16 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 171 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 172 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -68481,7 +68529,7 @@ if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 207 /* ObjectLiteralExpression */) { + if (container.parent.kind === 208 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { error(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return errorType; @@ -68499,20 +68547,20 @@ if (!baseClassType) { return errorType; } - if (container.kind === 173 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 174 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType); function isLegalUsageOfSuperExpression(container2) { if (isCallExpression2) { - return container2.kind === 173 /* Constructor */; + return container2.kind === 174 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 207 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 208 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 171 /* MethodDeclaration */ || container2.kind === 170 /* MethodSignature */ || container2.kind === 174 /* GetAccessor */ || container2.kind === 175 /* SetAccessor */ || container2.kind === 169 /* PropertyDeclaration */ || container2.kind === 172 /* ClassStaticBlockDeclaration */; + return container2.kind === 172 /* MethodDeclaration */ || container2.kind === 171 /* MethodSignature */ || container2.kind === 175 /* GetAccessor */ || container2.kind === 176 /* SetAccessor */ || container2.kind === 170 /* PropertyDeclaration */ || container2.kind === 173 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 171 /* MethodDeclaration */ || container2.kind === 170 /* MethodSignature */ || container2.kind === 174 /* GetAccessor */ || container2.kind === 175 /* SetAccessor */ || container2.kind === 169 /* PropertyDeclaration */ || container2.kind === 168 /* PropertySignature */ || container2.kind === 173 /* Constructor */; + return container2.kind === 172 /* MethodDeclaration */ || container2.kind === 171 /* MethodSignature */ || container2.kind === 175 /* GetAccessor */ || container2.kind === 176 /* SetAccessor */ || container2.kind === 170 /* PropertyDeclaration */ || container2.kind === 169 /* PropertySignature */ || container2.kind === 174 /* Constructor */; } } } @@ -68520,7 +68568,7 @@ } } function getContainingObjectLiteral(func) { - return (func.kind === 171 /* MethodDeclaration */ || func.kind === 174 /* GetAccessor */ || func.kind === 175 /* SetAccessor */) && func.parent.kind === 207 /* ObjectLiteralExpression */ ? func.parent : func.kind === 215 /* FunctionExpression */ && func.parent.kind === 299 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 172 /* MethodDeclaration */ || func.kind === 175 /* GetAccessor */ || func.kind === 176 /* SetAccessor */) && func.parent.kind === 208 /* ObjectLiteralExpression */ ? func.parent : func.kind === 216 /* FunctionExpression */ && func.parent.kind === 300 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -68531,7 +68579,7 @@ }); } function getContextualThisParameterType(func) { - if (func.kind === 216 /* ArrowFunction */) { + if (func.kind === 217 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -68559,7 +68607,7 @@ if (thisType) { return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } - if (literal.parent.kind !== 299 /* PropertyAssignment */) { + if (literal.parent.kind !== 300 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -68572,7 +68620,7 @@ return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 223 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 224 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -68627,11 +68675,11 @@ return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 166 /* Parameter */: + case 167 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -68640,10 +68688,10 @@ function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 205 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 206 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent2.name.kind === 204 /* ArrayBindingPattern */) { + if (parent2.name.kind === 205 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -68793,7 +68841,7 @@ return signature ? getOrCreateTypeFromSignature(signature) : void 0; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 212 /* TaggedTemplateExpression */) { + if (template.parent.kind === 213 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -69122,16 +69170,16 @@ case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: case 79 /* Identifier */: - case 155 /* UndefinedKeyword */: + case 156 /* UndefinedKeyword */: return true; - case 208 /* PropertyAccessExpression */: - case 214 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 215 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -69141,7 +69189,7 @@ contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 299 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 300 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -69161,7 +69209,7 @@ contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 288 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 289 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -69229,47 +69277,47 @@ } const { parent: parent2 } = node; switch (parent2.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 206 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 216 /* ArrowFunction */: - case 250 /* ReturnStatement */: + case 217 /* ArrowFunction */: + case 251 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return getContextualTypeForYieldOperand(parent2, contextFlags); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return getContextualTypeForArgument(parent2, node); - case 167 /* Decorator */: + case 168 /* Decorator */: return getContextualTypeForDecorator(parent2); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return isConstTypeReference(parent2.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(parent2.type); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return getContextualType2(parent2.parent, contextFlags); - case 206 /* ArrayLiteralExpression */: { + case 207 /* ArrayLiteralExpression */: { const arrayLiteral = parent2; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); const spreadIndex = (_b = (_a2 = getNodeLinks(arrayLiteral)).firstSpreadIndex) != null ? _b : _a2.firstSpreadIndex = findIndex(arrayLiteral.elements, isSpreadElement); const elementIndex = indexOfNode(arrayLiteral.elements, node); return getContextualTypeForElementExpression(type, spreadIndex < 0 || elementIndex < spreadIndex ? elementIndex : -1); } - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 236 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 225 /* TemplateExpression */); + case 237 /* TemplateSpan */: + Debug.assert(parent2.parent.kind === 226 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 214 /* ParenthesizedExpression */: { + case 215 /* ParenthesizedExpression */: { if (isInJSFile(parent2)) { if (isJSDocSatisfiesExpression(parent2)) { return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2)); @@ -69281,19 +69329,19 @@ } return getContextualType2(parent2, contextFlags); } - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return getContextualType2(parent2, contextFlags); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return getTypeFromTypeNode(parent2.type); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent2); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return getContextualTypeForJsxExpression(parent2, contextFlags); - case 288 /* JsxAttribute */: - case 290 /* JsxSpreadAttribute */: + case 289 /* JsxAttribute */: + case 291 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent2, contextFlags); } return void 0; @@ -69561,7 +69609,7 @@ return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -69612,7 +69660,7 @@ return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 205 /* BindingElement */ && !!node.initializer || node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; + return node.kind === 206 /* BindingElement */ && !!node.initializer || node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -69631,7 +69679,7 @@ let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 227 /* SpreadElement */) { + if (e.kind === 228 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -69655,7 +69703,7 @@ elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 229 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 230 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(undefinedOrMissingType); elementFlags.push(2 /* Optional */); @@ -69702,7 +69750,7 @@ } function isNumericName(name) { switch (name.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return isNumericComputedName(name); case 79 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -69719,7 +69767,7 @@ function checkComputedPropertyName(node) { const links = getNodeLinks(node.expression); if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 101 /* InKeyword */ && node.parent.kind !== 174 /* GetAccessor */ && node.parent.kind !== 175 /* SetAccessor */) { + if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 102 /* InKeyword */ && node.parent.kind !== 175 /* GetAccessor */ && node.parent.kind !== 176 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -69788,7 +69836,7 @@ /*contextFlags*/ void 0 ); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 203 /* ObjectBindingPattern */ || contextualType.pattern.kind === 207 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 204 /* ObjectBindingPattern */ || contextualType.pattern.kind === 208 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -69807,13 +69855,13 @@ let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfDeclaration(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 164 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 299 /* PropertyAssignment */ || memberDecl.kind === 300 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 299 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( + const computedNameType = memberDecl.name && memberDecl.name.kind === 165 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 300 /* PropertyAssignment */ || memberDecl.kind === 301 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 300 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. // we don't want to say "could not find 'a'". - memberDecl.kind === 300 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) + memberDecl.kind === 301 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) ); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); @@ -69831,7 +69879,7 @@ prop.links.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 299 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 300 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 300 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 301 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -69857,13 +69905,13 @@ prop.links.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 299 /* PropertyAssignment */ || memberDecl.kind === 171 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 300 /* PropertyAssignment */ || memberDecl.kind === 172 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 299 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 300 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } - } else if (memberDecl.kind === 301 /* SpreadAssignment */) { + } else if (memberDecl.kind === 302 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -69892,7 +69940,7 @@ } continue; } else { - Debug.assert(memberDecl.kind === 174 /* GetAccessor */ || memberDecl.kind === 175 /* SetAccessor */); + Debug.assert(memberDecl.kind === 175 /* GetAccessor */ || memberDecl.kind === 176 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -69917,13 +69965,13 @@ if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 257 /* VariableDeclaration */ || n.kind === 223 /* BinaryExpression */ || n.kind === 166 /* Parameter */ + (n) => n.kind === 258 /* VariableDeclaration */ || n.kind === 224 /* BinaryExpression */ || n.kind === 167 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 301 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 302 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 301 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 302 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { @@ -70052,7 +70100,7 @@ } } } else { - Debug.assert(attributeDecl.kind === 290 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 291 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType( spread, @@ -70098,7 +70146,7 @@ ); } } - const parent2 = openingLikeElement.parent.kind === 281 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent2 = openingLikeElement.parent.kind === 282 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { @@ -70157,7 +70205,7 @@ if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 291 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 292 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -70509,7 +70557,7 @@ } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 163 /* QualifiedName */ ? node.right : node.kind === 202 /* ImportType */ ? node : node.kind === 205 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 164 /* QualifiedName */ ? node.right : node.kind === 203 /* ImportType */ ? node : node.kind === 206 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -70644,7 +70692,7 @@ } function reportObjectPossiblyNullOrUndefinedError(node, facts) { const nodeText2 = isEntityNameExpression(node) ? entityNameToString(node) : void 0; - if (node.kind === 104 /* NullKeyword */) { + if (node.kind === 105 /* NullKeyword */) { error(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); return; } @@ -70712,8 +70760,8 @@ } return nonNullType; } - function checkPropertyAccessExpression(node, checkMode) { - return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode); + function checkPropertyAccessExpression(node, checkMode, writeOnly) { + return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); } function checkPropertyAccessChain(node, checkMode) { const leftType = checkExpression(node.expression); @@ -70725,7 +70773,7 @@ return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 214 /* ParenthesizedExpression */) { + while (node.parent.kind === 215 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; @@ -70748,7 +70796,7 @@ if (!isExpressionNode(privId)) { return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression); } - const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 101 /* InKeyword */; + const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 102 /* InKeyword */; if (!getSymbolForPrivateIdentifierExpression(privId) && !isInOperation) { return grammarErrorOnNode(privId, Diagnostics.Cannot_find_name_0, idText(privId)); } @@ -70844,7 +70892,7 @@ false ) === getDeclaringConstructor(prop); } - function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode) { + function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode, writeOnly) { const parentSymbol = getNodeLinks(left).resolvedSymbol; const assignmentKind = getAssignmentTargetKind(node); const apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); @@ -70894,10 +70942,10 @@ /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ - node.kind === 163 /* QualifiedName */ + node.kind === 164 /* QualifiedName */ ); } - if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 302 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 303 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -70943,13 +70991,12 @@ checkPropertyNotUsedBeforeDeclaration(prop, node, right); markPropertyAsReferenced(prop, node, isSelfTypeAccess(left, parentSymbol)); getNodeLinks(node).resolvedSymbol = prop; - const writing = isWriteAccess(node); - checkPropertyAccessibility(node, left.kind === 106 /* SuperKeyword */, writing, apparentType, prop); + checkPropertyAccessibility(node, left.kind === 107 /* SuperKeyword */, isWriteAccess(node), apparentType, prop); if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) { error(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); return errorType; } - propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writing ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); + propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writeOnly || isWriteOnlyAccess(node) ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); } return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode); } @@ -70958,7 +71005,7 @@ if (file) { if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) { const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode); - return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */); + return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */); } } return false; @@ -70976,12 +71023,12 @@ } propType = getNarrowableTypeForReference(propType, node, checkMode); let assumeUninitialized = false; - if (strictNullChecks && strictPropertyInitialization && isAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */) { + if (strictNullChecks && strictPropertyInitialization && isAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */) { const declaration = prop && prop.valueDeclaration; if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 173 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 174 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { assumeUninitialized = true; } } @@ -71005,7 +71052,7 @@ const declarationName = idText(right); if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlags(valueDeclaration) & 32 /* Static */) && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); - } else if (valueDeclaration.kind === 260 /* ClassDeclaration */ && node.parent.kind !== 180 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + } else if (valueDeclaration.kind === 261 /* ClassDeclaration */ && node.parent.kind !== 181 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { @@ -71018,25 +71065,25 @@ function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return true; - case 299 /* PropertyAssignment */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 301 /* SpreadAssignment */: - case 164 /* ComputedPropertyName */: - case 236 /* TemplateSpan */: - case 291 /* JsxExpression */: - case 288 /* JsxAttribute */: - case 289 /* JsxAttributes */: - case 290 /* JsxSpreadAttribute */: - case 283 /* JsxOpeningElement */: - case 230 /* ExpressionWithTypeArguments */: - case 294 /* HeritageClause */: + case 300 /* PropertyAssignment */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 302 /* SpreadAssignment */: + case 165 /* ComputedPropertyName */: + case 237 /* TemplateSpan */: + case 292 /* JsxExpression */: + case 289 /* JsxAttribute */: + case 290 /* JsxAttributes */: + case 291 /* JsxSpreadAttribute */: + case 284 /* JsxOpeningElement */: + case 231 /* ExpressionWithTypeArguments */: + case 295 /* HeritageClause */: return false; - case 216 /* ArrowFunction */: - case 241 /* ExpressionStatement */: + case 217 /* ArrowFunction */: + case 242 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -71069,7 +71116,7 @@ function reportNonexistentProperty(propNode, containingType, isUncheckedJS) { let errorInfo; let relatedInfo; - if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 134348796 /* Primitive */)) { + if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) { for (const subtype of containingType.types) { if (!getPropertyOfType(subtype, propNode.escapedText) && !getApplicableIndexInfoForName(subtype, propNode.escapedText)) { errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(subtype)); @@ -71277,13 +71324,13 @@ (getCheckFlags(prop) & 1 /* Instantiated */ ? getSymbolLinks(prop).target : prop).isReferenced = 67108863 /* All */; } function isSelfTypeAccess(name, parent2) { - return name.kind === 108 /* ThisKeyword */ || !!parent2 && isEntityNameExpression(name) && parent2 === getResolvedSymbol(getFirstIdentifier(name)); + return name.kind === 109 /* ThisKeyword */ || !!parent2 && isEntityNameExpression(name) && parent2 === getResolvedSymbol(getFirstIdentifier(name)); } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: - return isValidPropertyAccessWithType(node, node.expression.kind === 106 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + return isValidPropertyAccessWithType(node, node.expression.kind === 107 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); + case 164 /* QualifiedName */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -71291,7 +71338,7 @@ propertyName, getWidenedType(checkExpression(node.left)) ); - case 202 /* ImportType */: + case 203 /* ImportType */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -71304,7 +71351,7 @@ function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 208 /* PropertyAccessExpression */ && node.expression.kind === 106 /* SuperKeyword */, + node.kind === 209 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, /* isWrite */ false, type, @@ -71337,7 +71384,7 @@ } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 258 /* VariableDeclarationList */) { + if (initializer.kind === 259 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfDeclaration(variable); @@ -71358,7 +71405,7 @@ let child = expr; let node = expr.parent; while (node) { - if (node.kind === 246 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 247 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -71399,11 +71446,11 @@ if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 167 /* Decorator */) { + } else if (node.kind !== 168 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -71448,7 +71495,7 @@ } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 227 /* SpreadElement */ || arg.kind === 234 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 228 /* SpreadElement */ || arg.kind === 235 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -71464,9 +71511,9 @@ let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 225 /* TemplateExpression */) { + if (node.template.kind === 226 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -71474,7 +71521,7 @@ Debug.assert(templateLiteral.kind === 14 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 167 /* Decorator */) { + } else if (node.kind === 168 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -71485,7 +71532,7 @@ effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 211 /* NewExpression */); + Debug.assert(node.kind === 212 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -71581,7 +71628,7 @@ if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 167 /* Decorator */) { + if (node.kind !== 168 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -71618,7 +71665,7 @@ } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 229 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 230 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -71646,11 +71693,11 @@ if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); + const spreadType = arg.kind === 235 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); if (isArrayLikeType(spreadType)) { return getMutableArrayOrTupleType(spreadType); } - return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg), inConstContext); + return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 228 /* SpreadElement */ ? arg.expression : arg), inConstContext); } } const types = []; @@ -71659,22 +71706,22 @@ for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 235 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 228 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { const contextualType = getIndexedAccessType(restType, getNumberLiteralType(i - index), 256 /* Contextual */); const argType = checkExpressionWithContextualType(arg, contextualType, context, checkMode); - const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 134348796 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); + const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 234 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 235 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -71851,7 +71898,7 @@ const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 229 /* OmittedExpression */) { + if (arg.kind !== 230 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType( arg, @@ -71909,7 +71956,7 @@ } } function getThisArgumentOfCall(node) { - const expression = node.kind === 210 /* CallExpression */ ? node.expression : node.kind === 212 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 211 /* CallExpression */ ? node.expression : node.kind === 213 /* TaggedTemplateExpression */ ? node.tag : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -71924,17 +71971,17 @@ return result; } function getEffectiveCallArguments(node) { - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 225 /* TemplateExpression */) { + if (template.kind === 226 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 167 /* Decorator */) { + if (node.kind === 168 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -71946,7 +71993,7 @@ const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 227 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 228 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getTypeArguments(spreadType), (t, i2) => { var _a2; @@ -71985,16 +72032,16 @@ } function getLegacyDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return 1; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 166 /* Parameter */: + case 167 /* Parameter */: return 3; default: return Debug.fail(); @@ -72201,14 +72248,14 @@ return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) { - const isTaggedTemplate = node.kind === 212 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 167 /* Decorator */; + const isTaggedTemplate = node.kind === 213 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 168 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; if (!isDecorator2 && !isSuperCall(node)) { typeArguments = node.typeArguments; - if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 106 /* SuperKeyword */) { + if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 107 /* SuperKeyword */) { forEach(typeArguments, checkSourceElement); } } @@ -72228,7 +72275,7 @@ let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 210 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 211 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -72579,7 +72626,7 @@ return maxParamsIndex; } function resolveCallExpression(node, candidatesOutArray, checkMode) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { const superType = checkSuperExpression(node.expression); if (isTypeAny(superType)) { for (const arg of node.arguments) { @@ -72756,7 +72803,7 @@ } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 173 /* Constructor */) { + if (!modifiers || declaration.kind !== 174 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -72903,16 +72950,16 @@ } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 166 /* Parameter */: + case 167 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; default: return Debug.fail(); @@ -72974,7 +73021,7 @@ returnNode, /*typeArguments*/ void 0 - ) : factory.createKeywordTypeNode(131 /* AnyKeyword */) + ) : factory.createKeywordTypeNode(132 /* AnyKeyword */) ); const parameterSymbol = createSymbol(1 /* FunctionScopedVariable */, "props"); parameterSymbol.links.type = result; @@ -73035,16 +73082,16 @@ } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 167 /* Decorator */: + case 168 /* Decorator */: return resolveDecorator(node, candidatesOutArray, checkMode); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } throw Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); @@ -73154,7 +73201,7 @@ return false; } let parent2 = node.parent; - while (parent2 && parent2.kind === 208 /* PropertyAccessExpression */) { + while (parent2 && parent2.kind === 209 /* PropertyAccessExpression */) { parent2 = parent2.parent; } if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 63 /* EqualsToken */) { @@ -73175,12 +73222,12 @@ return silentNeverType; } checkDeprecatedSignature(signature, node); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return voidType; } - if (node.kind === 211 /* NewExpression */) { + if (node.kind === 212 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 173 /* Constructor */ && declaration.kind !== 177 /* ConstructSignature */ && declaration.kind !== 182 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a2 = getJSDocRoot(declaration)) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 173 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 174 /* Constructor */ && declaration.kind !== 178 /* ConstructSignature */ && declaration.kind !== 183 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a2 = getJSDocRoot(declaration)) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 174 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -73194,7 +73241,7 @@ if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 210 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 241 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 211 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 242 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { if (!isDottedName(node.expression)) { error(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); } else if (!getEffectsSignature(node)) { @@ -73226,20 +73273,20 @@ function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 210 /* CallExpression */: - case 167 /* Decorator */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 168 /* Decorator */: + case 212 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return node.argumentExpression; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.name; - case 180 /* TypeReference */: + case 181 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -73399,7 +73446,7 @@ if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 259 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 257 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 260 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 258 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); return !!decl && !!(decl.flags & 16777216 /* Ambient */); @@ -73417,7 +73464,7 @@ return getReturnTypeOfSignature(signature); } function checkAssertion(node) { - if (node.kind === 213 /* TypeAssertionExpression */) { + if (node.kind === 214 /* TypeAssertionExpression */) { const file = getSourceFileOfNode(node); if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) { grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); @@ -73431,20 +73478,20 @@ case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 225 /* TemplateExpression */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 226 /* TemplateExpression */: return true; - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const op = node.operator; const arg = node.operand; return op === 40 /* MinusToken */ && (arg.kind === 8 /* NumericLiteral */ || arg.kind === 9 /* BigIntLiteral */) || op === 39 /* PlusToken */ && arg.kind === 8 /* NumericLiteral */; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = skipParentheses(node.expression); const symbol = isEntityNameExpression(expr) ? resolveEntityName( expr, @@ -73493,7 +73540,7 @@ function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); forEach(node.typeArguments, checkSourceElement); - const exprType = node.kind === 230 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 231 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); return getInstantiationExpressionType(exprType, node); } function getInstantiationExpressionType(exprType, node) { @@ -73575,19 +73622,19 @@ } function checkMetaProperty(node) { checkGrammarMetaProperty(node); - if (node.keywordToken === 103 /* NewKeyword */) { + if (node.keywordToken === 104 /* NewKeyword */) { return checkNewTargetMetaProperty(node); } - if (node.keywordToken === 100 /* ImportKeyword */) { + if (node.keywordToken === 101 /* ImportKeyword */) { return checkImportMetaProperty(node); } return Debug.assertNever(node.keywordToken); } function checkMetaPropertyKeyword(node) { switch (node.keywordToken) { - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return getGlobalImportMetaExpressionType(); - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: const type = checkNewTargetMetaProperty(node); return isErrorType(type) ? errorType : createNewTargetExpressionType(type); default: @@ -73599,7 +73646,7 @@ if (!container) { error(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return errorType; - } else if (container.kind === 173 /* Constructor */) { + } else if (container.kind === 174 /* Constructor */) { const symbol = getSymbolOfDeclaration(container.parent); return getTypeOfSymbol(symbol); } else { @@ -73649,7 +73696,7 @@ } function getParameterIdentifierNameAtPosition(signature, pos) { var _a2; - if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 320 /* JSDocFunctionType */) { + if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 321 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -73681,7 +73728,7 @@ return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); } function isValidDeclarationForTupleLabel(d) { - return d.kind === 199 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 200 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -74017,17 +74064,17 @@ if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const contextType = createClassDecoratorContextType(targetType); links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType); break; } - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74039,7 +74086,7 @@ links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); break; } - case 169 /* PropertyDeclaration */: { + case 170 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74061,8 +74108,8 @@ if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const targetParam = createParameter("target", targetType); @@ -74076,7 +74123,7 @@ ); break; } - case 166 /* Parameter */: { + case 167 /* Parameter */: { const node = parent2; if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { break; @@ -74102,10 +74149,10 @@ ); break; } - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: { + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74200,7 +74247,7 @@ let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 238 /* Block */) { + if (func.body.kind !== 239 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType( @@ -74374,7 +74421,7 @@ return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 218 /* TypeOfExpression */) { + if (node.expression.kind === 219 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -74435,11 +74482,11 @@ } function mayReturnNever(func) { switch (func.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; - case 171 /* MethodDeclaration */: - return func.parent.kind === 207 /* ObjectLiteralExpression */; + case 172 /* MethodDeclaration */: + return func.parent.kind === 208 /* ObjectLiteralExpression */; default: return false; } @@ -74453,7 +74500,7 @@ if (type && maybeTypeOfKind(type, 1 /* Any */ | 16384 /* Void */)) { return; } - if (func.kind === 170 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 238 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 171 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 239 /* Block */ || !functionHasImplicitReturn(func)) { return; } const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; @@ -74479,7 +74526,7 @@ } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -74512,7 +74559,7 @@ return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 215 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 216 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -74556,7 +74603,7 @@ } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -74564,7 +74611,7 @@ if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 238 /* Block */) { + if (node.body.kind === 239 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -74634,9 +74681,9 @@ return false; } if (isReadonlySymbol(symbol)) { - if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 108 /* ThisKeyword */) { + if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 109 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 173 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 174 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -74657,7 +74704,7 @@ const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 271 /* NamespaceImport */; + return !!declaration && declaration.kind === 272 /* NamespaceImport */; } } } @@ -74762,7 +74809,7 @@ if (!hasParseDiagnostics(sourceFile)) { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); - if (container && container.kind !== 173 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + if (container && container.kind !== 174 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } @@ -74920,7 +74967,7 @@ if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } - if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 134348796 /* Primitive */)) { + if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { error(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { @@ -74971,7 +75018,7 @@ function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 299 /* PropertyAssignment */ || property.kind === 300 /* ShorthandPropertyAssignment */) { + if (property.kind === 300 /* PropertyAssignment */ || property.kind === 301 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -74992,8 +75039,8 @@ } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 300 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 301 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 301 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 302 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { @@ -75025,7 +75072,7 @@ let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 227 /* SpreadElement */) { + if (node.elements[i].kind === 228 /* SpreadElement */) { type = inBoundsType = inBoundsType != null ? inBoundsType : checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType; } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -75035,8 +75082,8 @@ function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 229 /* OmittedExpression */) { - if (element.kind !== 227 /* SpreadElement */) { + if (element.kind !== 230 /* OmittedExpression */) { + if (element.kind !== 228 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -75051,7 +75098,7 @@ error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 223 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { + if (restExpression.kind === 224 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { error(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); } else { checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); @@ -75064,7 +75111,7 @@ } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 300 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 301 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -75076,25 +75123,25 @@ } else { target = exprOrAssignment; } - if (target.kind === 223 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { + if (target.kind === 224 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 207 /* ObjectLiteralExpression */) { + if (target.kind === 208 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 206 /* ArrayLiteralExpression */) { + if (target.kind === 207 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { const targetType = checkExpression(target, checkMode); - const error2 = target.parent.kind === 301 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; - const optionalError = target.parent.kind === 301 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + const error2 = target.parent.kind === 302 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; + const optionalError = target.parent.kind === 302 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; if (checkReferenceExpression(target, error2, optionalError)) { checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target); } @@ -75109,34 +75156,34 @@ case 79 /* Identifier */: case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: - case 212 /* TaggedTemplateExpression */: - case 225 /* TemplateExpression */: + case 213 /* TaggedTemplateExpression */: + case 226 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: - case 155 /* UndefinedKeyword */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 218 /* TypeOfExpression */: - case 232 /* NonNullExpression */: - case 282 /* JsxSelfClosingElement */: - case 281 /* JsxElement */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 156 /* UndefinedKeyword */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 219 /* TypeOfExpression */: + case 233 /* NonNullExpression */: + case 283 /* JsxSelfClosingElement */: + case 282 /* JsxElement */: return true; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: switch (node.operator) { case 53 /* ExclamationToken */: case 39 /* PlusToken */: @@ -75145,9 +75192,9 @@ return true; } return false; - case 219 /* VoidExpression */: - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 220 /* VoidExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: default: return false; } @@ -75191,9 +75238,9 @@ } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (node.left.kind === 207 /* ObjectLiteralExpression */ || node.left.kind === 206 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (node.left.kind === 208 /* ObjectLiteralExpression */ || node.left.kind === 207 /* ArrayLiteralExpression */)) { state.skip = true; - setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 108 /* ThisKeyword */)); + setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 109 /* ThisKeyword */)); return state; } return state; @@ -75216,7 +75263,7 @@ const operator = operatorToken.kind; if (isLogicalOrCoalescingBinaryOperator(operator)) { let parent2 = node.parent; - while (parent2.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { + while (parent2.kind === 215 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { parent2 = parent2.parent; } if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) { @@ -75292,8 +75339,8 @@ } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (left.kind === 207 /* ObjectLiteralExpression */ || left.kind === 206 /* ArrayLiteralExpression */)) { - return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */); + if (operator === 63 /* EqualsToken */ && (left.kind === 208 /* ObjectLiteralExpression */ || left.kind === 207 /* ArrayLiteralExpression */)) { + return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 109 /* ThisKeyword */); } let leftType; if (isLogicalOrCoalescingBinaryOperator(operator)) { @@ -75468,9 +75515,9 @@ checkNaNEquality(errorNode, operator, left, right); reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); return booleanType; - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return checkInExpression(left, right, leftType, rightType); case 55 /* AmpersandAmpersandToken */: case 76 /* AmpersandAmpersandEqualsToken */: { @@ -75552,7 +75599,7 @@ } } function isIndirectCall(node) { - return node.parent.kind === 214 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 212 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + return node.parent.kind === 215 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 213 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval"); } function checkForDisallowedESSymbolOperand(operator2) { @@ -75583,6 +75630,16 @@ addLazyDiagnostic(checkAssignmentOperatorWorker); } function checkAssignmentOperatorWorker() { + let assigneeType = leftType; + if (isCompoundAssignment(operatorToken.kind) && left.kind === 209 /* PropertyAccessExpression */) { + assigneeType = checkPropertyAccessExpression( + left, + /*checkMode*/ + void 0, + /*writeOnly*/ + true + ); + } if (checkReferenceExpression( left, Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, @@ -75595,7 +75652,7 @@ headMessage = Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target; } } - checkTypeAssignableToAndOptionallyElaborate(valueType, leftType, left, right, headMessage); + checkTypeAssignableToAndOptionallyElaborate(valueType, assigneeType, left, right, headMessage); } } } @@ -75672,7 +75729,7 @@ const err = error( errorNode2, Diagnostics.This_condition_will_always_return_0, - tokenToString(operator2 === 36 /* EqualsEqualsEqualsToken */ || operator2 === 34 /* EqualsEqualsToken */ ? 95 /* FalseKeyword */ : 110 /* TrueKeyword */) + tokenToString(operator2 === 36 /* EqualsEqualsEqualsToken */ || operator2 === 34 /* EqualsEqualsToken */ ? 96 /* FalseKeyword */ : 111 /* TrueKeyword */) ); if (isLeftNaN && isRightNaN) return; @@ -75847,7 +75904,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 213 /* TypeAssertionExpression */ || node.kind === 231 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 214 /* TypeAssertionExpression */ || node.kind === 232 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); @@ -75864,7 +75921,7 @@ void 0, checkMode || 0 /* Normal */ ) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 204 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 205 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; } function padTupleType(type, pattern) { const patternElements = pattern.elements; @@ -75872,7 +75929,7 @@ const elementFlags = type.target.elementFlags.slice(); for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) { const e = patternElements[i]; - if (i < patternElements.length - 1 || !(e.kind === 205 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 206 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement( e, /*includePatternInType*/ @@ -75937,14 +75994,14 @@ )); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -76132,7 +76189,7 @@ const type = getQuickTypeOfExpression(expr.expression); return type ? getAwaitedType(type) : void 0; } - if (isCallExpression(expr) && expr.expression.kind !== 106 /* SuperKeyword */ && !isRequireCall( + if (isCallExpression(expr) && expr.expression.kind !== 107 /* SuperKeyword */ && !isRequireCall( expr, /*checkArgumentIsStringLiteralLike*/ true @@ -76176,7 +76233,7 @@ return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 209 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 163 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 183 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 278 /* ExportSpecifier */; + const ok = node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 210 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 164 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 184 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 279 /* ExportSpecifier */; if (!ok) { error(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -76204,9 +76261,9 @@ const kind = node.kind; if (cancellationToken) { switch (kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -76215,15 +76272,15 @@ return checkIdentifier(node, checkMode); case 80 /* PrivateIdentifier */: return checkPrivateIdentifierExpression(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return checkThisExpression(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return nullWideningType; case 14 /* NoSubstitutionTemplateLiteral */: case 10 /* StringLiteral */: - return getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? anyType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 8 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -76233,85 +76290,85 @@ negative: false, base10Value: parsePseudoBigInt(node.text) })); - case 110 /* TrueKeyword */: + case 111 /* TrueKeyword */: return trueType; - case 95 /* FalseKeyword */: + case 96 /* FalseKeyword */: return falseType; - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return checkTemplateExpression(node); case 13 /* RegularExpressionLiteral */: return globalRegExpType; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 210 /* CallExpression */: - if (node.expression.kind === 100 /* ImportKeyword */) { + case 211 /* CallExpression */: + if (node.expression.kind === 101 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 211 /* NewExpression */: + case 212 /* NewExpression */: return checkCallExpression(node, checkMode); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return checkClassExpression(node); - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return checkAssertion(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return checkNonNullAssertion(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return checkMetaProperty(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return checkDeleteExpression(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return checkVoidExpression(node); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return checkAwaitExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 229 /* OmittedExpression */: + case 230 /* OmittedExpression */: return undefinedWideningType; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return checkYieldExpression(node); - case 234 /* SyntheticExpression */: + case 235 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return checkJsxElement(node, checkMode); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return checkJsxFragment(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -76363,10 +76420,10 @@ checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 173 /* Constructor */ && nodeIsPresent(func.body))) { + if (!(func.kind === 174 /* Constructor */ && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 173 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 174 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } @@ -76377,13 +76434,13 @@ if (func.parameters.indexOf(node) !== 0) { error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 173 /* Constructor */ || func.kind === 177 /* ConstructSignature */ || func.kind === 182 /* ConstructorType */) { + if (func.kind === 174 /* Constructor */ || func.kind === 178 /* ConstructSignature */ || func.kind === 183 /* ConstructorType */) { error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 216 /* ArrowFunction */) { + if (func.kind === 217 /* ArrowFunction */) { error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 174 /* GetAccessor */ || func.kind === 175 /* SetAccessor */) { + if (func.kind === 175 /* GetAccessor */ || func.kind === 176 /* SetAccessor */) { error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } @@ -76443,13 +76500,13 @@ } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 216 /* ArrowFunction */: - case 176 /* CallSignature */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 217 /* ArrowFunction */: + case 177 /* CallSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: const parent2 = node.parent; if (node === parent2.type) { return parent2; @@ -76469,7 +76526,7 @@ predicateVariableName ); return true; - } else if (name.kind === 204 /* ArrayBindingPattern */ || name.kind === 203 /* ObjectBindingPattern */) { + } else if (name.kind === 205 /* ArrayBindingPattern */ || name.kind === 204 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -76481,9 +76538,9 @@ } } function checkSignatureDeclaration(node) { - if (node.kind === 178 /* IndexSignature */) { + if (node.kind === 179 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 181 /* FunctionType */ || node.kind === 259 /* FunctionDeclaration */ || node.kind === 182 /* ConstructorType */ || node.kind === 176 /* CallSignature */ || node.kind === 173 /* Constructor */ || node.kind === 177 /* ConstructSignature */) { + } else if (node.kind === 182 /* FunctionType */ || node.kind === 260 /* FunctionDeclaration */ || node.kind === 183 /* ConstructorType */ || node.kind === 177 /* CallSignature */ || node.kind === 174 /* Constructor */ || node.kind === 178 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -76510,10 +76567,10 @@ const returnTypeNode = getEffectiveReturnTypeNode(node); if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -76535,7 +76592,7 @@ checkAsyncFunctionReturnType(node, returnTypeNode); } } - if (node.kind !== 178 /* IndexSignature */ && node.kind !== 320 /* JSDocFunctionType */) { + if (node.kind !== 179 /* IndexSignature */ && node.kind !== 321 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -76545,7 +76602,7 @@ const staticNames = /* @__PURE__ */ new Map(); const privateIdentifiers = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 173 /* Constructor */) { + if (member.kind === 174 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -76563,16 +76620,16 @@ const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -76625,7 +76682,7 @@ function checkObjectTypeForDuplicateDeclarations(node) { const names = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 168 /* PropertySignature */) { + if (member.kind === 169 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -76649,7 +76706,7 @@ } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 261 /* InterfaceDeclaration */) { + if (node.kind === 262 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfDeclaration(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -76684,7 +76741,7 @@ checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 169 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 170 /* PropertyDeclaration */ && node.initializer) { error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } @@ -76701,7 +76758,7 @@ error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* MethodDeclaration */ && node.body) { error(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { @@ -76746,7 +76803,7 @@ if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 169 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 170 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -76789,7 +76846,7 @@ return isExpressionStatement(superCallParent) && superCallParent.parent === body; } function nodeImmediatelyReferencesSuperOrThis(node) { - if (node.kind === 106 /* SuperKeyword */ || node.kind === 108 /* ThisKeyword */) { + if (node.kind === 107 /* SuperKeyword */ || node.kind === 109 /* ThisKeyword */) { return true; } if (isThisContainerOrFunctionBlock(node)) { @@ -76798,7 +76855,7 @@ return !!forEachChild(node, nodeImmediatelyReferencesSuperOrThis); } function checkAccessorDeclaration(node) { - if (isIdentifier(node.name) && idText(node.name) === "constructor") { + if (isIdentifier(node.name) && idText(node.name) === "constructor" && isClassLike(node.parent)) { error(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); } addLazyDiagnostic(checkAccessorDeclarationDiagnostics); @@ -76809,20 +76866,20 @@ checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { if (!(node.flags & 16777216 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 256 /* HasImplicitReturn */) { if (!(node.flags & 512 /* HasExplicitReturn */)) { error(node.name, Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfDeclaration(node); - const getter = getDeclarationOfKind(symbol, 174 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 175 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 175 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 176 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); @@ -76843,7 +76900,7 @@ } } const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node)); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -76904,7 +76961,7 @@ } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 180 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { + if (node.kind === 181 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { const sourceFile = getSourceFileOfNode(node); if (scanTokenAtPosition(sourceFile, node.typeName.end) === 24 /* DotToken */) { grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); @@ -76968,7 +77025,7 @@ let seenRestElement = false; const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 199 /* NamedTupleMember */ && hasNamedElement) { + if (e.kind !== 200 /* NamedTupleMember */ && hasNamedElement) { grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); break; } @@ -77017,7 +77074,7 @@ /*stringsOnly*/ false ))) { - if (accessNode.kind === 209 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + if (accessNode.kind === 210 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } return type; @@ -77078,7 +77135,7 @@ forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 191 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 192 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -77088,7 +77145,7 @@ if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 165 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 166 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { @@ -77126,10 +77183,10 @@ if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 187 /* OptionalType */) { + if (node.type.kind === 188 /* OptionalType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type); } - if (node.type.kind === 188 /* RestType */) { + if (node.type.kind === 189 /* RestType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type); } checkSourceElement(node.type); @@ -77140,7 +77197,7 @@ } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 261 /* InterfaceDeclaration */ && n.parent.kind !== 260 /* ClassDeclaration */ && n.parent.kind !== 228 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { + if (n.parent.kind !== 262 /* InterfaceDeclaration */ && n.parent.kind !== 261 /* ClassDeclaration */ && n.parent.kind !== 229 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } @@ -77217,7 +77274,7 @@ // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) || // Both are literal property names that are the same. isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); if (reportError) { const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; error(errorNode2, diagnostic); @@ -77249,14 +77306,14 @@ for (const current of declarations) { const node = current; const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 261 /* InterfaceDeclaration */ || node.parent.kind === 184 /* TypeLiteral */) || inAmbientContext; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 262 /* InterfaceDeclaration */ || node.parent.kind === 185 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 259 /* FunctionDeclaration */ || node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */ || node.kind === 173 /* Constructor */) { + if (node.kind === 260 /* FunctionDeclaration */ || node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */ || node.kind === 174 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -77309,9 +77366,9 @@ }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 260 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 261 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 260 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 259 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 261 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 260 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; if (diagnostic) { addRelatedInfo( error(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), @@ -77391,45 +77448,45 @@ function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return 2 /* ExportType */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 274 /* ExportAssignment */: - case 223 /* BinaryExpression */: + case 275 /* ExportAssignment */: + case 224 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 268 /* ImportEqualsDeclaration */: - case 271 /* NamespaceImport */: - case 270 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 272 /* NamespaceImport */: + case 271 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfDeclaration(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: - case 259 /* FunctionDeclaration */: - case 273 /* ImportSpecifier */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 260 /* FunctionDeclaration */: + case 274 /* ImportSpecifier */: case 79 /* Identifier */: return 1 /* ExportValue */; - case 170 /* MethodSignature */: - case 168 /* PropertySignature */: + case 171 /* MethodSignature */: + case 169 /* PropertySignature */: return 2 /* ExportType */; default: return Debug.failBadSyntaxKind(d); @@ -77454,7 +77511,7 @@ ))) { return typeAsPromise.promisedTypeOfPromise = getTypeArguments(type)[0]; } - if (allTypesAssignableToKind(getBaseConstraintOrType(type), 134348796 /* Primitive */ | 131072 /* Never */)) { + if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) { return void 0; } const thenFunction = getTypeOfPropertyOfType(type, "then"); @@ -77506,7 +77563,7 @@ return awaitedType || errorType; } function isThenableType(type) { - if (allTypesAssignableToKind(getBaseConstraintOrType(type), 134348796 /* Primitive */ | 131072 /* Never */)) { + if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) { return false; } const thenFunction = getTypeOfPropertyOfType(type, "then"); @@ -77716,21 +77773,21 @@ let headMessage; const expectedReturnType = decoratorSignature.resolvedReturnType; switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!legacyDecorators) { headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; } - case 166 /* Parameter */: + case 167 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; default: @@ -77743,7 +77800,7 @@ /*typeParameters*/ void 0, emptyArray, - factory.createKeywordTypeNode(131 /* AnyKeyword */) + factory.createKeywordTypeNode(132 /* AnyKeyword */) ); return createSignature(decl, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, flags); } @@ -77820,15 +77877,15 @@ function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 190 /* IntersectionType */: - case 189 /* UnionType */: + case 191 /* IntersectionType */: + case 190 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; } } @@ -77836,13 +77893,13 @@ function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 193 /* ParenthesizedType */ || typeNode.kind === 199 /* NamedTupleMember */) { + while (typeNode.kind === 194 /* ParenthesizedType */ || typeNode.kind === 200 /* NamedTupleMember */) { typeNode = typeNode.type; } - if (typeNode.kind === 144 /* NeverKeyword */) { + if (typeNode.kind === 145 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 198 /* LiteralType */ && typeNode.literal.kind === 104 /* NullKeyword */ || typeNode.kind === 155 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 199 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 156 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -77873,7 +77930,7 @@ } if (legacyDecorators) { checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 166 /* Parameter */) { + if (node.kind === 167 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } } else if (languageVersion < 99 /* ESNext */) { @@ -77899,7 +77956,7 @@ if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -77907,22 +77964,22 @@ } } break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - const otherKind = node.kind === 174 /* GetAccessor */ ? 175 /* SetAccessor */ : 174 /* GetAccessor */; + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + const otherKind = node.kind === 175 /* GetAccessor */ ? 176 /* SetAccessor */ : 175 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 166 /* Parameter */: + case 167 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { @@ -78037,7 +78094,7 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -78048,7 +78105,7 @@ checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -78065,7 +78122,7 @@ checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 170 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 171 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); @@ -78101,42 +78158,42 @@ function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 308 /* SourceFile */: - case 264 /* ModuleDeclaration */: - case 238 /* Block */: - case 266 /* CaseBlock */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 309 /* SourceFile */: + case 265 /* ModuleDeclaration */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 173 /* Constructor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 192 /* InferType */: + case 193 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -78155,11 +78212,11 @@ function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 171 /* MethodDeclaration */: - case 169 /* PropertyDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - if (member.kind === 175 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 172 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + if (member.kind === 176 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfDeclaration(member); @@ -78167,16 +78224,16 @@ addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 173 /* Constructor */: + case 174 /* Constructor */: for (const parameter of member.parameters) { if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } break; - case 178 /* IndexSignature */: - case 237 /* SemicolonClassElement */: - case 172 /* ClassStaticBlockDeclaration */: + case 179 /* IndexSignature */: + case 238 /* SemicolonClassElement */: + case 173 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -78200,7 +78257,7 @@ continue; const name = idText(typeParameter.name); const { parent: parent2 } = typeParameter; - if (parent2.kind !== 192 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { + if (parent2.kind !== 193 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { const sourceFile = getSourceFileOfNode(parent2); const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); @@ -78280,7 +78337,7 @@ }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 271 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 272 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); } else { @@ -78291,7 +78348,7 @@ unusedDestructures.forEach(([bindingPattern, bindingElements]) => { const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */; if (bindingPattern.elements.length === bindingElements.length) { - if (bindingElements.length === 1 && bindingPattern.parent.kind === 257 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 258 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 258 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 259 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); @@ -78304,7 +78361,7 @@ }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 240 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 241 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -78333,21 +78390,21 @@ switch (name.kind) { case 79 /* Identifier */: return idText(name); - case 204 /* ArrayBindingPattern */: - case 203 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 270 /* ImportClause */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 271 /* NamespaceImport */; + return node.kind === 271 /* ImportClause */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 272 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 270 /* ImportClause */ ? decl : decl.kind === 271 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 271 /* ImportClause */ ? decl : decl.kind === 272 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 238 /* Block */) { + if (node.kind === 239 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -78375,7 +78432,7 @@ if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 168 /* PropertySignature */ || node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */ || node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */ || node.kind === 299 /* PropertyAssignment */) { + if (node.kind === 170 /* PropertyDeclaration */ || node.kind === 169 /* PropertySignature */ || node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */ || node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */ || node.kind === 300 /* PropertyAssignment */) { return false; } if (node.flags & 16777216 /* Ambient */) { @@ -78431,7 +78488,7 @@ return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { + if (parent2.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { errorSkippedOn( "noEmit", name, @@ -78449,7 +78506,7 @@ return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { + if (parent2.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -78526,7 +78583,7 @@ if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } - if (node.kind === 257 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 258 /* VariableDeclaration */ && !node.initializer) { return; } const symbol = getSymbolOfDeclaration(node); @@ -78546,9 +78603,9 @@ ); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 258 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 240 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 238 /* Block */ && isFunctionLike(container.parent) || container.kind === 265 /* ModuleBlock */ || container.kind === 264 /* ModuleDeclaration */ || container.kind === 308 /* SourceFile */); + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 259 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 241 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 239 /* Block */ && isFunctionLike(container.parent) || container.kind === 266 /* ModuleBlock */ || container.kind === 265 /* ModuleDeclaration */ || container.kind === 309 /* SourceFile */); if (!namesShareScope) { const name = symbolToString(localDeclarationSymbol); error(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); @@ -78569,7 +78626,7 @@ if (!node.name) { return; } - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -78583,7 +78640,7 @@ if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 164 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; @@ -78605,7 +78662,7 @@ ); checkPropertyAccessibility( node, - !!parent2.initializer && parent2.initializer.kind === 106 /* SuperKeyword */, + !!parent2.initializer && parent2.initializer.kind === 107 /* SuperKeyword */, /*writing*/ false, parentType, @@ -78616,7 +78673,7 @@ } } if (isBindingPattern(node.name)) { - if (node.name.kind === 204 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 205 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); @@ -78629,7 +78686,7 @@ if (isInAmbientOrTypeNode(node)) { return; } - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 246 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 247 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -78661,7 +78718,7 @@ const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); if (initializer) { const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a2 = symbol.exports) == null ? void 0 : _a2.size); - if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 246 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 247 /* ForInStatement */) { checkTypeAssignableToAndOptionallyElaborate( checkExpressionCached(initializer), type, @@ -78696,9 +78753,9 @@ error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 168 /* PropertySignature */) { + if (node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 169 /* PropertySignature */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -78706,7 +78763,7 @@ } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 169 /* PropertyDeclaration */ || nextDeclaration.kind === 168 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; + const message = nextDeclaration.kind === 170 /* PropertyDeclaration */ || nextDeclaration.kind === 169 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; const declName = declarationNameToString(nextDeclarationName); const err = error( nextDeclarationName, @@ -78723,7 +78780,7 @@ } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 166 /* Parameter */ && right.kind === 257 /* VariableDeclaration */ || left.kind === 257 /* VariableDeclaration */ && right.kind === 166 /* Parameter */) { + if (left.kind === 167 /* Parameter */ && right.kind === 258 /* VariableDeclaration */ || left.kind === 258 /* VariableDeclaration */ && right.kind === 167 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -78757,7 +78814,7 @@ const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 239 /* EmptyStatement */) { + if (node.thenStatement.kind === 240 /* EmptyStatement */) { error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -78824,7 +78881,7 @@ let testedExpression = testedNode.parent; let childExpression = childNode.parent; while (testedExpression && childExpression) { - if (isIdentifier(testedExpression) && isIdentifier(childExpression) || testedExpression.kind === 108 /* ThisKeyword */ && childExpression.kind === 108 /* ThisKeyword */) { + if (isIdentifier(testedExpression) && isIdentifier(childExpression) || testedExpression.kind === 109 /* ThisKeyword */ && childExpression.kind === 109 /* ThisKeyword */) { return getSymbolAtLocation(testedExpression) === getSymbolAtLocation(childExpression); } else if (isPropertyAccessExpression(testedExpression) && isPropertyAccessExpression(childExpression)) { if (getSymbolAtLocation(testedExpression.name) !== getSymbolAtLocation(childExpression.name)) { @@ -78883,12 +78940,12 @@ } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 259 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { forEach(node.initializer.declarations, checkVariableDeclaration); } else { checkExpression(node.initializer); @@ -78918,12 +78975,12 @@ } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 206 /* ArrayLiteralExpression */ || varExpr.kind === 207 /* ObjectLiteralExpression */) { + if (varExpr.kind === 207 /* ArrayLiteralExpression */ || varExpr.kind === 208 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -78945,7 +79002,7 @@ function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { const variable = node.initializer.declarations[0]; if (variable && isBindingPattern(variable.name)) { error(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -78954,7 +79011,7 @@ } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 206 /* ArrayLiteralExpression */ || varExpr.kind === 207 /* ObjectLiteralExpression */) { + if (varExpr.kind === 207 /* ArrayLiteralExpression */ || varExpr.kind === 208 /* ObjectLiteralExpression */) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); @@ -79639,11 +79696,11 @@ const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 175 /* SetAccessor */) { + if (container.kind === 176 /* SetAccessor */) { if (node.expression) { error(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 173 /* Constructor */) { + } else if (container.kind === 174 /* Constructor */) { if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) { error(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -79660,7 +79717,7 @@ checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 173 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { + } else if (container.kind !== 174 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { error(node, Diagnostics.Not_all_code_paths_return_a_value); } } @@ -79684,7 +79741,7 @@ let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 293 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 294 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -79692,7 +79749,7 @@ hasDuplicateDefaultClause = true; } } - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); @@ -79724,7 +79781,7 @@ if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 253 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 254 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -79814,8 +79871,8 @@ return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 261 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 223 /* BinaryExpression */ || name && name.kind === 164 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 262 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 224 /* BinaryExpression */ || name && name.kind === 165 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -79839,7 +79896,7 @@ function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 261 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 262 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -79945,7 +80002,7 @@ function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 180 /* TypeReference */) { + if (node.kind === 181 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { @@ -80403,7 +80460,7 @@ return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 260 /* ClassDeclaration */ || d.kind === 261 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 261 /* ClassDeclaration */ || d.kind === 262 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a2, _b, _c, _d; @@ -80433,7 +80490,7 @@ continue basePropertyCheck; } } - if (derivedClassDecl.kind === 228 /* ClassExpression */) { + if (derivedClassDecl.kind === 229 /* ClassExpression */) { error( derivedClassDecl, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, @@ -80468,7 +80525,7 @@ const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { - const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 169 /* PropertyDeclaration */ && !d.initializer); + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer); if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; @@ -80578,7 +80635,7 @@ } } function isPropertyWithoutInitializer(node) { - return node.kind === 169 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 170 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -80612,7 +80669,7 @@ checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfDeclaration(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 261 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 262 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -80642,7 +80699,7 @@ checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); - if (node.type.kind === 139 /* IntrinsicKeyword */) { + if (node.type.kind === 140 /* IntrinsicKeyword */) { if (!intrinsicTypeKinds.has(node.name.escapedText) || length(node.typeParameters) !== 1) { error(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); } @@ -80703,7 +80760,7 @@ } function evaluate(expr, location) { switch (expr.kind) { - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const value = evaluate(expr.operand, location); if (typeof value === "number") { switch (expr.operator) { @@ -80716,7 +80773,7 @@ } } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const left = evaluate(expr.left, location); const right = evaluate(expr.right, location); if (typeof left === "number" && typeof right === "number") { @@ -80753,18 +80810,18 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return expr.text; - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return evaluateTemplateExpression(expr, location); case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return evaluate(expr.expression, location); case 79 /* Identifier */: if (isInfinityOrNaNString(expr.escapedText)) { return +expr.escapedText; } - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: if (isEntityNameExpression(expr)) { const symbol = resolveEntityName( expr, @@ -80785,7 +80842,7 @@ } } break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const root = expr.expression; if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { const rootSymbol = resolveEntityName( @@ -80852,7 +80909,7 @@ } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 263 /* EnumDeclaration */) { + if (declaration.kind !== 264 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -80882,7 +80939,7 @@ const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 260 /* ClassDeclaration */ || declaration.kind === 259 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 261 /* ClassDeclaration */ || declaration.kind === 260 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { return declaration; } } @@ -80943,13 +81000,13 @@ error(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - const mergedClass = getDeclarationOfKind(symbol, 260 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 261 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; } } - if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 308 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { - const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 93 /* ExportKeyword */); + if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 309 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { + const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 94 /* ExportKeyword */); if (exportModifier) { error(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } @@ -80981,21 +81038,21 @@ } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 205 /* BindingElement */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 258 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -81003,12 +81060,12 @@ } break; } - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 259 /* FunctionDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 260 /* FunctionDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -81019,12 +81076,12 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -81043,9 +81100,9 @@ error(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 265 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 308 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 275 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + const inAmbientExternalModule = node.parent.kind === 266 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 309 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 276 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -81074,8 +81131,8 @@ symbol = getMergedSymbol(symbol.exportSymbol || symbol); if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) { const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node; - Debug.assert(node.kind !== 277 /* NamespaceExport */); - if (node.kind === 278 /* ExportSpecifier */) { + Debug.assert(node.kind !== 278 /* NamespaceExport */); + if (node.kind === 279 /* ExportSpecifier */) { const diag2 = error(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); const alreadyExportedSymbol = (_b = (_a2 = getSourceFileOfNode(node).symbol) == null ? void 0 : _a2.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText); if (alreadyExportedSymbol === target) { @@ -81089,7 +81146,7 @@ } } } else { - Debug.assert(node.kind !== 257 /* VariableDeclaration */); + Debug.assert(node.kind !== 258 /* VariableDeclaration */); const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)); const moduleSpecifier = (_e = importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) != null ? _e : "..."; const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName); @@ -81105,7 +81162,7 @@ const targetFlags = getAllSymbolFlags(target); const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (targetFlags & excludedMeanings) { - const message = node.kind === 278 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + const message = node.kind === 279 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); } if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { @@ -81113,25 +81170,25 @@ const isType = !(targetFlags & 111551 /* Value */); if (isType || typeOnlyAlias) { switch (node.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 268 /* ImportEqualsDeclaration */: { + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 269 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports || compilerOptions.verbatimModuleSyntax) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? compilerOptions.verbatimModuleSyntax ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled : compilerOptions.verbatimModuleSyntax ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled; - const name = idText(node.kind === 273 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 274 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( error(node, message, name), isType ? void 0 : typeOnlyAlias, name ); } - if (isType && node.kind === 268 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType && node.kind === 269 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; } - case 278 /* ExportSpecifier */: { + case 279 /* ExportSpecifier */: { if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const name = idText(node.propertyName || node.name); const diagnostic = isType ? error(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); @@ -81141,7 +81198,7 @@ } } } - if (compilerOptions.verbatimModuleSyntax && node.kind !== 268 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && node.kind !== 269 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } @@ -81186,7 +81243,7 @@ function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 273 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 274 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -81233,7 +81290,7 @@ checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 272 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -81259,7 +81316,7 @@ if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 280 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 281 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfDeclaration(node)); if (target !== unknownSymbol) { const targetFlags = getAllSymbolFlags(target); @@ -81297,9 +81354,9 @@ if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 265 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 265 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 308 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + const inAmbientExternalModule = node.parent.kind === 266 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 266 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; + if (node.parent.kind !== 309 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { @@ -81324,13 +81381,13 @@ } function checkGrammarExportDeclaration(node) { var _a2; - if (node.isTypeOnly && ((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 276 /* NamedExports */) { + if (node.isTypeOnly && ((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 277 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 308 /* SourceFile */ || node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 264 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 309 /* SourceFile */ || node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 265 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -81414,8 +81471,8 @@ if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 308 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 264 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 309 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 265 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { @@ -81556,182 +81613,182 @@ const kind = node.kind; if (cancellationToken) { switch (kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 240 /* FirstStatement */ && kind <= 256 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 241 /* FirstStatement */ && kind <= 257 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return checkTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return checkParameter(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return checkPropertySignature(node); - case 182 /* ConstructorType */: - case 181 /* FunctionType */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 183 /* ConstructorType */: + case 182 /* FunctionType */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return checkSignatureDeclaration(node); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return checkMethodDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return checkConstructorDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return checkAccessorDeclaration(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return checkTypeReferenceNode(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return checkTypePredicate(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return checkTypeQuery(node); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return checkTypeLiteral(node); - case 185 /* ArrayType */: + case 186 /* ArrayType */: return checkArrayType(node); - case 186 /* TupleType */: + case 187 /* TupleType */: return checkTupleType(node); - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 193 /* ParenthesizedType */: - case 187 /* OptionalType */: - case 188 /* RestType */: + case 194 /* ParenthesizedType */: + case 188 /* OptionalType */: + case 189 /* RestType */: return checkSourceElement(node.type); - case 194 /* ThisType */: + case 195 /* ThisType */: return checkThisType(node); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return checkTypeOperator(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return checkConditionalType(node); - case 192 /* InferType */: + case 193 /* InferType */: return checkInferType(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return checkImportType(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 327 /* JSDocLink */: - case 328 /* JSDocLinkCode */: - case 329 /* JSDocLinkPlain */: + case 328 /* JSDocLink */: + case 329 /* JSDocLinkCode */: + case 330 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 318 /* JSDocNonNullableType */: - case 317 /* JSDocNullableType */: - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: - case 325 /* JSDocTypeLiteral */: + case 319 /* JSDocNonNullableType */: + case 318 /* JSDocNullableType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: + case 326 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 312 /* JSDocTypeExpression */: + case 313 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 336 /* JSDocPublicTag */: - case 338 /* JSDocProtectedTag */: - case 337 /* JSDocPrivateTag */: + case 337 /* JSDocPublicTag */: + case 339 /* JSDocProtectedTag */: + case 338 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 353 /* JSDocSatisfiesTag */: + case 354 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return checkMappedType(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 238 /* Block */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 266 /* ModuleBlock */: return checkBlock(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return checkVariableStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return checkExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return checkIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return checkDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return checkWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return checkForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return checkForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return checkForOfStatement(node); - case 248 /* ContinueStatement */: - case 249 /* BreakStatement */: + case 249 /* ContinueStatement */: + case 250 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return checkReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return checkWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return checkSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return checkLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return checkThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return checkTryStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return checkBindingElement(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return checkClassDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return checkImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return checkExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return checkExportAssignment(node); - case 239 /* EmptyStatement */: - case 256 /* DebuggerStatement */: + case 240 /* EmptyStatement */: + case 257 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -81830,33 +81887,33 @@ currentNode = node; instantiationCount = 0; switch (node.kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 167 /* Decorator */: - case 283 /* JsxOpeningElement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 168 /* Decorator */: + case 284 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 281 /* JsxElement */: + case 282 /* JsxElement */: checkJsxElementDeferred(node); break; } @@ -82008,27 +82065,27 @@ copySymbols(location.locals, meaning); } switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalModule(location)) break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */); break; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */); } break; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -82061,7 +82118,7 @@ function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 278 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 277 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 279 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 278 /* NamespaceExport */)) { copySymbol(symbol, meaning2); } }); @@ -82072,16 +82129,16 @@ return name.kind === 79 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 163 /* QualifiedName */) { + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 180 /* TypeReference */; + return node.parent.kind === 181 /* TypeReference */; } function isInNameOfExpressionWithTypeArguments(node) { - while (node.parent.kind === 208 /* PropertyAccessExpression */) { + while (node.parent.kind === 209 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 230 /* ExpressionWithTypeArguments */; + return node.parent.kind === 231 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -82107,13 +82164,13 @@ return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 163 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 164 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 268 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 269 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 274 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 275 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -82139,7 +82196,7 @@ node = parent2; parent2 = parent2.parent; } - if (parent2 && parent2.kind === 202 /* ImportType */ && parent2.qualifier === node) { + if (parent2 && parent2.kind === 203 /* ImportType */ && parent2.qualifier === node) { return parent2; } return void 0; @@ -82148,7 +82205,7 @@ if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 208 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 209 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -82156,7 +82213,7 @@ } } } - if (name.parent.kind === 274 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 275 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, /*all meanings*/ @@ -82168,7 +82225,7 @@ return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 268 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 269 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals( name, @@ -82189,7 +82246,7 @@ } if (isInNameOfExpressionWithTypeArguments(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 230 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 231 /* ExpressionWithTypeArguments */) { meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -82203,10 +82260,10 @@ return entityNameSymbol; } } - if (name.parent.kind === 344 /* JSDocParameterTag */) { + if (name.parent.kind === 345 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 165 /* TypeParameter */ && name.parent.parent.kind === 348 /* JSDocTemplateTag */) { + if (name.parent.kind === 166 /* TypeParameter */ && name.parent.parent.kind === 349 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -82259,12 +82316,12 @@ return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 208 /* PropertyAccessExpression */ || name.kind === 163 /* QualifiedName */) { + } else if (name.kind === 209 /* PropertyAccessExpression */ || name.kind === 164 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 208 /* PropertyAccessExpression */) { + if (name.kind === 209 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -82304,7 +82361,7 @@ return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 180 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 181 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName( name, meaning, @@ -82315,7 +82372,7 @@ ); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 179 /* TypePredicate */) { + if (name.parent.kind === 180 /* TypePredicate */) { return resolveEntityName( name, /*meaning*/ @@ -82368,17 +82425,17 @@ if (node.kind === 79 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 205 /* BindingElement */ && grandParent.kind === 203 /* ObjectBindingPattern */ && node === parent2.propertyName) { + } else if (parent2.kind === 206 /* BindingElement */ && grandParent.kind === 204 /* ObjectBindingPattern */ && node === parent2.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { return propertyDeclaration; } } else if (isMetaProperty(parent2) && parent2.name === node) { - if (parent2.keywordToken === 103 /* NewKeyword */ && idText(node) === "target") { + if (parent2.keywordToken === 104 /* NewKeyword */ && idText(node) === "target") { return checkNewTargetMetaProperty(parent2).symbol; } - if (parent2.keywordToken === 100 /* ImportKeyword */ && idText(node) === "meta") { + if (parent2.keywordToken === 101 /* ImportKeyword */ && idText(node) === "meta") { return getGlobalImportMetaExpressionType().members.get("meta"); } return void 0; @@ -82387,12 +82444,12 @@ switch (node.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 208 /* PropertyAccessExpression */: - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: const container = getThisContainer( node, /*includeArrowFunctions*/ @@ -82409,19 +82466,19 @@ if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 194 /* ThisType */: + case 195 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkExpression(node).symbol; - case 135 /* ConstructorKeyword */: + case 136 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 173 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 174 /* Constructor */) { return constructorDeclaration.parent.symbol; } return void 0; case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 269 /* ImportDeclaration */ || node.parent.kind === 275 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 270 /* ImportDeclaration */ || node.parent.kind === 276 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( node.parent, /*checkArgumentIsStringLiteralLike*/ false @@ -82434,19 +82491,19 @@ case 8 /* NumericLiteral */: const objectType = isElementAccessExpression(parent2) ? parent2.argumentExpression === node ? getTypeOfExpression(parent2.expression) : void 0 : isLiteralTypeNode(parent2) && isIndexedAccessTypeNode(grandParent) ? getTypeFromTypeNode(grandParent.objectType) : void 0; return objectType && getPropertyOfType(objectType, escapeLeadingUnderscores(node.text)); - case 88 /* DefaultKeyword */: - case 98 /* FunctionKeyword */: + case 89 /* DefaultKeyword */: + case 99 /* FunctionKeyword */: case 38 /* EqualsGreaterThanToken */: - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 202 /* ImportType */: + case 203 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; - case 100 /* ImportKeyword */: - case 103 /* NewKeyword */: + case 101 /* ImportKeyword */: + case 104 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return checkExpression(node).symbol; default: return void 0; @@ -82462,7 +82519,7 @@ return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 300 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 301 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); } return void 0; @@ -82534,16 +82591,16 @@ return errorType; } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 207 /* ObjectLiteralExpression */ || expr.kind === 206 /* ArrayLiteralExpression */); - if (expr.parent.kind === 247 /* ForOfStatement */) { + Debug.assert(expr.kind === 208 /* ObjectLiteralExpression */ || expr.kind === 207 /* ArrayLiteralExpression */); + if (expr.parent.kind === 248 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 223 /* BinaryExpression */) { + if (expr.parent.kind === 224 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 299 /* PropertyAssignment */) { + if (expr.parent.kind === 300 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -82576,7 +82633,7 @@ case 8 /* NumericLiteral */: case 10 /* StringLiteral */: return getStringLiteralType(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -82671,7 +82728,7 @@ } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 308 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 309 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -82701,7 +82758,7 @@ return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 295 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 296 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -82729,7 +82786,7 @@ /*lookInLabeledStatements*/ false ); - const inLoopBodyBlock = container.kind === 238 /* Block */ && isIterationStatement( + const inLoopBodyBlock = container.kind === 239 /* Block */ && isIterationStatement( container.parent, /*lookInLabeledStatements*/ false @@ -82769,25 +82826,25 @@ function isValueAliasDeclaration(node) { Debug.assert(!compilerOptions.verbatimModuleSyntax); switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfDeclaration(node)); - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: const symbol = getSymbolOfDeclaration(node); return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return node.expression && node.expression.kind === 79 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfDeclaration(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 308 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 309 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node)); @@ -82878,15 +82935,15 @@ } function canHaveConstantValue(node) { switch (node.kind) { - case 302 /* EnumMember */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 303 /* EnumMember */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 302 /* EnumMember */) { + if (node.kind === 303 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -82990,7 +83047,7 @@ function createTypeOfDeclaration(declarationIn, enclosingDeclaration, flags, tracker, addUndefined) { const declaration = getParseTreeNode(declarationIn, isVariableLikeOrAccessor); if (!declaration) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const symbol = getSymbolOfDeclaration(declaration); let type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? getWidenedLiteralType(getTypeOfSymbol(symbol)) : errorType; @@ -83005,7 +83062,7 @@ function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn, enclosingDeclaration, flags, tracker) { const signatureDeclaration = getParseTreeNode(signatureDeclarationIn, isFunctionLike); if (!signatureDeclaration) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const signature = getSignatureFromDeclaration(signatureDeclaration); return nodeBuilder.typeToTypeNode(getReturnTypeOfSignature(signature), enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); @@ -83013,7 +83070,7 @@ function createTypeOfExpression(exprIn, enclosingDeclaration, flags, tracker) { const expr = getParseTreeNode(exprIn, isExpression); if (!expr) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const type = getWidenedType(getRegularTypeOfExpression(expr)); return nodeBuilder.typeToTypeNode(type, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); @@ -83196,12 +83253,12 @@ getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 175 /* SetAccessor */ ? 174 /* GetAccessor */ : 175 /* SetAccessor */; + const otherKind = accessor.kind === 176 /* SetAccessor */ ? 175 /* GetAccessor */ : 176 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 175 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 174 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 176 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 175 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -83222,7 +83279,7 @@ }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 308 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 309 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfDeclaration(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -83257,18 +83314,18 @@ return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 230 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 294 /* HeritageClause */; + return node.parent && node.parent.kind === 231 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 295 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 164 /* ComputedPropertyName */) { + if (node.parent.kind === 165 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 208 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 209 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -83311,7 +83368,7 @@ break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 308 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 309 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -83336,7 +83393,7 @@ } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 264 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 265 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker( specifier, specifier, @@ -83346,7 +83403,7 @@ if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 308 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 309 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -83632,12 +83689,12 @@ for (const modifier of node.modifiers) { if (isDecorator(modifier)) { if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - if (node.kind === 171 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { + if (node.kind === 172 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); } - } else if (legacyDecorators && (node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */)) { + } else if (legacyDecorators && (node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */)) { const accessors = getAllAccessorDeclarations(node.parent.members, node); if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -83666,30 +83723,30 @@ } firstDecorator != null ? firstDecorator : firstDecorator = modifier; } else { - if (modifier.kind !== 146 /* ReadonlyKeyword */) { - if (node.kind === 168 /* PropertySignature */ || node.kind === 170 /* MethodSignature */) { + if (modifier.kind !== 147 /* ReadonlyKeyword */) { + if (node.kind === 169 /* PropertySignature */ || node.kind === 171 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 178 /* IndexSignature */ && (modifier.kind !== 124 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 179 /* IndexSignature */ && (modifier.kind !== 125 /* StaticKeyword */ || !isClassLike(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); } } - if (modifier.kind !== 101 /* InKeyword */ && modifier.kind !== 145 /* OutKeyword */ && modifier.kind !== 85 /* ConstKeyword */) { - if (node.kind === 165 /* TypeParameter */) { + if (modifier.kind !== 102 /* InKeyword */ && modifier.kind !== 146 /* OutKeyword */ && modifier.kind !== 86 /* ConstKeyword */) { + if (node.kind === 166 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { - case 85 /* ConstKeyword */: - if (node.kind !== 263 /* EnumDeclaration */ && node.kind !== 165 /* TypeParameter */) { - return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(85 /* ConstKeyword */)); + case 86 /* ConstKeyword */: + if (node.kind !== 264 /* EnumDeclaration */ && node.kind !== 166 /* TypeParameter */) { + return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(86 /* ConstKeyword */)); } const parent2 = node.parent; - if (node.kind === 165 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { + if (node.kind === 166 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind)); } break; - case 161 /* OverrideKeyword */: + case 162 /* OverrideKeyword */: if (flags & 16384 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); } else if (flags & 2 /* Ambient */) { @@ -83704,9 +83761,9 @@ flags |= 16384 /* Override */; lastOverride = modifier; break; - case 123 /* PublicKeyword */: - case 122 /* ProtectedKeyword */: - case 121 /* PrivateKeyword */: + case 124 /* PublicKeyword */: + case 123 /* ProtectedKeyword */: + case 122 /* PrivateKeyword */: const text = visibilityToString(modifierToFlag(modifier.kind)); if (flags & 28 /* AccessibilityModifier */) { return grammarErrorOnNode(modifier, Diagnostics.Accessibility_modifier_already_seen); @@ -83720,10 +83777,10 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); } else if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); - } else if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + } else if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { - if (modifier.kind === 121 /* PrivateKeyword */) { + if (modifier.kind === 122 /* PrivateKeyword */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); @@ -83733,7 +83790,7 @@ } flags |= modifierToFlag(modifier.kind); break; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: if (flags & 32 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static"); } else if (flags & 64 /* Readonly */) { @@ -83742,9 +83799,9 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); - } else if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + } else if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); @@ -83754,31 +83811,31 @@ flags |= 32 /* Static */; lastStatic = modifier; break; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "accessor"); } else if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); } else if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); - } else if (node.kind !== 169 /* PropertyDeclaration */) { + } else if (node.kind !== 170 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; break; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 168 /* PropertySignature */ && node.kind !== 178 /* IndexSignature */ && node.kind !== 166 /* Parameter */) { + } else if (node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 169 /* PropertySignature */ && node.kind !== 179 /* IndexSignature */ && node.kind !== 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); } flags |= 64 /* Readonly */; break; - case 93 /* ExportKeyword */: - if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 262 /* TypeAliasDeclaration */ && node.kind !== 261 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later - node.kind !== 264 /* ModuleDeclaration */ && node.parent.kind === 308 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + case 94 /* ExportKeyword */: + if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 263 /* TypeAliasDeclaration */ && node.kind !== 262 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later + node.kind !== 265 /* ModuleDeclaration */ && node.parent.kind === 309 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } if (flags & 1 /* Export */) { @@ -83791,14 +83848,14 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1 /* Export */; break; - case 88 /* DefaultKeyword */: - const container = node.parent.kind === 308 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 264 /* ModuleDeclaration */ && !isAmbientModule(container)) { + case 89 /* DefaultKeyword */: + const container = node.parent.kind === 309 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 265 /* ModuleDeclaration */ && !isAmbientModule(container)) { return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); } else if (!(flags & 1 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); @@ -83807,7 +83864,7 @@ } flags |= 1024 /* Default */; break; - case 136 /* DeclareKeyword */: + case 137 /* DeclareKeyword */: if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "declare"); } else if (flags & 512 /* Async */) { @@ -83816,9 +83873,9 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 265 /* ModuleBlock */) { + } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 266 /* ModuleBlock */) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); @@ -83828,15 +83885,15 @@ flags |= 2 /* Ambient */; lastDeclare = modifier; break; - case 126 /* AbstractKeyword */: + case 127 /* AbstractKeyword */: if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 260 /* ClassDeclaration */ && node.kind !== 182 /* ConstructorType */) { - if (node.kind !== 171 /* MethodDeclaration */ && node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 174 /* GetAccessor */ && node.kind !== 175 /* SetAccessor */) { + if (node.kind !== 261 /* ClassDeclaration */ && node.kind !== 183 /* ConstructorType */) { + if (node.kind !== 172 /* MethodDeclaration */ && node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 175 /* GetAccessor */ && node.kind !== 176 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 260 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 261 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { return grammarErrorOnNode(modifier, Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32 /* Static */) { @@ -83860,12 +83917,12 @@ } flags |= 256 /* Abstract */; break; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); } else if (flags & 2 /* Ambient */ || node.parent.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -83874,11 +83931,11 @@ flags |= 512 /* Async */; lastAsync = modifier; break; - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - const inOutFlag = modifier.kind === 101 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; - const inOutText = modifier.kind === 101 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 165 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + const inOutFlag = modifier.kind === 102 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; + const inOutText = modifier.kind === 102 /* InKeyword */ ? "in" : "out"; + if (node.kind !== 166 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); } if (flags & inOutFlag) { @@ -83892,7 +83949,7 @@ } } } - if (node.kind === 173 /* Constructor */) { + if (node.kind === 174 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -83903,11 +83960,11 @@ return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 269 /* ImportDeclaration */ || node.kind === 268 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 270 /* ImportDeclaration */ || node.kind === 269 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 166 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 167 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 166 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 167 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -83927,47 +83984,47 @@ } function findFirstIllegalModifier(node) { switch (node.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 264 /* ModuleDeclaration */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 166 /* Parameter */: - case 165 /* TypeParameter */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 265 /* ModuleDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 167 /* Parameter */: + case 166 /* TypeParameter */: return void 0; - case 172 /* ClassStaticBlockDeclaration */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 267 /* NamespaceExportDeclaration */: - case 279 /* MissingDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 268 /* NamespaceExportDeclaration */: + case 280 /* MissingDeclaration */: return find(node.modifiers, isModifier); default: - if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return void 0; } switch (node.kind) { - case 259 /* FunctionDeclaration */: - return findFirstModifierExcept(node, 132 /* AsyncKeyword */); - case 260 /* ClassDeclaration */: - case 182 /* ConstructorType */: - return findFirstModifierExcept(node, 126 /* AbstractKeyword */); - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 240 /* VariableStatement */: - case 262 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + return findFirstModifierExcept(node, 133 /* AsyncKeyword */); + case 261 /* ClassDeclaration */: + case 183 /* ConstructorType */: + return findFirstModifierExcept(node, 127 /* AbstractKeyword */); + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 241 /* VariableStatement */: + case 263 /* TypeAliasDeclaration */: return find(node.modifiers, isModifier); - case 263 /* EnumDeclaration */: - return findFirstModifierExcept(node, 85 /* ConstKeyword */); + case 264 /* EnumDeclaration */: + return findFirstModifierExcept(node, 86 /* ConstKeyword */); default: Debug.assertNever(node); } @@ -83982,10 +84039,10 @@ } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -84157,7 +84214,7 @@ let seenImplementsClause = false; if (!checkGrammarModifiers(node) && node.heritageClauses) { for (const heritageClause of node.heritageClauses) { - if (heritageClause.token === 94 /* ExtendsKeyword */) { + if (heritageClause.token === 95 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); } @@ -84169,7 +84226,7 @@ } seenExtendsClause = true; } else { - Debug.assert(heritageClause.token === 117 /* ImplementsKeyword */); + Debug.assert(heritageClause.token === 118 /* ImplementsKeyword */); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.implements_clause_already_seen); } @@ -84183,13 +84240,13 @@ let seenExtendsClause = false; if (node.heritageClauses) { for (const heritageClause of node.heritageClauses) { - if (heritageClause.token === 94 /* ExtendsKeyword */) { + if (heritageClause.token === 95 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); } seenExtendsClause = true; } else { - Debug.assert(heritageClause.token === 117 /* ImplementsKeyword */); + Debug.assert(heritageClause.token === 118 /* ImplementsKeyword */); return grammarErrorOnFirstToken(heritageClause, Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -84198,11 +84255,11 @@ return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 164 /* ComputedPropertyName */) { + if (node.kind !== 165 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 223 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { + if (computedPropertyName.expression.kind === 224 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } return false; @@ -84210,7 +84267,7 @@ function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */ || node.kind === 171 /* MethodDeclaration */ + node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */ || node.kind === 172 /* MethodDeclaration */ ); if (node.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); @@ -84229,7 +84286,7 @@ function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = /* @__PURE__ */ new Map(); for (const prop of node.properties) { - if (prop.kind === 301 /* SpreadAssignment */) { + if (prop.kind === 302 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -84239,10 +84296,10 @@ continue; } const name = prop.name; - if (name.kind === 164 /* ComputedPropertyName */) { + if (name.kind === 165 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 300 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 301 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { grammarErrorOnNode(prop.equalsToken, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern); } if (name.kind === 80 /* PrivateIdentifier */) { @@ -84250,7 +84307,7 @@ } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 132 /* AsyncKeyword */ || prop.kind !== 171 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 172 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -84263,8 +84320,8 @@ } let currentKind; switch (prop.kind) { - case 300 /* ShorthandPropertyAssignment */: - case 299 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 8 /* NumericLiteral */) { @@ -84272,13 +84329,13 @@ } currentKind = 4 /* PropertyAssignment */; break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -84315,7 +84372,7 @@ checkGrammarTypeArguments(node, node.typeArguments); const seen = /* @__PURE__ */ new Map(); for (const attr of node.attributes.properties) { - if (attr.kind === 290 /* JsxSpreadAttribute */) { + if (attr.kind === 291 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -84324,7 +84381,7 @@ } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 291 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 292 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -84359,7 +84416,7 @@ if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 247 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 248 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { @@ -84399,7 +84456,7 @@ if (!hasParseDiagnostics(sourceFile)) { const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); const func = getContainingFunction(forInOrOfStatement); - if (func && func.kind !== 173 /* Constructor */) { + if (func && func.kind !== 174 /* Constructor */) { Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); @@ -84415,7 +84472,7 @@ grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 258 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 259 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -84423,16 +84480,16 @@ return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } const firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); } } @@ -84440,7 +84497,7 @@ return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 184 /* TypeLiteral */ && accessor.parent.kind !== 261 /* InterfaceDeclaration */) { + if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 185 /* TypeLiteral */ && accessor.parent.kind !== 262 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -84455,7 +84512,7 @@ if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 184 /* TypeLiteral */ || accessor.parent.kind === 261 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 185 /* TypeLiteral */ || accessor.parent.kind === 262 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -84465,10 +84522,10 @@ if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 174 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 175 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 175 /* SetAccessor */) { + if (accessor.kind === 176 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -84486,17 +84543,17 @@ return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 174 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 175 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 174 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 175 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } function checkGrammarTypeOperatorNode(node) { - if (node.operator === 156 /* UniqueKeyword */) { - if (node.type.kind !== 153 /* SymbolKeyword */) { - return grammarErrorOnNode(node.type, Diagnostics._0_expected, tokenToString(153 /* SymbolKeyword */)); + if (node.operator === 157 /* UniqueKeyword */) { + if (node.type.kind !== 154 /* SymbolKeyword */) { + return grammarErrorOnNode(node.type, Diagnostics._0_expected, tokenToString(154 /* SymbolKeyword */)); } let parent2 = walkUpParenthesizedTypes(node.parent); if (isInJSFile(parent2) && isJSDocTypeExpression(parent2)) { @@ -84506,7 +84563,7 @@ } } switch (parent2.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: const decl = parent2; if (decl.name.kind !== 79 /* Identifier */) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); @@ -84518,12 +84575,12 @@ return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!isStatic(parent2) || !hasEffectiveReadonlyModifier(parent2)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); } break; - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (!hasSyntacticModifier(parent2, 64 /* Readonly */)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } @@ -84531,9 +84588,9 @@ default: return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } - } else if (node.operator === 146 /* ReadonlyKeyword */) { - if (node.type.kind !== 185 /* ArrayType */ && node.type.kind !== 186 /* TupleType */) { - return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(153 /* SymbolKeyword */)); + } else if (node.operator === 147 /* ReadonlyKeyword */) { + if (node.type.kind !== 186 /* ArrayType */ && node.type.kind !== 187 /* TupleType */) { + return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(154 /* SymbolKeyword */)); } } } @@ -84546,9 +84603,9 @@ if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 171 /* MethodDeclaration */) { - if (node.parent.kind === 207 /* ObjectLiteralExpression */) { - if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 132 /* AsyncKeyword */)) { + if (node.kind === 172 /* MethodDeclaration */) { + if (node.parent.kind === 208 /* ObjectLiteralExpression */) { + if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 133 /* AsyncKeyword */)) { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) { return true; @@ -84568,12 +84625,12 @@ } if (node.flags & 16777216 /* Ambient */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.kind === 171 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 172 /* MethodDeclaration */ && !node.body) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } - } else if (node.parent.kind === 261 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 262 /* InterfaceDeclaration */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.parent.kind === 184 /* TypeLiteral */) { + } else if (node.parent.kind === 185 /* TypeLiteral */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } } @@ -84584,9 +84641,9 @@ return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 248 /* ContinueStatement */ && !isIterationStatement( + const isMisplacedContinueLabel = node.kind === 249 /* ContinueStatement */ && !isIterationStatement( current.statement, /*lookInLabeledStatement*/ true @@ -84597,8 +84654,8 @@ return false; } break; - case 252 /* SwitchStatement */: - if (node.kind === 249 /* BreakStatement */ && !node.label) { + case 253 /* SwitchStatement */: + if (node.kind === 250 /* BreakStatement */ && !node.label) { return false; } break; @@ -84615,10 +84672,10 @@ current = current.parent; } if (node.label) { - const message = node.kind === 249 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + const message = node.kind === 250 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - const message = node.kind === 249 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + const message = node.kind === 250 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } } @@ -84638,10 +84695,10 @@ } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 221 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 222 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 221 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; + return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 222 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -84651,7 +84708,7 @@ function checkAmbientInitializer(node) { const initializer = node.initializer; if (initializer) { - const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 110 /* TrueKeyword */ || initializer.kind === 95 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); + const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 111 /* TrueKeyword */ || initializer.kind === 96 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { @@ -84663,7 +84720,7 @@ } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 246 /* ForInStatement */ && node.parent.parent.kind !== 247 /* ForOfStatement */) { + if (node.parent.parent.kind !== 247 /* ForInStatement */ && node.parent.parent.kind !== 248 /* ForOfStatement */) { if (node.flags & 16777216 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { @@ -84675,7 +84732,7 @@ } } } - if (node.exclamationToken && (node.parent.parent.kind !== 240 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 241 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } @@ -84727,15 +84784,15 @@ } function allowLetAndConstDeclarations(parent2) { switch (parent2.kind) { - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return false; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return allowLetAndConstDeclarations(parent2.parent); } return true; @@ -84752,12 +84809,12 @@ function checkGrammarMetaProperty(node) { const escapedText = node.name.escapedText; switch (node.keywordToken) { - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: if (escapedText !== "target") { return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.escapedText, tokenToString(node.keywordToken), "target"); } break; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: if (escapedText !== "meta") { return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.escapedText, tokenToString(node.keywordToken), "meta"); } @@ -84815,7 +84872,7 @@ } } function checkGrammarProperty(node) { - if (isComputedPropertyName(node.name) && isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 101 /* InKeyword */) { + if (isComputedPropertyName(node.name) && isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 102 /* InKeyword */) { return grammarErrorOnNode(node.parent.members[0], Diagnostics.A_mapped_type_may_not_declare_properties_or_methods); } if (isClassLike(node.parent)) { @@ -84834,7 +84891,7 @@ if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 261 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 262 /* InterfaceDeclaration */) { if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } @@ -84860,14 +84917,14 @@ } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 261 /* InterfaceDeclaration */ || node.kind === 262 /* TypeAliasDeclaration */ || node.kind === 269 /* ImportDeclaration */ || node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 275 /* ExportDeclaration */ || node.kind === 274 /* ExportAssignment */ || node.kind === 267 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 262 /* InterfaceDeclaration */ || node.kind === 263 /* TypeAliasDeclaration */ || node.kind === 270 /* ImportDeclaration */ || node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 276 /* ExportDeclaration */ || node.kind === 275 /* ExportAssignment */ || node.kind === 268 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (const decl of file.statements) { - if (isDeclaration(decl) || decl.kind === 240 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 241 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -84884,7 +84941,7 @@ if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 238 /* Block */ || node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + if (node.parent.kind === 239 /* Block */ || node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -84899,9 +84956,9 @@ let diagnosticMessage; if (languageVersion >= 1 /* ES5 */) { diagnosticMessage = Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 198 /* LiteralType */)) { + } else if (isChildOfNodeWithKind(node, 199 /* LiteralType */)) { diagnosticMessage = Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 302 /* EnumMember */)) { + } else if (isChildOfNodeWithKind(node, 303 /* EnumMember */)) { diagnosticMessage = Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { @@ -84974,7 +85031,7 @@ if (node.isTypeOnly && node.name && node.namedBindings) { return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); } - if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 272 /* NamedImports */) { + if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 273 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -84984,7 +85041,7 @@ if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 273 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + specifier.kind === 274 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement ); } }); @@ -85047,10 +85104,10 @@ } function findMostOverlappyType(source, unionTarget) { let bestMatch; - if (!(source.flags & (134348796 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { + if (!(source.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { let matchingCount = 0; for (const target of unionTarget.types) { - if (!(target.flags & (134348796 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { + if (!(target.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { const overlap = getIntersectionType([getIndexType(source), getIndexType(target)]); if (overlap.flags & 4194304 /* Index */) { return target; @@ -85068,7 +85125,7 @@ } function filterPrimitivesIfContainsNonPrimitive(type) { if (maybeTypeOfKind(type, 67108864 /* NonPrimitive */)) { - const result = filterType(type, (t) => !(t.flags & 134348796 /* Primitive */)); + const result = filterType(type, (t) => !(t.flags & 402784252 /* Primitive */)); if (!(result.flags & 131072 /* Never */)) { return result; } @@ -85103,12 +85160,12 @@ return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 259 /* FunctionDeclaration */ && declaration.kind !== 171 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 260 /* FunctionDeclaration */ && declaration.kind !== 172 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -85666,21 +85723,21 @@ "use strict"; init_ts2(); visitEachChildTable = { - [163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [164 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [165 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [165 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -85689,7 +85746,7 @@ nodeVisitor(node.default, visitor, isTypeNode) ); }, - [166 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [167 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85700,14 +85757,14 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [168 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -85716,7 +85773,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [170 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { var _a2, _b; return context.factory.updatePropertyDeclaration( node, @@ -85728,7 +85785,7 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [170 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -85739,7 +85796,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85752,7 +85809,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [173 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [174 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85760,7 +85817,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [174 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [175 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85770,7 +85827,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85779,7 +85836,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [172 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [173 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -85787,7 +85844,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -85795,7 +85852,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [177 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -85803,7 +85860,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [178 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85812,7 +85869,7 @@ ); }, // Types - [179 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -85820,14 +85877,14 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [181 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -85835,7 +85892,7 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -85844,56 +85901,56 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [185 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [187 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [189 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [190 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [190 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [191 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -85902,13 +85959,13 @@ Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [193 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -85918,14 +85975,14 @@ node.isTypeOf ); }, - [298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [200 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -85934,26 +85991,26 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [194 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [198 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -85964,20 +86021,20 @@ nodesVisitor(node.members, visitor, isTypeElement) ); }, - [198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [202 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -85985,19 +86042,19 @@ ); }, // Binding patterns - [203 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [204 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [204 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [205 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [206 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -86007,19 +86064,19 @@ ); }, // Expression - [206 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [207 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [209 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86031,7 +86088,7 @@ Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [210 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86043,7 +86100,7 @@ Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [211 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86057,7 +86114,7 @@ nodesVisitor(node.arguments, visitor, isExpression) ); }, - [211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [212 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86065,7 +86122,7 @@ nodesVisitor(node.arguments, visitor, isExpression) ); }, - [212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [213 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -86073,20 +86130,20 @@ Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [214 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [216 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86098,7 +86155,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [216 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [217 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86109,43 +86166,43 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [219 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [220 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [224 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -86153,7 +86210,7 @@ Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [225 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -86163,27 +86220,27 @@ Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [229 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86193,28 +86250,28 @@ nodesVisitor(node.members, visitor, isClassElement) ); }, - [230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [232 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -86223,14 +86280,14 @@ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86238,26 +86295,26 @@ ); }, // Element - [238 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [239 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [240 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [241 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [242 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [243 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86265,21 +86322,21 @@ nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [243 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [245 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -86288,7 +86345,7 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -86296,7 +86353,7 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [248 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -86305,52 +86362,52 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [249 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [250 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -86358,7 +86415,7 @@ nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [258 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -86367,13 +86424,13 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [258 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [259 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [259 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [260 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86385,7 +86442,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [260 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [261 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86395,7 +86452,7 @@ nodesVisitor(node.members, visitor, isClassElement) ); }, - [261 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [262 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86405,7 +86462,7 @@ nodesVisitor(node.members, visitor, isTypeElement) ); }, - [262 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [263 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86414,7 +86471,7 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86422,7 +86479,7 @@ nodesVisitor(node.members, visitor, isEnumMember) ); }, - [264 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86430,25 +86487,25 @@ nodeVisitor(node.body, visitor, isModuleBody) ); }, - [265 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [266 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [266 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [267 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [269 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86457,7 +86514,7 @@ Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [270 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86466,21 +86523,21 @@ nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [296 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [297 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [298 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -86488,25 +86545,25 @@ nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [273 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [273 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -86514,14 +86571,14 @@ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [275 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86531,13 +86588,13 @@ nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [276 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [277 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [278 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -86546,14 +86603,14 @@ ); }, // Module references - [280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -86561,7 +86618,7 @@ Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -86569,7 +86626,7 @@ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -86577,13 +86634,13 @@ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -86591,52 +86648,52 @@ Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [289 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [290 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [293 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [294 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [294 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [295 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [295 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -86644,28 +86701,28 @@ ); }, // Property assignments - [299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -86673,20 +86730,20 @@ ); }, // Top-level nodes - [308 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [309 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [357 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [358 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -87287,7 +87344,7 @@ function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 308 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 309 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -87330,7 +87387,7 @@ let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -87339,12 +87396,12 @@ hasImportDefault = true; } break; - case 268 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 280 /* ExternalModuleReference */) { + case 269 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 281 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -87367,19 +87424,19 @@ addExportedNamesForExportDeclaration(node); } break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames); } } break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -87396,7 +87453,7 @@ } } break; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -87537,7 +87594,7 @@ return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 169 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 170 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -87574,15 +87631,15 @@ } function getAllDecoratorsOfClassElement(member, parent2, useLegacyDecorators) { switch (member.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (!useLegacyDecorators) { return getAllDecoratorsOfMethod(member); } return getAllDecoratorsOfAccessors(member, parent2); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -88228,8 +88285,8 @@ const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -88240,14 +88297,14 @@ let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 309 /* Bundle */) { + if (node.kind === 310 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 311 /* InputFiles */) { + if (prepend.kind === 312 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -88278,22 +88335,22 @@ } function onBeforeVisitNode(node) { switch (node.kind) { - case 308 /* SourceFile */: - case 266 /* CaseBlock */: - case 265 /* ModuleBlock */: - case 238 /* Block */: + case 309 /* SourceFile */: + case 267 /* CaseBlock */: + case 266 /* ModuleBlock */: + case 239 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 260 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 261 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -88312,10 +88369,10 @@ } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -88330,13 +88387,13 @@ return node; } switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -88346,7 +88403,7 @@ return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 275 /* ExportDeclaration */ || node.kind === 269 /* ImportDeclaration */ || node.kind === 270 /* ImportClause */ || node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (node.kind === 276 /* ExportDeclaration */ || node.kind === 270 /* ImportDeclaration */ || node.kind === 271 /* ImportClause */ || node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 281 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -88358,21 +88415,21 @@ } function classElementVisitorWorker(node, parent2) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructor(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent2); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return node; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -88383,15 +88440,15 @@ } function objectLiteralElementVisitorWorker(node, parent2) { switch (node.kind) { - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return visitor(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); default: return Debug.failBadSyntaxKind(node); @@ -88408,7 +88465,7 @@ return void 0; if (modifierToFlag(node.kind) & 117086 /* TypeScriptModifier */) { return void 0; - } else if (currentNamespace && node.kind === 93 /* ExportKeyword */) { + } else if (currentNamespace && node.kind === 94 /* ExportKeyword */) { return void 0; } return node; @@ -88418,108 +88475,108 @@ return factory2.createNotEmittedStatement(node); } switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return currentNamespace ? void 0 : node; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 126 /* AbstractKeyword */: - case 161 /* OverrideKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 146 /* ReadonlyKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - case 185 /* ArrayType */: - case 186 /* TupleType */: - case 187 /* OptionalType */: - case 188 /* RestType */: - case 184 /* TypeLiteral */: - case 179 /* TypePredicate */: - case 165 /* TypeParameter */: - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 134 /* BooleanKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 144 /* NeverKeyword */: - case 114 /* VoidKeyword */: - case 153 /* SymbolKeyword */: - case 182 /* ConstructorType */: - case 181 /* FunctionType */: - case 183 /* TypeQuery */: - case 180 /* TypeReference */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 191 /* ConditionalType */: - case 193 /* ParenthesizedType */: - case 194 /* ThisType */: - case 195 /* TypeOperator */: - case 196 /* IndexedAccessType */: - case 197 /* MappedType */: - case 198 /* LiteralType */: - case 178 /* IndexSignature */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 127 /* AbstractKeyword */: + case 162 /* OverrideKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 147 /* ReadonlyKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + case 186 /* ArrayType */: + case 187 /* TupleType */: + case 188 /* OptionalType */: + case 189 /* RestType */: + case 185 /* TypeLiteral */: + case 180 /* TypePredicate */: + case 166 /* TypeParameter */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 135 /* BooleanKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 145 /* NeverKeyword */: + case 115 /* VoidKeyword */: + case 154 /* SymbolKeyword */: + case 183 /* ConstructorType */: + case 182 /* FunctionType */: + case 184 /* TypeQuery */: + case 181 /* TypeReference */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 192 /* ConditionalType */: + case 194 /* ParenthesizedType */: + case 195 /* ThisType */: + case 196 /* TypeOperator */: + case 197 /* IndexedAccessType */: + case 198 /* MappedType */: + case 199 /* LiteralType */: + case 179 /* IndexSignature */: return void 0; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return void 0; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return visitHeritageClause(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return visitArrowFunction(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return visitAssertionExpression(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return visitNonNullExpression(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -88556,7 +88613,7 @@ ))) facts |= 1 /* HasStaticInitializedProperties */; const extendsClauseElement = getEffectiveBaseTypeNode(node); - if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */) + if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */) facts |= 64 /* IsDerivedClass */; if (classOrConstructorParameterIsDecorated(legacyDecorators, node)) facts |= 2 /* HasClassOrConstructorParameterDecorators */; @@ -88852,19 +88909,19 @@ } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 169 /* PropertyDeclaration */; + return kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 170 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 171 /* MethodDeclaration */; + return node.kind === 172 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; } return false; @@ -88896,7 +88953,7 @@ return Debug.checkDefined(visitNode(name, visitor, isPropertyName)); } function visitHeritageClause(node) { - if (node.token === 117 /* ImplementsKeyword */) { + if (node.token === 118 /* ImplementsKeyword */) { return void 0; } return visitEachChild(node, visitor, context); @@ -89492,12 +89549,12 @@ true ) ) - ], currentLexicalScope.kind === 308 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) + ], currentLexicalScope.kind === 309 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) ); setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 263 /* EnumDeclaration */) { + if (node.kind === 264 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -89610,7 +89667,7 @@ let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 265 /* ModuleBlock */) { + if (node.body.kind === 266 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -89641,13 +89698,13 @@ true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 265 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 266 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 264 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 265 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -89682,7 +89739,7 @@ ) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 271 /* NamespaceImport */) { + if (node.kind === 272 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.verbatimModuleSyntax || compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -89880,15 +89937,15 @@ if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(264 /* ModuleDeclaration */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(265 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 264 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 265 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 263 /* EnumDeclaration */; + return getOriginalNode(node).kind === 264 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -89933,9 +89990,9 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -89950,8 +90007,8 @@ /*prefixLocals*/ false ); - if (container && container.kind !== 308 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 264 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 263 /* EnumDeclaration */; + if (container && container.kind !== 309 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 265 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 264 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -90059,7 +90116,7 @@ } function modifierVisitor(node) { switch (node.kind) { - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return shouldTransformAutoAccessorsInCurrentClass() ? void 0 : node; default: return tryCast(node, isModifier); @@ -90070,51 +90127,51 @@ return node; } switch (node.kind) { - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return Debug.fail("Use `modifierVisitor` instead."); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression( node, /*referencedName*/ void 0 ); - case 172 /* ClassStaticBlockDeclaration */: - case 169 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: return Debug.fail("Use `classElementVisitor` instead."); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return visitBindingElement(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); case 80 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -90122,20 +90179,20 @@ /*referencedName*/ void 0 ); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, @@ -90152,21 +90209,21 @@ } function namedEvaluationVisitor(node, referencedName) { switch (node.kind) { - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ false, referencedName ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ false, referencedName ); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node, referencedName); default: return visitor(node); @@ -90174,26 +90231,26 @@ } function discardedValueVisitor(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -90207,9 +90264,9 @@ } function heritageClauseVisitor(node) { switch (node.kind) { - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -90217,8 +90274,8 @@ } function assignmentTargetVisitor(node) { switch (node.kind) { - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -90226,29 +90283,29 @@ } function classElementVisitor(node) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, visitMethodOrAccessorDeclaration, node ); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, visitPropertyDeclaration, node ); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return node; default: return isModifierLike(node) ? modifierVisitor(node) : visitor(node); @@ -90256,7 +90313,7 @@ } function propertyNameVisitor(node) { switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); default: return visitor(node); @@ -90264,10 +90321,10 @@ } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -91444,7 +91501,7 @@ return constructor; } const extendsClauseElement = getEffectiveBaseTypeNode(container); - const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */); + const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */); const parameters = visitParameterList(constructor ? constructor.parameters : void 0, visitor, context); const body = transformConstructorBody(container, constructor, isDerivedClass); if (!body) { @@ -91738,15 +91795,15 @@ function enableSubstitutionForClassStaticThisOrSuperReference() { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; - context.enableSubstitution(108 /* ThisKeyword */); - context.enableEmitNotification(259 /* FunctionDeclaration */); - context.enableEmitNotification(215 /* FunctionExpression */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(169 /* PropertyDeclaration */); - context.enableEmitNotification(164 /* ComputedPropertyName */); + context.enableSubstitution(109 /* ThisKeyword */); + context.enableEmitNotification(260 /* FunctionDeclaration */); + context.enableEmitNotification(216 /* FunctionExpression */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(170 /* PropertyDeclaration */); + context.enableEmitNotification(165 /* ComputedPropertyName */); } } function addInstanceMethodStatements(statements, methods, receiver) { @@ -92120,16 +92177,16 @@ return; } switch (node.kind) { - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) { break; } - case 259 /* FunctionDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - case 169 /* PropertyDeclaration */: { + case 260 /* FunctionDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: { const savedLexicalEnvironment = lexicalEnvironment; const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; lexicalEnvironment = void 0; @@ -92141,7 +92198,7 @@ lexicalEnvironment = savedLexicalEnvironment; return; } - case 164 /* ComputedPropertyName */: { + case 165 /* ComputedPropertyName */: { const savedLexicalEnvironment = lexicalEnvironment; const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; @@ -92165,7 +92222,7 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return substituteThisExpression(node); } return node; @@ -92238,7 +92295,7 @@ return !isGeneratedPrivateIdentifier(node) && node.escapedText === "#constructor"; } function isPrivateIdentifierInExpression(node) { - return isPrivateIdentifier(node.left) && node.operatorToken.kind === 101 /* InKeyword */; + return isPrivateIdentifier(node.left) && node.operatorToken.kind === 102 /* InKeyword */; } var init_classFields = __esm({ "src/compiler/transformers/classFields.ts"() { @@ -92281,15 +92338,15 @@ } function serializeTypeOfNode(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: - case 166 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 167 /* Parameter */: return serializeTypeNode(node.type); - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 171 /* MethodDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 172 /* MethodDeclaration */: return factory2.createIdentifier("Function"); default: return factory2.createVoidZero(); @@ -92316,7 +92373,7 @@ return factory2.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 174 /* GetAccessor */) { + if (container && node.kind === 175 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -92338,76 +92395,76 @@ } node = skipTypeParentheses(node); switch (node.kind) { - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: return factory2.createVoidZero(); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return factory2.createIdentifier("Function"); - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return factory2.createIdentifier("Array"); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean"); - case 134 /* BooleanKeyword */: + case 135 /* BooleanKeyword */: return factory2.createIdentifier("Boolean"); - case 200 /* TemplateLiteralType */: - case 152 /* StringKeyword */: + case 201 /* TemplateLiteralType */: + case 153 /* StringKeyword */: return factory2.createIdentifier("String"); - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return factory2.createIdentifier("Object"); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); - case 148 /* NumberKeyword */: + case 149 /* NumberKeyword */: return factory2.createIdentifier("Number"); - case 160 /* BigIntKeyword */: + case 161 /* BigIntKeyword */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 153 /* SymbolKeyword */: + case 154 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return serializeTypeReferenceNode(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ true ); - case 189 /* UnionType */: + case 190 /* UnionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ false ); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return serializeUnionOrIntersectionConstituents( [node.trueType, node.falseType], /*isIntersection*/ false ); - case 195 /* TypeOperator */: - if (node.operator === 146 /* ReadonlyKeyword */) { + case 196 /* TypeOperator */: + if (node.operator === 147 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 183 /* TypeQuery */: - case 196 /* IndexedAccessType */: - case 197 /* MappedType */: - case 184 /* TypeLiteral */: - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 194 /* ThisType */: - case 202 /* ImportType */: + case 184 /* TypeQuery */: + case 197 /* IndexedAccessType */: + case 198 /* MappedType */: + case 185 /* TypeLiteral */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 195 /* ThisType */: + case 203 /* ImportType */: break; - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: - case 320 /* JSDocFunctionType */: - case 321 /* JSDocVariadicType */: - case 322 /* JSDocNamepathType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: + case 321 /* JSDocFunctionType */: + case 322 /* JSDocVariadicType */: + case 323 /* JSDocNamepathType */: break; - case 317 /* JSDocNullableType */: - case 318 /* JSDocNonNullableType */: - case 319 /* JSDocOptionalType */: + case 318 /* JSDocNullableType */: + case 319 /* JSDocNonNullableType */: + case 320 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -92419,7 +92476,7 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return factory2.createIdentifier("String"); - case 221 /* PrefixUnaryExpression */: { + case 222 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 8 /* NumericLiteral */: @@ -92433,10 +92490,10 @@ return factory2.createIdentifier("Number"); case 9 /* BigIntLiteral */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: return factory2.createIdentifier("Boolean"); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return factory2.createVoidZero(); default: return Debug.failBadSyntaxKind(node); @@ -92446,20 +92503,20 @@ let serializedType; for (let typeNode of types) { typeNode = skipTypeParentheses(typeNode); - if (typeNode.kind === 144 /* NeverKeyword */) { + if (typeNode.kind === 145 /* NeverKeyword */) { if (isIntersection) return factory2.createVoidZero(); continue; } - if (typeNode.kind === 157 /* UnknownKeyword */) { + if (typeNode.kind === 158 /* UnknownKeyword */) { if (!isIntersection) return factory2.createIdentifier("Object"); continue; } - if (typeNode.kind === 131 /* AnyKeyword */) { + if (typeNode.kind === 132 /* AnyKeyword */) { return factory2.createIdentifier("Object"); } - if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 104 /* NullKeyword */ || typeNode.kind === 155 /* UndefinedKeyword */)) { + if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 156 /* UndefinedKeyword */)) { continue; } const serializedConstituent = serializeTypeNode(typeNode); @@ -92578,7 +92635,7 @@ name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -92634,23 +92691,23 @@ return node; } switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -93209,49 +93266,49 @@ return node; } switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return Debug.fail("Use `modifierVisitor` instead."); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression( node, /*referencedName*/ void 0 ); - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return Debug.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return visitBindingElement(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return visitThisExpression(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ false ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -93259,7 +93316,7 @@ /*referencedName*/ void 0 ); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ @@ -93267,28 +93324,28 @@ /*referencedName*/ void 0 ); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discard*/ false ); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: { + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: { enterOther(); const result = visitEachChild(node, fallbackVisitor, context); exitOther(); @@ -93300,7 +93357,7 @@ } function fallbackVisitor(node) { switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; default: return visitor(node); @@ -93308,7 +93365,7 @@ } function modifierVisitor(node) { switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; default: return node; @@ -93316,17 +93373,17 @@ } function classElementVisitor(node) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); default: return visitor(node); @@ -93334,21 +93391,21 @@ } function namedEvaluationVisitor(node, referencedName) { switch (node.kind) { - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ false, referencedName ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ false, referencedName ); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node, referencedName); default: return visitor(node); @@ -93356,26 +93413,26 @@ } function discardedValueVisitor(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -93501,7 +93558,7 @@ } } if (classDecorators && containsLexicalSuperInStaticInitializer(node)) { - const extendsClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const extendsClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); if (extendsExpression) { @@ -93537,7 +93594,7 @@ return node2; } switch (node2.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: if (!outerThis) { outerThis = factory2.createUniqueName("_outerThis", 16 /* Optimistic */); classDefinitionStatements.unshift(createLet(outerThis, factory2.createThis())); @@ -93557,7 +93614,7 @@ const initializerStatements = prepareConstructor(node, classInfo2); if (initializerStatements) { const extendsClauseElement = getEffectiveBaseTypeNode(node); - const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */); + const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */); const constructorStatements = []; if (isDerivedClass) { const spreadArguments = factory2.createSpreadElement(factory2.createIdentifier("arguments")); @@ -94145,7 +94202,7 @@ setterName = factory2.updateComputedPropertyName(name2, temp); } } - const modifiersWithoutAccessor = visitNodes2(modifiers, (node2) => node2.kind !== 127 /* AccessorKeyword */ ? node2 : void 0, isModifier); + const modifiersWithoutAccessor = visitNodes2(modifiers, (node2) => node2.kind !== 128 /* AccessorKeyword */ ? node2 : void 0, isModifier); const backingField = createAccessorPropertyBackingField(factory2, node, modifiersWithoutAccessor, initializer); setOriginalNode(backingField, node); setEmitFlags(backingField, 3072 /* NoComments */); @@ -94874,36 +94931,36 @@ return node; } switch (node.kind) { - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return void 0; - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return visitAwaitExpression(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 208 /* PropertyAccessExpression */: - if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 106 /* SuperKeyword */) { + case 209 /* PropertyAccessExpression */: + if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 209 /* ElementAccessExpression */: - if (capturedSuperProperties && node.expression.kind === 106 /* SuperKeyword */) { + case 210 /* ElementAccessExpression */: + if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 173 /* Constructor */: + case 174 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -94912,27 +94969,27 @@ function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 238 /* Block */: - case 252 /* SwitchStatement */: - case 266 /* CaseBlock */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 255 /* TryStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 242 /* IfStatement */: - case 251 /* WithStatement */: - case 253 /* LabeledStatement */: + case 239 /* Block */: + case 253 /* SwitchStatement */: + case 267 /* CaseBlock */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 256 /* TryStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 243 /* IfStatement */: + case 252 /* WithStatement */: + case 254 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -95209,7 +95266,7 @@ const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 216 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 217 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = /* @__PURE__ */ new Set(); @@ -95308,15 +95365,15 @@ function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); - context.enableEmitNotification(260 /* ClassDeclaration */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(240 /* VariableStatement */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); + context.enableEmitNotification(261 /* ClassDeclaration */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(241 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -95347,17 +95404,17 @@ } function substituteExpression(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), @@ -95369,7 +95426,7 @@ return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return createSuperElementAccessInAsyncMethod( node.argumentExpression, node @@ -95395,7 +95452,7 @@ } function isSuperContainer(node) { const kind = node.kind; - return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 261 /* ClassDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -95619,7 +95676,7 @@ ); } function visitorNoAsyncModifier(node) { - if (node.kind === 132 /* AsyncKeyword */) { + if (node.kind === 133 /* AsyncKeyword */) { return void 0; } return node; @@ -95641,119 +95698,119 @@ return node; } switch (node.kind) { - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return visitAwaitExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 246 /* ForInStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 247 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return visitVoidExpression(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 208 /* PropertyAccessExpression */: - if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 106 /* SuperKeyword */) { + case 209 /* PropertyAccessExpression */: + if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 209 /* ElementAccessExpression */: - if (capturedSuperProperties && node.expression.kind === 106 /* SuperKeyword */) { + case 210 /* ElementAccessExpression */: + if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -95838,7 +95895,7 @@ function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 247 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 248 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -95849,7 +95906,7 @@ let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 301 /* SpreadAssignment */) { + if (e.kind === 302 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -95857,7 +95914,7 @@ const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 299 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 300 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -95868,7 +95925,7 @@ function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 207 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 208 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -96656,15 +96713,15 @@ function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); - context.enableEmitNotification(260 /* ClassDeclaration */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(240 /* VariableStatement */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); + context.enableEmitNotification(261 /* ClassDeclaration */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(241 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -96695,17 +96752,17 @@ } function substituteExpression(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), @@ -96717,7 +96774,7 @@ return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return createSuperElementAccessInAsyncMethod( node.argumentExpression, node @@ -96743,7 +96800,7 @@ } function isSuperContainer(node) { const kind = node.kind; - return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 261 /* ClassDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -96794,7 +96851,7 @@ return node; } switch (node.kind) { - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -96839,7 +96896,7 @@ return node; } switch (node.kind) { - case 210 /* CallExpression */: { + case 211 /* CallExpression */: { const updated = visitNonOptionalCallExpression( node, /*captureThisArg*/ @@ -96848,8 +96905,8 @@ Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression( node, @@ -96862,12 +96919,12 @@ return updated; } return visitEachChild(node, visitor, context); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (node.operatorToken.kind === 60 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -96905,7 +96962,7 @@ thisArg = expression; } } - expression = node.kind === 208 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 209 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -96941,12 +96998,12 @@ } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -96972,8 +97029,8 @@ for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -96982,9 +97039,9 @@ thisArg = rightExpression; } } - rightExpression = segment.kind === 208 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 209 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -96992,7 +97049,7 @@ } rightExpression = factory2.createFunctionCallCall( rightExpression, - leftThisArg.kind === 106 /* SuperKeyword */ ? factory2.createThis() : leftThisArg, + leftThisArg.kind === 107 /* SuperKeyword */ ? factory2.createThis() : leftThisArg, visitNodes2(segment.arguments, visitor, isExpression) ); } else { @@ -97342,25 +97399,25 @@ } function visitorWorker(node) { switch (node.kind) { - case 281 /* JsxElement */: + case 282 /* JsxElement */: return visitJsxElement( node, /*isChild*/ false ); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ false ); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ false ); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -97370,21 +97427,21 @@ switch (node.kind) { case 11 /* JsxText */: return visitJsxText(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return visitJsxExpression(node); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return visitJsxElement( node, /*isChild*/ true ); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ true ); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ @@ -97610,7 +97667,7 @@ const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 291 /* JsxExpression */) { + if (node.kind === 292 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -97684,7 +97741,7 @@ return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 281 /* JsxElement */) { + if (node.kind === 282 /* JsxElement */) { return getTagName(node.openingElement); } else { const name = node.tagName; @@ -97990,7 +98047,7 @@ return node; } switch (node.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -98124,7 +98181,7 @@ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 250 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 251 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -98179,7 +98236,7 @@ return node; } function callExpressionVisitor(node) { - if (node.kind === 106 /* SuperKeyword */) { + if (node.kind === 107 /* SuperKeyword */) { return visitSuperKeyword( /*isExpressionOfCall*/ true @@ -98189,87 +98246,87 @@ } function visitorWorker(node, expressionResultIsUnused2) { switch (node.kind) { - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: return void 0; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return visitArrowFunction(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); case 79 /* Identifier */: return visitIdentifier(node); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return visitCaseBlock(node); - case 238 /* Block */: + case 239 /* Block */: return visitBlock( node, /*isFunctionBody*/ false ); - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return visitDoOrWhileStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: @@ -98280,33 +98337,33 @@ return visitStringLiteral(node); case 8 /* NumericLiteral */: return visitNumericLiteral(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return visitTemplateExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return visitSpreadElement(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return visitSuperKeyword( /*isExpressionOfCall*/ false ); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return visitThisKeyword(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return visitMetaProperty(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return visitAccessorDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -98414,13 +98471,13 @@ } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 249 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 250 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump; if (!canUseBreakOrContinue) { let labelMarker; const label = node.label; if (!label) { - if (node.kind === 249 /* BreakStatement */) { + if (node.kind === 250 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -98428,7 +98485,7 @@ labelMarker = "continue"; } } else { - if (node.kind === 249 /* BreakStatement */) { + if (node.kind === 250 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump( convertedLoopState, @@ -98640,7 +98697,7 @@ return block; } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { - const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */; + const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */; if (!constructor) return createDefaultConstructorBody(node, isDerivedClass); const prologue = []; @@ -98749,14 +98806,14 @@ }; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 250 /* ReturnStatement */) { + if (statement.kind === 251 /* ReturnStatement */) { return true; - } else if (statement.kind === 242 /* IfStatement */) { + } else if (statement.kind === 243 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 238 /* Block */) { + } else if (statement.kind === 239 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -99030,7 +99087,7 @@ return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 216 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 217 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } @@ -99072,27 +99129,27 @@ if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return statements; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 173 /* Constructor */: + case 174 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), "constructor" ); break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), factory2.createBinaryExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), - 102 /* InstanceOfKeyword */, + 103 /* InstanceOfKeyword */, factory2.getLocalName(node) ) ), @@ -99135,21 +99192,21 @@ function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 173 /* Constructor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 173 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -99356,7 +99413,7 @@ const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -99417,7 +99474,7 @@ multiLine = true; } } else { - Debug.assert(node.kind === 216 /* ArrowFunction */); + Debug.assert(node.kind === 217 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -99643,14 +99700,14 @@ } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -100000,7 +100057,7 @@ let numInitialProperties = -1, hasComputed = false; for (let i = 0; i < properties.length; i++) { const property = properties[i]; - if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 164 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 165 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -100122,15 +100179,15 @@ } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -100182,11 +100239,11 @@ function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 258 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 259 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -100625,20 +100682,20 @@ for (let i = start; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -100764,7 +100821,7 @@ let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -100807,7 +100864,7 @@ return visitTypeScriptClassWrapper(node); } const expression = skipOuterExpressions(node.expression); - if (expression.kind === 106 /* SuperKeyword */ || isSuperProperty(expression) || some(node.arguments, isSpreadElement)) { + if (expression.kind === 107 /* SuperKeyword */ || isSuperProperty(expression) || some(node.arguments, isSpreadElement)) { return visitCallExpressionWithPotentialCapturedThisAssignment( node, /*assignToCapturedThis*/ @@ -100927,16 +100984,16 @@ ); } function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { - if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 106 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { + if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 107 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { const { target, thisArg } = factory2.createCallBinding(node.expression, hoistVariableDeclaration); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { setEmitFlags(thisArg, 8 /* NoSubstitution */); } let resultingCall; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { resultingCall = factory2.createFunctionApplyCall( Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)), - node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), + node.expression.kind === 107 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), transformAndSpreadElements( node.arguments, /*isArgumentList*/ @@ -100951,13 +101008,13 @@ resultingCall = setTextRange( factory2.createFunctionCallCall( Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)), - node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), + node.expression.kind === 107 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), visitNodes2(node.arguments, visitor, isExpression) ), node ); } - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { const initializer = factory2.createLogicalOr( resultingCall, createActualThis() @@ -101100,7 +101157,7 @@ return hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), "prototype") : factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); } function visitMetaProperty(node) { - if (node.keywordToken === 103 /* NewKeyword */ && node.name.escapedText === "target") { + if (node.keywordToken === 104 /* NewKeyword */ && node.name.escapedText === "target") { hierarchyFacts |= 32768 /* NewTarget */; return factory2.createUniqueName("_newTarget", 16 /* Optimistic */ | 32 /* FileLevel */); } @@ -101127,14 +101184,14 @@ function enableSubstitutionsForCapturedThis() { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; - context.enableSubstitution(108 /* ThisKeyword */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(216 /* ArrowFunction */); - context.enableEmitNotification(215 /* FunctionExpression */); - context.enableEmitNotification(259 /* FunctionDeclaration */); + context.enableSubstitution(109 /* ThisKeyword */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(217 /* ArrowFunction */); + context.enableEmitNotification(216 /* FunctionExpression */); + context.enableEmitNotification(260 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -101158,10 +101215,10 @@ } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 258 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -101170,7 +101227,7 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return substituteThisKeyword(node); } return node; @@ -101218,19 +101275,19 @@ return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 241 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 242 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 210 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 211 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; - if (!nodeIsSynthesized(callTarget) || callTarget.kind !== 106 /* SuperKeyword */) { + if (!nodeIsSynthesized(callTarget) || callTarget.kind !== 107 /* SuperKeyword */) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 227 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 228 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -101253,24 +101310,24 @@ if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(283 /* JsxOpeningElement */); - context.enableEmitNotification(284 /* JsxClosingElement */); - context.enableEmitNotification(282 /* JsxSelfClosingElement */); + context.enableEmitNotification(284 /* JsxOpeningElement */); + context.enableEmitNotification(285 /* JsxClosingElement */); + context.enableEmitNotification(283 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(299 /* PropertyAssignment */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(300 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: + case 283 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -101308,7 +101365,7 @@ } function trySubstituteReservedName(name) { const token = identifierToKeywordKind(name); - if (token !== void 0 && token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */) { + if (token !== void 0 && token >= 82 /* FirstReservedWord */ && token <= 117 /* LastReservedWord */) { return setTextRange(factory2.createStringLiteralFromNode(name), name); } return void 0; @@ -101402,13 +101459,13 @@ } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 243 /* DoStatement */: + case 244 /* DoStatement */: return visitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return visitWhileStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -101416,24 +101473,24 @@ } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return visitAccessorDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return visitBreakStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return visitContinueStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -101447,23 +101504,23 @@ } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return visitConditionalExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -101471,9 +101528,9 @@ } function visitGenerator(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -101658,14 +101715,14 @@ if (containsYield(right)) { let target; switch (left.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), left.name ); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), @@ -101998,35 +102055,35 @@ } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 238 /* Block */: + case 239 /* Block */: return transformAndEmitBlock(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return transformAndEmitIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return transformAndEmitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return transformAndEmitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return transformAndEmitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -102250,7 +102307,7 @@ markLabel(conditionLabel); emitBreakWhenFalse(endLoopLabel, factory2.createLessThan(keysIndex, factory2.createPropertyAccessExpression(keysArray, "length"))); emitAssignment(key, factory2.createElementAccessExpression(keysArray, keysIndex)); - emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key, 101 /* InKeyword */, obj)); + emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key, 102 /* InKeyword */, obj)); let variable; if (isVariableDeclarationList(initializer)) { for (const variable2 of initializer.declarations) { @@ -102378,7 +102435,7 @@ for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 293 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 294 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -102388,7 +102445,7 @@ let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -103362,12 +103419,12 @@ const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(212 /* TaggedTemplateExpression */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(213 /* TaggedTemplateExpression */); context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(223 /* BinaryExpression */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(224 /* BinaryExpression */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(309 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; let currentSourceFile; @@ -103780,23 +103837,23 @@ } function topLevelVisitor(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 358 /* MergeDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 359 /* EndOfDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -103807,26 +103864,26 @@ return node; } switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -103849,24 +103906,24 @@ if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -104699,7 +104756,7 @@ } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 240 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 241 /* VariableStatement */) { const id = getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -104731,10 +104788,10 @@ const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration( statements, @@ -104905,14 +104962,14 @@ } function modifierVisitor(node) { switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return void 0; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -104950,11 +105007,11 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -105007,7 +105064,7 @@ return node; } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 308 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 309 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -105101,10 +105158,10 @@ context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableSubstitution(223 /* BinaryExpression */); - context.enableSubstitution(233 /* MetaProperty */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableSubstitution(224 /* BinaryExpression */); + context.enableSubstitution(234 /* MetaProperty */); + context.enableEmitNotification(309 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; const exportFunctionsMap = []; @@ -105292,7 +105349,7 @@ if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 275 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 276 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -105440,11 +105497,11 @@ for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -105467,7 +105524,7 @@ ); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -105562,13 +105619,13 @@ } function topLevelVisitor(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -105738,7 +105795,7 @@ } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 308 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 309 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -105775,7 +105832,7 @@ return isExportedDeclaration ? createExportExpression(name, preventSubstitution(setTextRange(factory2.createAssignment(name, value), location))) : preventSubstitution(setTextRange(factory2.createAssignment(name, value), location)); } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 240 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 241 /* VariableStatement */) { const id = getOriginalNodeId(node); const isExportedDeclaration = hasSyntacticModifier(node.original, 1 /* Export */); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -105813,10 +105870,10 @@ const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -105916,47 +105973,47 @@ } function topLevelNestedVisitor(node) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return visitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return visitWhileStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return visitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return visitCaseBlock(node); - case 292 /* CaseClause */: + case 293 /* CaseClause */: return visitCaseClause(node); - case 293 /* DefaultClause */: + case 294 /* DefaultClause */: return visitDefaultClause(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return visitTryStatement(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 238 /* Block */: + case 239 /* Block */: return visitBlock(node); - case 358 /* MergeDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 359 /* EndOfDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -106102,30 +106159,30 @@ return node; } switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -106198,7 +106255,7 @@ return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 308 /* SourceFile */; + return container !== void 0 && container.kind === 309 /* SourceFile */; } else { return false; } @@ -106235,14 +106292,14 @@ } function modifierVisitor(node) { switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return void 0; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -106276,7 +106333,7 @@ } function substituteUnspecified(node) { switch (node.kind) { - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -106320,9 +106377,9 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return substituteBinaryExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -106391,7 +106448,7 @@ /*prefixLocals*/ false ); - if (exportContainer && exportContainer.kind === 308 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 309 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); @@ -106430,7 +106487,7 @@ const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(308 /* SourceFile */); + context.enableEmitNotification(309 /* SourceFile */); context.enableSubstitution(79 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -106478,11 +106535,11 @@ } function visitor(node) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -106532,7 +106589,7 @@ /*typeArguments*/ void 0, [ - factory2.createPropertyAccessExpression(factory2.createMetaProperty(100 /* ImportKeyword */, factory2.createIdentifier("meta")), factory2.createIdentifier("url")) + factory2.createPropertyAccessExpression(factory2.createMetaProperty(101 /* ImportKeyword */, factory2.createIdentifier("meta")), factory2.createIdentifier("url")) ] ) ) @@ -106693,8 +106750,8 @@ const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(308 /* SourceFile */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(309 /* SourceFile */); + context.enableEmitNotification(309 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -106737,7 +106794,7 @@ return result; } function transformSourceFileOrBundle(node) { - return node.kind === 308 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 309 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -106773,7 +106830,7 @@ function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -106790,7 +106847,7 @@ function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; @@ -106821,12 +106878,12 @@ return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`); } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 170 /* PropertyDeclaration */ || node.kind === 209 /* PropertyAccessExpression */ || node.kind === 169 /* PropertySignature */ || node.kind === 167 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */ || node.kind === 166 /* Parameter */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */ || node.kind === 167 /* Parameter */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -106843,7 +106900,7 @@ } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 175 /* SetAccessor */) { + if (node.kind === 176 /* SetAccessor */) { if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1; } else { @@ -106865,26 +106922,26 @@ function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -106905,29 +106962,29 @@ } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 177 /* ConstructSignature */: - case 182 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 183 /* ConstructorType */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 176 /* CallSignature */: + case 177 /* CallSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node.parent)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 259 /* FunctionDeclaration */: - case 181 /* FunctionType */: + case 260 /* FunctionDeclaration */: + case 182 /* FunctionType */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1; default: return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`); @@ -106936,40 +106993,40 @@ function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 197 /* MappedType */: + case 198 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node.parent)) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 261 /* ClassDeclaration */) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 181 /* FunctionType */: - case 259 /* FunctionDeclaration */: + case 182 /* FunctionType */: + case 260 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 192 /* InferType */: + case 193 /* InferType */: diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; break; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -106984,7 +107041,7 @@ function getHeritageClauseVisibilityError() { let diagnosticMessage; if (isClassDeclaration(node.parent.parent)) { - diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 117 /* ImplementsKeyword */ ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 118 /* ImplementsKeyword */ ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; } @@ -107037,7 +107094,7 @@ } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 166 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 167 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -107268,10 +107325,10 @@ return result; } function transformRoot(node) { - if (node.kind === 308 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 309 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 309 /* Bundle */) { + if (node.kind === 310 /* Bundle */) { isBundledEmit = true; refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); @@ -107303,7 +107360,7 @@ const newFile = factory2.updateSourceFile( sourceFile, [factory2.createModuleDeclaration( - [factory2.createModifier(136 /* DeclareKeyword */)], + [factory2.createModifier(137 /* DeclareKeyword */)], factory2.createStringLiteral(getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), factory2.createModuleBlock(setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)) )], @@ -107338,7 +107395,7 @@ ); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 311 /* InputFiles */) { + if (prepend.kind === 312 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -107506,14 +107563,14 @@ if (name.kind === 79 /* Identifier */) { return name; } else { - if (name.kind === 204 /* ArrayBindingPattern */) { + if (name.kind === 205 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 229 /* OmittedExpression */) { + if (elem.kind === 230 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { @@ -107577,15 +107634,15 @@ if (shouldPrintWithInitializer(node)) { return; } - const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 167 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } if (!getParseTreeNode(node)) { - return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */); + return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(132 /* AnyKeyword */); } - if (node.kind === 175 /* SetAccessor */) { - return factory2.createKeywordTypeNode(131 /* AnyKeyword */); + if (node.kind === 176 /* SetAccessor */) { + return factory2.createKeywordTypeNode(132 /* AnyKeyword */); } errorNameNode = node.name; let oldDiag; @@ -107593,10 +107650,10 @@ oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 166 /* Parameter */ || node.kind === 169 /* PropertyDeclaration */ || node.kind === 168 /* PropertySignature */) { + if (node.kind === 167 /* Parameter */ || node.kind === 170 /* PropertyDeclaration */ || node.kind === 169 /* PropertySignature */) { if (isPropertySignature(node) || !node.initializer) return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); @@ -107607,27 +107664,27 @@ if (!suppressNewDiagnosticContexts) { getSymbolAccessibilityDiagnostic = oldDiag; } - return returnValue || factory2.createKeywordTypeNode(131 /* AnyKeyword */); + return returnValue || factory2.createKeywordTypeNode(132 /* AnyKeyword */); } } function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: return !resolver.isDeclarationVisible(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: return false; - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -107715,7 +107772,7 @@ function rewriteModuleSpecifier(parent2, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 264 /* ModuleDeclaration */ && parent2.kind !== 202 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 265 /* ModuleDeclaration */ && parent2.kind !== 203 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); @@ -107734,7 +107791,7 @@ function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 281 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -107771,7 +107828,7 @@ void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 272 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 @@ -107874,7 +107931,7 @@ const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 184 /* TypeLiteral */ || input.kind === 197 /* MappedType */) && input.parent.kind !== 262 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 185 /* TypeLiteral */ || input.kind === 198 /* MappedType */) && input.parent.kind !== 263 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -107902,26 +107959,26 @@ } if (isProcessedComponent(input)) { switch (input.kind) { - case 230 /* ExpressionWithTypeArguments */: { + case 231 /* ExpressionWithTypeArguments */: { if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) { checkEntityNameVisibility(input.expression, enclosingDeclaration); } const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); } - case 180 /* TypeReference */: { + case 181 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 173 /* Constructor */: { + case 174 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( /*modifiers*/ ensureModifiers(input), @@ -107931,7 +107988,7 @@ ); return cleanup(ctor); } - case 171 /* MethodDeclaration */: { + case 172 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -107952,7 +108009,7 @@ ); return cleanup(sig); } - case 174 /* GetAccessor */: { + case 175 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -107970,7 +108027,7 @@ void 0 )); } - case 175 /* SetAccessor */: { + case 176 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -107986,7 +108043,7 @@ void 0 )); } - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108001,7 +108058,7 @@ ensureType(input, input.type), ensureNoInitializer(input) )); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108015,7 +108072,7 @@ input.questionToken, ensureType(input, input.type) )); - case 170 /* MethodSignature */: { + case 171 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108032,7 +108089,7 @@ ensureType(input, input.type) )); } - case 176 /* CallSignature */: { + case 177 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -108040,15 +108097,15 @@ ensureType(input, input.type) )); } - case 178 /* IndexSignature */: { + case 179 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), updateParamsList(input, input.parameters), - visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(132 /* AnyKeyword */) )); } - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -108063,7 +108120,7 @@ ensureNoInitializer(input) )); } - case 165 /* TypeParameter */: { + case 166 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration( input, @@ -108077,7 +108134,7 @@ } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 191 /* ConditionalType */: { + case 192 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); const oldEnclosingDecl = enclosingDeclaration; @@ -108091,13 +108148,13 @@ Debug.assert(falseType); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 181 /* FunctionType */: { + case 182 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 182 /* ConstructorType */: { + case 183 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 202 /* ImportType */: { + case 203 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -108137,7 +108194,7 @@ } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 171 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 172 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -108146,7 +108203,7 @@ if (shouldStripInternal(input)) return; switch (input.kind) { - case 275 /* ExportDeclaration */: { + case 276 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -108160,7 +108217,7 @@ getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -108183,7 +108240,7 @@ void 0 ); errorFallbackNode = void 0; - const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(136 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); + const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(137 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); preserveJsDoc(statement, input); removeAllComments(input); return [statement, factory2.updateExportAssignment(input, input.modifiers, newId)]; @@ -108209,10 +108266,10 @@ if (shouldStripInternal(input)) return; switch (input.kind) { - case 268 /* ImportEqualsDeclaration */: { + case 269 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 269 /* ImportDeclaration */: { + case 270 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -108232,7 +108289,7 @@ } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 262 /* TypeAliasDeclaration */: { + case 263 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -108244,7 +108301,7 @@ needsDeclare = previousNeedsDeclare; return clean2; } - case 261 /* InterfaceDeclaration */: { + case 262 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -108254,7 +108311,7 @@ visitNodes2(input.members, visitDeclarationSubtree, isTypeElement) )); } - case 259 /* FunctionDeclaration */: { + case 260 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -108301,7 +108358,7 @@ /*initializer*/ void 0 ); - return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(93 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); + return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(94 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); }); if (!exportMappings.length) { declarations = mapDefined(declarations, (declaration) => factory2.updateModifiers(declaration, 0 /* None */)); @@ -108360,10 +108417,10 @@ return clean2; } } - case 264 /* ModuleDeclaration */: { + case 265 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 265 /* ModuleBlock */) { + if (inner && inner.kind === 266 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; @@ -108407,7 +108464,7 @@ )); } } - case 260 /* ClassDeclaration */: { + case 261 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -108476,7 +108533,7 @@ const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement)); const members = factory2.createNodeArray(memberNodes); const extendsClause = getEffectiveBaseTypeNode(input); - if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) { + if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 105 /* NullKeyword */) { const oldId = input.name ? unescapeLeadingUnderscores(input.name.escapedText) : "default"; const newId = factory2.createUniqueName(`${oldId}_base`, 16 /* Optimistic */); getSymbolAccessibilityDiagnostic = () => ({ @@ -108492,16 +108549,16 @@ /*initializer*/ void 0 ); - const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(136 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); + const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(137 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); const heritageClauses = factory2.createNodeArray(map(input.heritageClauses, (clause) => { - if (clause.token === 94 /* ExtendsKeyword */) { + if (clause.token === 95 /* ExtendsKeyword */) { const oldDiag2 = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]); const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode)))); getSymbolAccessibilityDiagnostic = oldDiag2; return newClause; } - return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); + return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 105 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); })); return [statement, cleanup(factory2.updateClassDeclaration( input, @@ -108523,10 +108580,10 @@ )); } } - case 240 /* VariableStatement */: { + case 241 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 263 /* EnumDeclaration */: { + case 264 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -108543,7 +108600,7 @@ if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 264 /* ModuleDeclaration */) { + if (input.kind === 265 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -108566,7 +108623,7 @@ return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 229 /* OmittedExpression */) { + if (e.kind === 230 /* OmittedExpression */) { return; } if (e.name) { @@ -108626,7 +108683,7 @@ function ensureModifierFlags(node) { let mask2 = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; - const parentIsFile = node.parent.kind === 308 /* SourceFile */; + const parentIsFile = node.parent.kind === 309 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask2 ^= 2 /* Ambient */; additions = 0 /* None */; @@ -108647,12 +108704,12 @@ } function transformHeritageClauses(nodes) { return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => { - return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */; + return isEntityNameExpression(t.expression) || clause.token === 95 /* ExtendsKeyword */ && t.expression.kind === 105 /* NullKeyword */; })), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length)); } } function isAlwaysType(node) { - if (node.kind === 261 /* InterfaceDeclaration */) { + if (node.kind === 262 /* InterfaceDeclaration */) { return true; } return false; @@ -108672,57 +108729,57 @@ } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 174 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 175 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 166 /* Parameter */: - case 257 /* VariableDeclaration */: + case 167 /* Parameter */: + case 258 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 240 /* VariableStatement */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 241 /* VariableStatement */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 177 /* ConstructSignature */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 178 /* IndexSignature */: - case 257 /* VariableDeclaration */: - case 165 /* TypeParameter */: - case 230 /* ExpressionWithTypeArguments */: - case 180 /* TypeReference */: - case 191 /* ConditionalType */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 202 /* ImportType */: + case 178 /* ConstructSignature */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 179 /* IndexSignature */: + case 258 /* VariableDeclaration */: + case 166 /* TypeParameter */: + case 231 /* ExpressionWithTypeArguments */: + case 181 /* TypeReference */: + case 192 /* ConditionalType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 203 /* ImportType */: return true; } return false; @@ -108839,7 +108896,7 @@ } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a2, _b; - const enabledSyntaxKindFeatures = new Array(361 /* Count */); + const enabledSyntaxKindFeatures = new Array(362 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -108918,7 +108975,7 @@ state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 308 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); + (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 309 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); (_b = tracing) == null ? void 0 : _b.pop(); } @@ -109246,7 +109303,7 @@ } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 309 /* Bundle */) { + if (sourceFile.kind === 310 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -109638,8 +109695,8 @@ } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, mapOptions) { const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 309 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 308 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 310 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 309 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -109701,7 +109758,7 @@ writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 308 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 309 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -110023,11 +110080,11 @@ break; } switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return printFile(node); - case 309 /* Bundle */: + case 310 /* Bundle */: return printBundle(node); - case 310 /* UnparsedSource */: + case 311 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -110406,301 +110463,301 @@ return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return emitQualifiedName(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return emitTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return emitParameter(node); - case 167 /* Decorator */: + case 168 /* Decorator */: return emitDecorator(node); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return emitPropertySignature(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 170 /* MethodSignature */: + case 171 /* MethodSignature */: return emitMethodSignature(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return emitConstructor(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return emitAccessorDeclaration(node); - case 176 /* CallSignature */: + case 177 /* CallSignature */: return emitCallSignature(node); - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return emitConstructSignature(node); - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return emitIndexSignature(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return emitTypePredicate(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return emitTypeReference(node); - case 181 /* FunctionType */: + case 182 /* FunctionType */: return emitFunctionType(node); - case 182 /* ConstructorType */: + case 183 /* ConstructorType */: return emitConstructorType(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return emitTypeQuery(node); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return emitTypeLiteral(node); - case 185 /* ArrayType */: + case 186 /* ArrayType */: return emitArrayType(node); - case 186 /* TupleType */: + case 187 /* TupleType */: return emitTupleType(node); - case 187 /* OptionalType */: + case 188 /* OptionalType */: return emitOptionalType(node); - case 189 /* UnionType */: + case 190 /* UnionType */: return emitUnionType(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return emitIntersectionType(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return emitConditionalType(node); - case 192 /* InferType */: + case 193 /* InferType */: return emitInferType(node); - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return emitParenthesizedType(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 194 /* ThisType */: + case 195 /* ThisType */: return emitThisType(); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return emitTypeOperator(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return emitMappedType(node); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return emitLiteralType(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return emitTemplateType(node); - case 201 /* TemplateLiteralTypeSpan */: + case 202 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return emitImportTypeNode(node); - case 203 /* ObjectBindingPattern */: + case 204 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return emitBindingElement(node); - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return emitTemplateSpan(node); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 238 /* Block */: + case 239 /* Block */: return emitBlock(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return emitVariableStatement(node); - case 239 /* EmptyStatement */: + case 240 /* EmptyStatement */: return emitEmptyStatement( /*isEmbeddedStatement*/ false ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return emitExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return emitIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return emitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return emitWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return emitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return emitForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return emitForOfStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return emitContinueStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return emitBreakStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return emitReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return emitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return emitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return emitLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return emitThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return emitTryStatement(node); - case 256 /* DebuggerStatement */: + case 257 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return emitClassDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return emitModuleBlock(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return emitCaseBlock(node); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return emitImportDeclaration(node); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return emitImportClause(node); - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return emitNamespaceImport(node); - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return emitNamespaceExport(node); - case 272 /* NamedImports */: + case 273 /* NamedImports */: return emitNamedImports(node); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return emitImportSpecifier(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return emitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return emitExportDeclaration(node); - case 276 /* NamedExports */: + case 277 /* NamedExports */: return emitNamedExports(node); - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return emitExportSpecifier(node); - case 296 /* AssertClause */: + case 297 /* AssertClause */: return emitAssertClause(node); - case 297 /* AssertEntry */: + case 298 /* AssertEntry */: return emitAssertEntry(node); - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return; - case 280 /* ExternalModuleReference */: + case 281 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 11 /* JsxText */: return emitJsxText(node); - case 283 /* JsxOpeningElement */: - case 286 /* JsxOpeningFragment */: + case 284 /* JsxOpeningElement */: + case 287 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 284 /* JsxClosingElement */: - case 287 /* JsxClosingFragment */: + case 285 /* JsxClosingElement */: + case 288 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return emitJsxAttribute(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return emitJsxAttributes(node); - case 290 /* JsxSpreadAttribute */: + case 291 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return emitJsxExpression(node); - case 292 /* CaseClause */: + case 293 /* CaseClause */: return emitCaseClause(node); - case 293 /* DefaultClause */: + case 294 /* DefaultClause */: return emitDefaultClause(node); - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return emitHeritageClause(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return emitCatchClause(node); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 302 /* EnumMember */: + case 303 /* EnumMember */: return emitEnumMember(node); - case 303 /* UnparsedPrologue */: + case 304 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 310 /* UnparsedSource */: - case 304 /* UnparsedPrepend */: + case 311 /* UnparsedSource */: + case 305 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 305 /* UnparsedText */: - case 306 /* UnparsedInternalText */: + case 306 /* UnparsedText */: + case 307 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 307 /* UnparsedSyntheticReference */: + case 308 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 308 /* SourceFile */: + case 309 /* SourceFile */: return emitSourceFile(node); - case 309 /* Bundle */: + case 310 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 311 /* InputFiles */: + case 312 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 312 /* JSDocTypeExpression */: + case 313 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 313 /* JSDocNameReference */: + case 314 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 315 /* JSDocAllType */: + case 316 /* JSDocAllType */: return writePunctuation("*"); - case 316 /* JSDocUnknownType */: + case 317 /* JSDocUnknownType */: return writePunctuation("?"); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 318 /* JSDocNonNullableType */: + case 319 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 188 /* RestType */: - case 321 /* JSDocVariadicType */: + case 189 /* RestType */: + case 322 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 322 /* JSDocNamepathType */: + case 323 /* JSDocNamepathType */: return; - case 323 /* JSDoc */: + case 324 /* JSDoc */: return emitJSDoc(node); - case 325 /* JSDocTypeLiteral */: + case 326 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 326 /* JSDocSignature */: + case 327 /* JSDocSignature */: return emitJSDocSignature(node); - case 330 /* JSDocTag */: - case 335 /* JSDocClassTag */: - case 340 /* JSDocOverrideTag */: + case 331 /* JSDocTag */: + case 336 /* JSDocClassTag */: + case 341 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 331 /* JSDocAugmentsTag */: - case 332 /* JSDocImplementsTag */: + case 332 /* JSDocAugmentsTag */: + case 333 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 333 /* JSDocAuthorTag */: - case 334 /* JSDocDeprecatedTag */: + case 334 /* JSDocAuthorTag */: + case 335 /* JSDocDeprecatedTag */: return; - case 336 /* JSDocPublicTag */: - case 337 /* JSDocPrivateTag */: - case 338 /* JSDocProtectedTag */: - case 339 /* JSDocReadonlyTag */: + case 337 /* JSDocPublicTag */: + case 338 /* JSDocPrivateTag */: + case 339 /* JSDocProtectedTag */: + case 340 /* JSDocReadonlyTag */: return; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return emitJSDocOverloadTag(node); - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 343 /* JSDocEnumTag */: - case 345 /* JSDocReturnTag */: - case 346 /* JSDocThisTag */: - case 347 /* JSDocTypeTag */: - case 352 /* JSDocThrowsTag */: - case 353 /* JSDocSatisfiesTag */: + case 344 /* JSDocEnumTag */: + case 346 /* JSDocReturnTag */: + case 347 /* JSDocThisTag */: + case 348 /* JSDocTypeTag */: + case 353 /* JSDocThrowsTag */: + case 354 /* JSDocSatisfiesTag */: return emitJSDocSimpleTypedTag(node); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 350 /* JSDocSeeTag */: + case 351 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 355 /* NotEmittedStatement */: - case 359 /* EndOfDeclarationMarker */: - case 358 /* MergeDeclarationMarker */: + case 356 /* NotEmittedStatement */: + case 360 /* EndOfDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return; } if (isExpression(node)) { @@ -110733,86 +110790,86 @@ return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return emitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return emitNewExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return emitFunctionExpression(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return emitArrowFunction(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return emitDeleteExpression(node); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return emitVoidExpression(node); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return emitAwaitExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return emitBinaryExpression(node); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return emitConditionalExpression(node); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return emitTemplateExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return emitYieldExpression(node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return emitSpreadElement(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return emitClassExpression(node); - case 229 /* OmittedExpression */: + case 230 /* OmittedExpression */: return; - case 231 /* AsExpression */: + case 232 /* AsExpression */: return emitAsExpression(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return emitNonNullExpression(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return emitMetaProperty(node); - case 234 /* SyntheticExpression */: + case 235 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return; - case 281 /* JsxElement */: + case 282 /* JsxElement */: return emitJsxElement(node); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return emitJsxFragment(node); - case 354 /* SyntaxList */: + case 355 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 355 /* NotEmittedStatement */: + case 356 /* NotEmittedStatement */: return; - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return emitCommaList(node); - case 358 /* MergeDeclarationMarker */: - case 359 /* EndOfDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return; - case 360 /* SyntheticReferenceExpression */: + case 361 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -110858,7 +110915,7 @@ } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 309 /* Bundle */ ? node : void 0; + const bundle = node.kind === 310 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -110933,7 +110990,7 @@ updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 305 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 306 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -110969,7 +111026,7 @@ } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 239 /* EmptyStatement */, + node.kind === 240 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -111041,7 +111098,7 @@ emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 320 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 321 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -111117,7 +111174,7 @@ /*allowDecorators*/ true ); - const token = node.kind === 174 /* GetAccessor */ ? 137 /* GetKeyword */ : 151 /* SetKeyword */; + const token = node.kind === 175 /* GetAccessor */ ? 138 /* GetKeyword */ : 152 /* SetKeyword */; emitTokenWithComment(token, pos, writeKeyword, node); writeSpace(); emit(node.name); @@ -111299,7 +111356,7 @@ function emitTypeOperator(node) { writeTokenText(node.operator, writeKeyword); writeSpace(); - const parenthesizerRule = node.operator === 146 /* ReadonlyKeyword */ ? parenthesizer.parenthesizeOperandOfReadonlyTypeOperator : parenthesizer.parenthesizeOperandOfTypeOperator; + const parenthesizerRule = node.operator === 147 /* ReadonlyKeyword */ ? parenthesizer.parenthesizeOperandOfReadonlyTypeOperator : parenthesizer.parenthesizeOperandOfTypeOperator; emit(node.type, parenthesizerRule); } function emitIndexedAccessType(node) { @@ -111319,7 +111376,7 @@ } if (node.readonlyToken) { emit(node.readonlyToken); - if (node.readonlyToken.kind !== 146 /* ReadonlyKeyword */) { + if (node.readonlyToken.kind !== 147 /* ReadonlyKeyword */) { writeKeyword("readonly"); } writeSpace(); @@ -111498,7 +111555,7 @@ emitExpressionList(node, node.arguments, 2576 /* CallExpressionArguments */, parenthesizer.parenthesizeExpressionForDisallowedComma); } function emitNewExpression(node) { - emitTokenWithComment(103 /* NewKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(104 /* NewKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfNew); emitTypeArguments(node, node.typeArguments); @@ -111554,22 +111611,22 @@ emit(node.equalsGreaterThanToken); } function emitDeleteExpression(node) { - emitTokenWithComment(89 /* DeleteKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(90 /* DeleteKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitTypeOfExpression(node) { - emitTokenWithComment(112 /* TypeOfKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(113 /* TypeOfKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitVoidExpression(node) { - emitTokenWithComment(114 /* VoidKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(115 /* VoidKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitAwaitExpression(node) { - emitTokenWithComment(133 /* AwaitKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(134 /* AwaitKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } @@ -111582,7 +111639,7 @@ } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 221 /* PrefixUnaryExpression */ && (node.operator === 39 /* PlusToken */ && (operand.operator === 39 /* PlusToken */ || operand.operator === 45 /* PlusPlusToken */) || node.operator === 40 /* MinusToken */ && (operand.operator === 40 /* MinusToken */ || operand.operator === 46 /* MinusMinusToken */)); + return operand.kind === 222 /* PrefixUnaryExpression */ && (node.operator === 39 /* PlusToken */ && (operand.operator === 39 /* PlusToken */ || operand.operator === 45 /* PlusPlusToken */) || node.operator === 40 /* MinusToken */ && (operand.operator === 40 /* MinusToken */ || operand.operator === 46 /* MinusMinusToken */)); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary); @@ -111635,7 +111692,7 @@ const linesAfterOperator = getLinesBetweenNodes(node, operatorToken, node.right); writeLinesAndIndent(linesBeforeOperator, isCommaOperator); emitLeadingCommentsOfPosition(operatorToken.pos); - writeTokenNode(operatorToken, operatorToken.kind === 101 /* InKeyword */ ? writeKeyword : writeOperator); + writeTokenNode(operatorToken, operatorToken.kind === 102 /* InKeyword */ ? writeKeyword : writeOperator); emitTrailingCommentsOfPosition( operatorToken.end, /*prefixSpace*/ @@ -111726,7 +111783,7 @@ emitList(node, node.templateSpans, 262144 /* TemplateExpressionSpans */); } function emitYieldExpression(node) { - emitTokenWithComment(125 /* YieldKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(126 /* YieldKeyword */, node.pos, writeKeyword, node); emit(node.asteriskToken); emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsiAndDisallowedComma); } @@ -111832,7 +111889,7 @@ } } function emitIfStatement(node) { - const openParenPos = emitTokenWithComment(99 /* IfKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(100 /* IfKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -111840,8 +111897,8 @@ emitEmbeddedStatement(node, node.thenStatement); if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); - emitTokenWithComment(91 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 242 /* IfStatement */) { + emitTokenWithComment(92 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); + if (node.elseStatement.kind === 243 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -111850,14 +111907,14 @@ } } function emitWhileClause(node, startPos) { - const openParenPos = emitTokenWithComment(115 /* WhileKeyword */, startPos, writeKeyword, node); + const openParenPos = emitTokenWithComment(116 /* WhileKeyword */, startPos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); } function emitDoStatement(node) { - emitTokenWithComment(90 /* DoKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(91 /* DoKeyword */, node.pos, writeKeyword, node); emitEmbeddedStatement(node, node.statement); if (isBlock(node.statement) && !preserveSourceNewlines) { writeSpace(); @@ -111872,7 +111929,7 @@ emitEmbeddedStatement(node, node.statement); } function emitForStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); let pos = emitTokenWithComment( 20 /* OpenParenToken */, @@ -111890,25 +111947,25 @@ emitEmbeddedStatement(node, node.statement); } function emitForInStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(101 /* InKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(102 /* InKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); emitEmbeddedStatement(node, node.statement); } function emitForOfStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); emitWithTrailingSpace(node.awaitModifier); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(162 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(163 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -111916,7 +111973,7 @@ } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 258 /* VariableDeclarationList */) { + if (node.kind === 259 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -111924,12 +111981,12 @@ } } function emitContinueStatement(node) { - emitTokenWithComment(86 /* ContinueKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(87 /* ContinueKeyword */, node.pos, writeKeyword, node); emitWithLeadingSpace(node.label); writeTrailingSemicolon(); } function emitBreakStatement(node) { - emitTokenWithComment(81 /* BreakKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(82 /* BreakKeyword */, node.pos, writeKeyword, node); emitWithLeadingSpace(node.label); writeTrailingSemicolon(); } @@ -111952,7 +112009,7 @@ } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 291 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 292 /* JsxExpression */; emitTrailingCommentsOfPosition( pos, /*prefixSpace*/ @@ -112000,7 +112057,7 @@ } function emitReturnStatement(node) { emitTokenWithComment( - 105 /* ReturnKeyword */, + 106 /* ReturnKeyword */, node.pos, writeKeyword, /*contextNode*/ @@ -112010,7 +112067,7 @@ writeTrailingSemicolon(); } function emitWithStatement(node) { - const openParenPos = emitTokenWithComment(116 /* WithKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(117 /* WithKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -112018,7 +112075,7 @@ emitEmbeddedStatement(node, node.statement); } function emitSwitchStatement(node) { - const openParenPos = emitTokenWithComment(107 /* SwitchKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(108 /* SwitchKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -112033,12 +112090,12 @@ emit(node.statement); } function emitThrowStatement(node) { - emitTokenWithComment(109 /* ThrowKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(110 /* ThrowKeyword */, node.pos, writeKeyword, node); emitExpressionWithLeadingSpace(parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi); writeTrailingSemicolon(); } function emitTryStatement(node) { - emitTokenWithComment(111 /* TryKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(112 /* TryKeyword */, node.pos, writeKeyword, node); writeSpace(); emit(node.tryBlock); if (node.catchClause) { @@ -112047,13 +112104,13 @@ } if (node.finallyBlock) { writeLineOrSpace(node, node.catchClause || node.tryBlock, node.finallyBlock); - emitTokenWithComment(96 /* FinallyKeyword */, (node.catchClause || node.tryBlock).end, writeKeyword, node); + emitTokenWithComment(97 /* FinallyKeyword */, (node.catchClause || node.tryBlock).end, writeKeyword, node); writeSpace(); emit(node.finallyBlock); } } function emitDebuggerStatement(node) { - writeToken(87 /* DebuggerKeyword */, node.pos, writeKeyword); + writeToken(88 /* DebuggerKeyword */, node.pos, writeKeyword); writeTrailingSemicolon(); } function emitVariableDeclaration(node) { @@ -112191,7 +112248,7 @@ /*allowDecorators*/ true ); - emitTokenWithComment(84 /* ClassKeyword */, moveRangePastModifiers(node).pos, writeKeyword, node); + emitTokenWithComment(85 /* ClassKeyword */, moveRangePastModifiers(node).pos, writeKeyword, node); if (node.name) { writeSpace(); emitIdentifierName(node.name); @@ -112318,10 +112375,10 @@ /*allowDecorators*/ false ); - emitTokenWithComment(100 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); + emitTokenWithComment(101 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); writeSpace(); if (node.isTypeOnly) { - emitTokenWithComment(154 /* TypeKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(155 /* TypeKeyword */, node.pos, writeKeyword, node); writeSpace(); } emit(node.name); @@ -112345,12 +112402,12 @@ /*allowDecorators*/ false ); - emitTokenWithComment(100 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); + emitTokenWithComment(101 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); writeSpace(); if (node.importClause) { emit(node.importClause); writeSpace(); - emitTokenWithComment(158 /* FromKeyword */, node.importClause.end, writeKeyword, node); + emitTokenWithComment(159 /* FromKeyword */, node.importClause.end, writeKeyword, node); writeSpace(); } emitExpression(node.moduleSpecifier); @@ -112361,7 +112418,7 @@ } function emitImportClause(node) { if (node.isTypeOnly) { - emitTokenWithComment(154 /* TypeKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(155 /* TypeKeyword */, node.pos, writeKeyword, node); writeSpace(); } emit(node.name); @@ -112374,7 +112431,7 @@ function emitNamespaceImport(node) { const asPos = emitTokenWithComment(41 /* AsteriskToken */, node.pos, writePunctuation, node); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, asPos, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, asPos, writeKeyword, node); writeSpace(); emit(node.name); } @@ -112385,12 +112442,12 @@ emitImportOrExportSpecifier(node); } function emitExportAssignment(node) { - const nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + const nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.isExportEquals) { emitTokenWithComment(63 /* EqualsToken */, nextPos, writeOperator, node); } else { - emitTokenWithComment(88 /* DefaultKeyword */, nextPos, writeKeyword, node); + emitTokenWithComment(89 /* DefaultKeyword */, nextPos, writeKeyword, node); } writeSpace(); emitExpression(node.expression, node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(63 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault); @@ -112403,10 +112460,10 @@ /*allowDecorators*/ false ); - let nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + let nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.isTypeOnly) { - nextPos = emitTokenWithComment(154 /* TypeKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(155 /* TypeKeyword */, nextPos, writeKeyword, node); writeSpace(); } if (node.exportClause) { @@ -112417,7 +112474,7 @@ if (node.moduleSpecifier) { writeSpace(); const fromPos = node.exportClause ? node.exportClause.end : nextPos; - emitTokenWithComment(158 /* FromKeyword */, fromPos, writeKeyword, node); + emitTokenWithComment(159 /* FromKeyword */, fromPos, writeKeyword, node); writeSpace(); emitExpression(node.moduleSpecifier); } @@ -112427,7 +112484,7 @@ writeTrailingSemicolon(); } function emitAssertClause(node) { - emitTokenWithComment(130 /* AssertKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(131 /* AssertKeyword */, node.pos, writeKeyword, node); writeSpace(); const elements = node.elements; emitList(node, elements, 526226 /* ImportClauseEntries */); @@ -112444,11 +112501,11 @@ emit(value); } function emitNamespaceExportDeclaration(node) { - let nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + let nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); - nextPos = emitTokenWithComment(128 /* AsKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(129 /* AsKeyword */, nextPos, writeKeyword, node); writeSpace(); - nextPos = emitTokenWithComment(143 /* NamespaceKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(144 /* NamespaceKeyword */, nextPos, writeKeyword, node); writeSpace(); emit(node.name); writeTrailingSemicolon(); @@ -112456,7 +112513,7 @@ function emitNamespaceExport(node) { const asPos = emitTokenWithComment(41 /* AsteriskToken */, node.pos, writePunctuation, node); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, asPos, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, asPos, writeKeyword, node); writeSpace(); emit(node.name); } @@ -112479,7 +112536,7 @@ if (node.propertyName) { emit(node.propertyName); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, node.propertyName.end, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, node.propertyName.end, writeKeyword, node); writeSpace(); } emit(node.name); @@ -112582,13 +112639,13 @@ } } function emitCaseClause(node) { - emitTokenWithComment(82 /* CaseKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(83 /* CaseKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma); emitCaseOrDefaultClauseRest(node, node.statements, node.expression.end); } function emitDefaultClause(node) { - const pos = emitTokenWithComment(88 /* DefaultKeyword */, node.pos, writeKeyword, node); + const pos = emitTokenWithComment(89 /* DefaultKeyword */, node.pos, writeKeyword, node); emitCaseOrDefaultClauseRest(node, node.statements, pos); } function emitCaseOrDefaultClauseRest(parentNode, statements, colonPos) { @@ -112611,7 +112668,7 @@ emitList(node, node.types, 528 /* HeritageClauseTypes */); } function emitCatchClause(node) { - const openParenPos = emitTokenWithComment(83 /* CatchKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(84 /* CatchKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.variableDeclaration) { emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); @@ -112667,7 +112724,7 @@ } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 347 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 348 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -112711,7 +112768,7 @@ function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 312 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 313 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -112729,7 +112786,7 @@ emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 325 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 326 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -113612,7 +113669,7 @@ return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 214 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 215 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -113695,84 +113752,84 @@ if (!node) return; switch (node.kind) { - case 238 /* Block */: + case 239 /* Block */: forEach(node.statements, generateNames); break; - case 253 /* LabeledStatement */: - case 251 /* WithStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 254 /* LabeledStatement */: + case 252 /* WithStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: generateNames(node.statement); break; - case 242 /* IfStatement */: + case 243 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 295 /* CatchClause */: + case 296 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: generateNames(node.declarationList); break; - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: generateNames(node.importClause); break; - case 270 /* ImportClause */: + case 271 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: forEach(node.elements, generateNames); break; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -113781,12 +113838,12 @@ if (!node) return; switch (node.kind) { - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -114045,16 +114102,16 @@ prefix, suffix ); - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: { + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: { Debug.assert(!prefix && !suffix && !privateName); const name = node.name; if (name && !isGeneratedIdentifier(name)) { @@ -114069,17 +114126,17 @@ } return generateNameForExportDefault(); } - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return makeTempVariableName( 0 /* Auto */, /*reserveInNestedScopes*/ @@ -114173,7 +114230,7 @@ emitLeadingComments( pos, /*isEmittedNode*/ - node.kind !== 355 /* NotEmittedStatement */ + node.kind !== 356 /* NotEmittedStatement */ ); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) { @@ -114181,7 +114238,7 @@ } if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 258 /* VariableDeclarationList */) { + if (node.kind === 259 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -114197,7 +114254,7 @@ containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 356 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -114469,7 +114526,7 @@ } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 356 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 128 /* NoNestedSourceMaps */) { @@ -114484,7 +114541,7 @@ if (emitFlags & 128 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 356 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -115813,6 +115870,7 @@ const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions; const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3 } = createProgramOptions; let { oldProgram } = createProgramOptions; + const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations)); let processingDefaultLibFiles; let processingOtherFiles; let files; @@ -116946,89 +117004,89 @@ return diagnostics; function walk(node, parent2) { switch (parent2.kind) { - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: if (parent2.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 257 /* VariableDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 258 /* VariableDeclaration */: if (parent2.type === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); return "skip"; } } switch (node.kind) { - case 270 /* ImportClause */: + case 271 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? "import...type" : "export...type")); return "skip"; } break; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: const heritageClause = node; - if (heritageClause.token === 117 /* ImplementsKeyword */) { + if (heritageClause.token === 118 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 261 /* InterfaceDeclaration */: - const interfaceKeyword = tokenToString(118 /* InterfaceKeyword */); + case 262 /* InterfaceDeclaration */: + const interfaceKeyword = tokenToString(119 /* InterfaceKeyword */); Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); return "skip"; - case 264 /* ModuleDeclaration */: - const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(143 /* NamespaceKeyword */) : tokenToString(142 /* ModuleKeyword */); + case 265 /* ModuleDeclaration */: + const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(144 /* NamespaceKeyword */) : tokenToString(143 /* ModuleKeyword */); Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); return "skip"; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 263 /* EnumDeclaration */: - const enumKeyword = Debug.checkDefined(tokenToString(92 /* EnumKeyword */)); + case 264 /* EnumDeclaration */: + const enumKeyword = Debug.checkDefined(tokenToString(93 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); return "skip"; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 231 /* AsExpression */: + case 232 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: Debug.fail(); } } @@ -117063,47 +117121,47 @@ } } switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: if (nodes === parent2.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 240 /* VariableStatement */); + checkModifiers(parent2.modifiers, parent2.kind === 241 /* VariableStatement */); return "skip"; } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (nodes === parent2.modifiers) { for (const modifier of nodes) { - if (isModifier(modifier) && modifier.kind !== 124 /* StaticKeyword */ && modifier.kind !== 127 /* AccessorKeyword */) { + if (isModifier(modifier) && modifier.kind !== 125 /* StaticKeyword */ && modifier.kind !== 128 /* AccessorKeyword */) { diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); } } return "skip"; } break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (nodes === parent2.modifiers && some(nodes, isModifier)) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: - case 212 /* TaggedTemplateExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 213 /* TaggedTemplateExpression */: if (nodes === parent2.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -117114,25 +117172,25 @@ function checkModifiers(modifiers, isConstValid) { for (const modifier of modifiers) { switch (modifier.kind) { - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: if (isConstValid) { continue; } - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 136 /* DeclareKeyword */: - case 126 /* AbstractKeyword */: - case 161 /* OverrideKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 137 /* DeclareKeyword */: + case 127 /* AbstractKeyword */: + case 162 /* OverrideKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); break; - case 124 /* StaticKeyword */: - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: - case 127 /* AccessorKeyword */: + case 125 /* StaticKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: + case 128 /* AccessorKeyword */: } } } @@ -118239,127 +118297,131 @@ } } } - function getVersionForDeprecationDiagnostics(reportInvalidIgnoreDeprecations) { - const version2 = typeScriptVersion3 || versionMajorMinor; + function getIgnoreDeprecationsVersion() { const ignoreDeprecations = options.ignoreDeprecations; if (ignoreDeprecations) { - if (ignoreDeprecations === "5.0" /* v5_0 */ && version2.startsWith("5.")) { - return; - } else if (reportInvalidIgnoreDeprecations) { - createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations); + if (ignoreDeprecations === "5.0") { + return new Version(ignoreDeprecations); } + reportInvalidIgnoreDeprecations(); } - return version2; + return Version.zero; } - function verifyDeprecatedCompilerOptions() { - const version2 = getVersionForDeprecationDiagnostics( - /*reportInvalidIgnoreDeprecations*/ - true - ); - if (!version2) - return; - if (options.target === 0 /* ES3 */) { - createDeprecatedDiagnosticForOption(version2, "target", "ES3"); + function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn) { + const deprecatedInVersion = new Version(deprecatedIn); + const removedInVersion = new Version(removedIn); + const typescriptVersion = new Version(typeScriptVersion3 || versionMajorMinor); + const ignoreDeprecationsVersion = getIgnoreDeprecationsVersion(); + const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */); + const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1 /* LessThan */; + if (mustBeRemoved || canBeSilenced) { + fn((name, value, useInstead) => { + if (mustBeRemoved) { + if (value === void 0) { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name); + } else { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value); + } + } else { + if (value === void 0) { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn); + } else { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn); + } + } + }); } - if (options.noImplicitUseStrict) { - createDeprecatedDiagnosticForOption(version2, "noImplicitUseStrict"); - } - if (options.keyofStringsOnly) { - createDeprecatedDiagnosticForOption(version2, "keyofStringsOnly"); - } - if (options.suppressExcessPropertyErrors) { - createDeprecatedDiagnosticForOption(version2, "suppressExcessPropertyErrors"); - } - if (options.suppressImplicitAnyIndexErrors) { - createDeprecatedDiagnosticForOption(version2, "suppressImplicitAnyIndexErrors"); - } - if (options.noStrictGenericChecks) { - createDeprecatedDiagnosticForOption(version2, "noStrictGenericChecks"); - } - if (options.charset) { - createDeprecatedDiagnosticForOption(version2, "charset"); - } - if (options.out) { - createDeprecatedDiagnosticForOption(version2, "out"); - } - if (options.importsNotUsedAsValues) { - createDeprecatedDiagnosticForOption( - version2, - "importsNotUsedAsValues", - /*value*/ - void 0, - "verbatimModuleSyntax" - ); - } - if (options.preserveValueImports) { - createDeprecatedDiagnosticForOption( - version2, - "preserveValueImports", - /*value*/ - void 0, - "verbatimModuleSyntax" - ); - } } - function verifyDeprecatedProjectReference(ref, parentFile, index) { - if (ref.prepend) { - const version2 = getVersionForDeprecationDiagnostics( - /*reportInvalidIgnoreDeprecations*/ - false - ); - if (version2) { - createDeprecatedOptionForVersionDiagnostic( - version2, - (message, arg0, arg1, arg2) => createDiagnosticForReference(parentFile, index, message, arg0, arg1, arg2), - "prepend" + function verifyDeprecatedCompilerOptions() { + function createDiagnostic(name, value, useInstead, message, arg0, arg1, arg2, arg3) { + if (useInstead) { + const details = chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.Use_0_instead, + useInstead ); + const chain = chainDiagnosticMessages(details, message, arg0, arg1, arg2, arg3); + createDiagnosticForOption( + /*onKey*/ + !value, + name, + /*option2*/ + void 0, + chain + ); + } else { + createDiagnosticForOption( + /*onKey*/ + !value, + name, + /*option2*/ + void 0, + message, + arg0, + arg1, + arg2, + arg3 + ); } } + checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { + if (options.target === 0 /* ES3 */) { + createDeprecatedDiagnostic("target", "ES3"); + } + if (options.noImplicitUseStrict) { + createDeprecatedDiagnostic("noImplicitUseStrict"); + } + if (options.keyofStringsOnly) { + createDeprecatedDiagnostic("keyofStringsOnly"); + } + if (options.suppressExcessPropertyErrors) { + createDeprecatedDiagnostic("suppressExcessPropertyErrors"); + } + if (options.suppressImplicitAnyIndexErrors) { + createDeprecatedDiagnostic("suppressImplicitAnyIndexErrors"); + } + if (options.noStrictGenericChecks) { + createDeprecatedDiagnostic("noStrictGenericChecks"); + } + if (options.charset) { + createDeprecatedDiagnostic("charset"); + } + if (options.out) { + createDeprecatedDiagnostic( + "out", + /*value*/ + void 0, + "outFile" + ); + } + if (options.importsNotUsedAsValues) { + createDeprecatedDiagnostic( + "importsNotUsedAsValues", + /*value*/ + void 0, + "verbatimModuleSyntax" + ); + } + if (options.preserveValueImports) { + createDeprecatedDiagnostic( + "preserveValueImports", + /*value*/ + void 0, + "verbatimModuleSyntax" + ); + } + }); } - function createDeprecatedDiagnosticForOption(version2, name, value, useInstead) { - return createDeprecatedOptionForVersionDiagnostic( - version2, - (message, arg0, arg1, arg2) => { - if (useInstead) { - const details = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Use_0_instead, - useInstead - ); - const chain = chainDiagnosticMessages(details, message, arg0, arg1, arg2); - createDiagnosticForOption( - /*onKey*/ - !value, - name, - /*option2*/ - void 0, - chain - ); - } else { - createDiagnosticForOption( - /*onKey*/ - !value, - name, - /*option2*/ - void 0, - message, - arg0, - arg1, - arg2 - ); - } - }, - name, - value - ); - } - function createDeprecatedOptionForVersionDiagnostic(version2, createDiagnostic, name, value) { - if (version2 === "6.0" /* v6_0 */) { - createDiagnostic(Diagnostics.Flag_0_is_deprecated_Please_remove_it_from_your_configuration, value || name); - } else { - createDiagnostic(Diagnostics.Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, value || name, "5.5" /* v5_5 */, "5.0" /* v5_0 */); + function verifyDeprecatedProjectReference(ref, parentFile, index) { + function createDiagnostic(_name, _value, _useInstead, message, arg0, arg1, arg2, arg3) { + createDiagnosticForReference(parentFile, index, message, arg0, arg1, arg2, arg3); } + checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { + if (ref.prepend) { + createDeprecatedDiagnostic("prepend"); + } + }); } function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) { var _a3; @@ -118612,25 +118674,25 @@ arg1 ); } - function createDiagnosticForReference(sourceFile, index, message, arg0, arg1, arg2) { + function createDiagnosticForReference(sourceFile, index, message, arg0, arg1, arg2, arg3) { const referencesSyntax = firstDefined( getTsConfigPropArray(sourceFile || options.configFile, "references"), (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 ); if (referencesSyntax && referencesSyntax.elements.length > index) { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, arg0, arg1, arg2)); + programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, arg0, arg1, arg2, arg3)); } else { - programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2)); + programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2, arg3)); } } - function createDiagnosticForOption(onKey, option1, option2, message, arg0, arg1, arg2) { + function createDiagnosticForOption(onKey, option1, option2, message, arg0, arg1, arg2, arg3) { const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax(); - const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, arg0, arg1, arg2); + const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, arg0, arg1, arg2, arg3); if (needCompilerDiagnostic) { if ("messageText" in message) { programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message)); } else { - programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2)); + programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2, arg3)); } } } @@ -118649,13 +118711,13 @@ } return _compilerOptionsObjectLiteralSyntax || void 0; } - function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, arg0, arg1, arg2) { + function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, arg0, arg1, arg2, arg3) { const props = getPropertyAssignment(objectLiteral, key1, key2); for (const prop of props) { if ("messageText" in message) { programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message)); } else { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, arg0, arg1, arg2)); + programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, arg0, arg1, arg2, arg3)); } } return !!props.length; @@ -125879,36 +125941,36 @@ // src/services/utilities.ts function getMeaningFromDeclaration(node) { switch (node.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 295 /* CatchClause */: - case 288 /* JsxAttribute */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 296 /* CatchClause */: + case 289 /* JsxAttribute */: return 1 /* Value */; - case 165 /* TypeParameter */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 184 /* TypeLiteral */: + case 166 /* TypeParameter */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 185 /* TypeLiteral */: return 2 /* Type */; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 302 /* EnumMember */: - case 260 /* ClassDeclaration */: + case 303 /* EnumMember */: + case 261 /* ClassDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -125916,15 +125978,15 @@ } else { return 4 /* Namespace */; } - case 263 /* EnumDeclaration */: - case 272 /* NamedImports */: - case 273 /* ImportSpecifier */: - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 264 /* EnumDeclaration */: + case 273 /* NamedImports */: + case 274 /* ImportSpecifier */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: return 7 /* All */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 7 /* All */; @@ -125932,7 +125994,7 @@ function getMeaningFromLocation(node) { node = getAdjustedReferenceLocation(node); const parent2 = node.parent; - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return 1 /* Value */; } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7 /* All */; @@ -125956,11 +126018,11 @@ } } function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 163 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 268 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; + const name = node.kind === 164 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; + return name && name.parent.kind === 269 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; } function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 163 /* QualifiedName */) { + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -125971,26 +126033,26 @@ function isQualifiedNameNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 163 /* QualifiedName */) { - while (root.parent && root.parent.kind === 163 /* QualifiedName */) { + if (root.parent.kind === 164 /* QualifiedName */) { + while (root.parent && root.parent.kind === 164 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 180 /* TypeReference */ && !isLastClause; + return root.parent.kind === 181 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 208 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 208 /* PropertyAccessExpression */) { + if (root.parent.kind === 209 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 209 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 230 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 294 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 231 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 295 /* HeritageClause */) { const decl = root.parent.parent.parent; - return decl.kind === 260 /* ClassDeclaration */ && root.parent.parent.token === 117 /* ImplementsKeyword */ || decl.kind === 261 /* InterfaceDeclaration */ && root.parent.parent.token === 94 /* ExtendsKeyword */; + return decl.kind === 261 /* ClassDeclaration */ && root.parent.parent.token === 118 /* ImplementsKeyword */ || decl.kind === 262 /* InterfaceDeclaration */ && root.parent.parent.token === 95 /* ExtendsKeyword */; } return false; } @@ -125999,17 +126061,17 @@ node = node.parent; } switch (node.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return !isExpressionNode(node); - case 194 /* ThisType */: + case 195 /* ThisType */: return true; } switch (node.parent.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return true; - case 202 /* ImportType */: + case 203 /* ImportType */: return !node.parent.isTypeOf; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isPartOfTypeNode(node.parent); } return false; @@ -126056,7 +126118,7 @@ } function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 253 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { + if (referenceNode.kind === 254 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -126106,22 +126168,22 @@ } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 299 /* PropertyAssignment */: - case 302 /* EnumMember */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 264 /* ModuleDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 300 /* PropertyAssignment */: + case 303 /* EnumMember */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 265 /* ModuleDeclaration */: return getNameOfDeclaration(node.parent) === node; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return true; - case 198 /* LiteralType */: - return node.parent.parent.kind === 196 /* IndexedAccessType */; + case 199 /* LiteralType */: + return node.parent.parent.kind === 197 /* IndexedAccessType */; default: return false; } @@ -126139,83 +126201,83 @@ return void 0; } switch (node.kind) { - case 308 /* SourceFile */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 264 /* ModuleDeclaration */: + case 309 /* SourceFile */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: return node; } } } function getNodeKind(node) { switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return "module" /* moduleElement */; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return "class" /* classElement */; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; - case 262 /* TypeAliasDeclaration */: - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: + case 263 /* TypeAliasDeclaration */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: return "type" /* typeElement */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return "enum" /* enumElement */; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return "function" /* functionElement */; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return "getter" /* memberGetAccessorElement */; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return "setter" /* memberSetAccessorElement */; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return "method" /* memberFunctionElement */; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: const { initializer } = node; return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return "property" /* memberVariableElement */; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return "index" /* indexSignatureElement */; - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return "construct" /* constructSignatureElement */; - case 176 /* CallSignature */: + case 177 /* CallSignature */: return "call" /* callSignatureElement */; - case 173 /* Constructor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 173 /* ClassStaticBlockDeclaration */: return "constructor" /* constructorImplementationElement */; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return "type parameter" /* typeParameterElement */; - case 302 /* EnumMember */: + case 303 /* EnumMember */: return "enum member" /* enumMemberElement */; - case 166 /* Parameter */: + case 167 /* Parameter */: return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: - case 271 /* NamespaceImport */: - case 277 /* NamespaceExport */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: + case 272 /* NamespaceImport */: + case 278 /* NamespaceExport */: return "alias" /* alias */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const kind = getAssignmentDeclarationKind(node); const { right } = node; switch (kind) { @@ -126243,7 +126305,7 @@ } case 79 /* Identifier */: return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: const scriptKind = getNodeKind(node.expression); return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: @@ -126255,10 +126317,10 @@ } function isThis(node) { switch (node.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return true; case 79 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 166 /* Parameter */; + return identifierIsThisKeyword(node) && node.parent.kind === 167 /* Parameter */; default: return false; } @@ -126306,41 +126368,41 @@ return false; } switch (n.kind) { - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 203 /* ObjectBindingPattern */: - case 184 /* TypeLiteral */: - case 238 /* Block */: - case 265 /* ModuleBlock */: - case 266 /* CaseBlock */: - case 272 /* NamedImports */: - case 276 /* NamedExports */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 185 /* TypeLiteral */: + case 239 /* Block */: + case 266 /* ModuleBlock */: + case 267 /* CaseBlock */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: return nodeEndsWith(n, 19 /* CloseBraceToken */, sourceFile); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 211 /* NewExpression */: + case 212 /* NewExpression */: if (!n.arguments) { return true; } - case 210 /* CallExpression */: - case 214 /* ParenthesizedExpression */: - case 193 /* ParenthesizedType */: + case 211 /* CallExpression */: + case 215 /* ParenthesizedExpression */: + case 194 /* ParenthesizedType */: return nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 177 /* ConstructSignature */: - case 176 /* CallSignature */: - case 216 /* ArrowFunction */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 178 /* ConstructSignature */: + case 177 /* CallSignature */: + case 217 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -126348,60 +126410,60 @@ return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 21 /* CloseParenToken */, sourceFile); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return !!n.body && isCompletedNode(n.body, sourceFile); - case 242 /* IfStatement */: + case 243 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 26 /* SemicolonToken */, sourceFile); - case 206 /* ArrayLiteralExpression */: - case 204 /* ArrayBindingPattern */: - case 209 /* ElementAccessExpression */: - case 164 /* ComputedPropertyName */: - case 186 /* TupleType */: + case 207 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 210 /* ElementAccessExpression */: + case 165 /* ComputedPropertyName */: + case 187 /* TupleType */: return nodeEndsWith(n, 23 /* CloseBracketToken */, sourceFile); - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 23 /* CloseBracketToken */, sourceFile); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return false; - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 244 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 245 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 243 /* DoStatement */: - return hasChildOfKind(n, 115 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 183 /* TypeQuery */: + case 244 /* DoStatement */: + return hasChildOfKind(n, 116 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); + case 184 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 218 /* TypeOfExpression */: - case 217 /* DeleteExpression */: - case 219 /* VoidExpression */: - case 226 /* YieldExpression */: - case 227 /* SpreadElement */: + case 219 /* TypeOfExpression */: + case 218 /* DeleteExpression */: + case 220 /* VoidExpression */: + case 227 /* YieldExpression */: + case 228 /* SpreadElement */: const unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: const lastSpan = lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return nodeIsPresent(n.literal); - case 275 /* ExportDeclaration */: - case 269 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: return nodeIsPresent(n.moduleSpecifier); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -126443,13 +126505,13 @@ return syntaxList; } function isDefaultModifier2(node) { - return node.kind === 88 /* DefaultKeyword */; + return node.kind === 89 /* DefaultKeyword */; } function isClassKeyword(node) { - return node.kind === 84 /* ClassKeyword */; + return node.kind === 85 /* ClassKeyword */; } function isFunctionKeyword(node) { - return node.kind === 98 /* FunctionKeyword */; + return node.kind === 99 /* FunctionKeyword */; } function getAdjustedLocationForClass(node) { if (isNamedDeclaration(node)) { @@ -126503,13 +126565,13 @@ function getAdjustedLocationForDeclaration(node, forRename) { if (!forRename) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return getAdjustedLocationForClass(node); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return getAdjustedLocationForFunction(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return node; } } @@ -126564,19 +126626,19 @@ } function getAdjustedLocation(node, forRename) { const { parent: parent2 } = node; - if (isModifier(node) && (forRename || node.kind !== 88 /* DefaultKeyword */) ? canHaveModifiers(parent2) && contains(parent2.modifiers, node) : node.kind === 84 /* ClassKeyword */ ? isClassDeclaration(parent2) || isClassExpression(node) : node.kind === 98 /* FunctionKeyword */ ? isFunctionDeclaration(parent2) || isFunctionExpression(node) : node.kind === 118 /* InterfaceKeyword */ ? isInterfaceDeclaration(parent2) : node.kind === 92 /* EnumKeyword */ ? isEnumDeclaration(parent2) : node.kind === 154 /* TypeKeyword */ ? isTypeAliasDeclaration(parent2) : node.kind === 143 /* NamespaceKeyword */ || node.kind === 142 /* ModuleKeyword */ ? isModuleDeclaration(parent2) : node.kind === 100 /* ImportKeyword */ ? isImportEqualsDeclaration(parent2) : node.kind === 137 /* GetKeyword */ ? isGetAccessorDeclaration(parent2) : node.kind === 151 /* SetKeyword */ && isSetAccessorDeclaration(parent2)) { + if (isModifier(node) && (forRename || node.kind !== 89 /* DefaultKeyword */) ? canHaveModifiers(parent2) && contains(parent2.modifiers, node) : node.kind === 85 /* ClassKeyword */ ? isClassDeclaration(parent2) || isClassExpression(node) : node.kind === 99 /* FunctionKeyword */ ? isFunctionDeclaration(parent2) || isFunctionExpression(node) : node.kind === 119 /* InterfaceKeyword */ ? isInterfaceDeclaration(parent2) : node.kind === 93 /* EnumKeyword */ ? isEnumDeclaration(parent2) : node.kind === 155 /* TypeKeyword */ ? isTypeAliasDeclaration(parent2) : node.kind === 144 /* NamespaceKeyword */ || node.kind === 143 /* ModuleKeyword */ ? isModuleDeclaration(parent2) : node.kind === 101 /* ImportKeyword */ ? isImportEqualsDeclaration(parent2) : node.kind === 138 /* GetKeyword */ ? isGetAccessorDeclaration(parent2) : node.kind === 152 /* SetKeyword */ && isSetAccessorDeclaration(parent2)) { const location = getAdjustedLocationForDeclaration(parent2, forRename); if (location) { return location; } } - if ((node.kind === 113 /* VarKeyword */ || node.kind === 85 /* ConstKeyword */ || node.kind === 119 /* LetKeyword */) && isVariableDeclarationList(parent2) && parent2.declarations.length === 1) { + if ((node.kind === 114 /* VarKeyword */ || node.kind === 86 /* ConstKeyword */ || node.kind === 120 /* LetKeyword */) && isVariableDeclarationList(parent2) && parent2.declarations.length === 1) { const decl = parent2.declarations[0]; if (isIdentifier(decl.name)) { return decl.name; } } - if (node.kind === 154 /* TypeKeyword */) { + if (node.kind === 155 /* TypeKeyword */) { if (isImportClause(parent2) && parent2.isTypeOnly) { const location = getAdjustedLocationForImportDeclaration(parent2.parent, forRename); if (location) { @@ -126590,7 +126652,7 @@ } } } - if (node.kind === 128 /* AsKeyword */) { + if (node.kind === 129 /* AsKeyword */) { if (isImportSpecifier(parent2) && parent2.propertyName || isExportSpecifier(parent2) && parent2.propertyName || isNamespaceImport(parent2) || isNamespaceExport(parent2)) { return parent2.name; } @@ -126598,13 +126660,13 @@ return parent2.exportClause.name; } } - if (node.kind === 100 /* ImportKeyword */ && isImportDeclaration(parent2)) { + if (node.kind === 101 /* ImportKeyword */ && isImportDeclaration(parent2)) { const location = getAdjustedLocationForImportDeclaration(parent2, forRename); if (location) { return location; } } - if (node.kind === 93 /* ExportKeyword */) { + if (node.kind === 94 /* ExportKeyword */) { if (isExportDeclaration(parent2)) { const location = getAdjustedLocationForExportDeclaration(parent2, forRename); if (location) { @@ -126615,19 +126677,19 @@ return skipOuterExpressions(parent2.expression); } } - if (node.kind === 147 /* RequireKeyword */ && isExternalModuleReference(parent2)) { + if (node.kind === 148 /* RequireKeyword */ && isExternalModuleReference(parent2)) { return parent2.expression; } - if (node.kind === 158 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { + if (node.kind === 159 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { return parent2.moduleSpecifier; } - if ((node.kind === 94 /* ExtendsKeyword */ || node.kind === 117 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) { + if ((node.kind === 95 /* ExtendsKeyword */ || node.kind === 118 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) { const location = getAdjustedLocationForHeritageClause(parent2); if (location) { return location; } } - if (node.kind === 94 /* ExtendsKeyword */) { + if (node.kind === 95 /* ExtendsKeyword */) { if (isTypeParameterDeclaration(parent2) && parent2.constraint && isTypeReferenceNode(parent2.constraint)) { return parent2.constraint.typeName; } @@ -126635,31 +126697,31 @@ return parent2.extendsType.typeName; } } - if (node.kind === 138 /* InferKeyword */ && isInferTypeNode(parent2)) { + if (node.kind === 139 /* InferKeyword */ && isInferTypeNode(parent2)) { return parent2.typeParameter.name; } - if (node.kind === 101 /* InKeyword */ && isTypeParameterDeclaration(parent2) && isMappedTypeNode(parent2.parent)) { + if (node.kind === 102 /* InKeyword */ && isTypeParameterDeclaration(parent2) && isMappedTypeNode(parent2.parent)) { return parent2.name; } - if (node.kind === 141 /* KeyOfKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 141 /* KeyOfKeyword */ && isTypeReferenceNode(parent2.type)) { + if (node.kind === 142 /* KeyOfKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 142 /* KeyOfKeyword */ && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 146 /* ReadonlyKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 146 /* ReadonlyKeyword */ && isArrayTypeNode(parent2.type) && isTypeReferenceNode(parent2.type.elementType)) { + if (node.kind === 147 /* ReadonlyKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 147 /* ReadonlyKeyword */ && isArrayTypeNode(parent2.type) && isTypeReferenceNode(parent2.type.elementType)) { return parent2.type.elementType.typeName; } if (!forRename) { - if (node.kind === 103 /* NewKeyword */ && isNewExpression(parent2) || node.kind === 114 /* VoidKeyword */ && isVoidExpression(parent2) || node.kind === 112 /* TypeOfKeyword */ && isTypeOfExpression(parent2) || node.kind === 133 /* AwaitKeyword */ && isAwaitExpression(parent2) || node.kind === 125 /* YieldKeyword */ && isYieldExpression(parent2) || node.kind === 89 /* DeleteKeyword */ && isDeleteExpression(parent2)) { + if (node.kind === 104 /* NewKeyword */ && isNewExpression(parent2) || node.kind === 115 /* VoidKeyword */ && isVoidExpression(parent2) || node.kind === 113 /* TypeOfKeyword */ && isTypeOfExpression(parent2) || node.kind === 134 /* AwaitKeyword */ && isAwaitExpression(parent2) || node.kind === 126 /* YieldKeyword */ && isYieldExpression(parent2) || node.kind === 90 /* DeleteKeyword */ && isDeleteExpression(parent2)) { if (parent2.expression) { return skipOuterExpressions(parent2.expression); } } - if ((node.kind === 101 /* InKeyword */ || node.kind === 102 /* InstanceOfKeyword */) && isBinaryExpression(parent2) && parent2.operatorToken === node) { + if ((node.kind === 102 /* InKeyword */ || node.kind === 103 /* InstanceOfKeyword */) && isBinaryExpression(parent2) && parent2.operatorToken === node) { return skipOuterExpressions(parent2.right); } - if (node.kind === 128 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { + if (node.kind === 129 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 101 /* InKeyword */ && isForInStatement(parent2) || node.kind === 162 /* OfKeyword */ && isForOfStatement(parent2)) { + if (node.kind === 102 /* InKeyword */ && isForInStatement(parent2) || node.kind === 163 /* OfKeyword */ && isForOfStatement(parent2)) { return skipOuterExpressions(parent2.expression); } } @@ -126846,7 +126908,7 @@ } } } - Debug.assert(startNode2 !== void 0 || n.kind === 308 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); + Debug.assert(startNode2 !== void 0 || n.kind === 309 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); const candidate = findRightmostChildNodeWithTokens( children, /*exclusiveStartPosition*/ @@ -126881,7 +126943,7 @@ for (let i = exclusiveStartPosition - 1; i >= 0; i--) { const child = children[i]; if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 282 /* JsxSelfClosingElement */)) { + if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 283 /* JsxSelfClosingElement */)) { Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); } } else if (nodeHasTokens(children[i], sourceFile)) { @@ -126913,13 +126975,13 @@ if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 11 /* JsxText */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 291 /* JsxExpression */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 292 /* JsxExpression */) { return true; } - if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 291 /* JsxExpression */) { + if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 292 /* JsxExpression */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 284 /* JsxClosingElement */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 285 /* JsxClosingElement */) { return true; } return false; @@ -126947,9 +127009,9 @@ function isInsideJsxElement(sourceFile, position) { function isInsideJsxElementTraversal(node) { while (node) { - if (node.kind >= 282 /* JsxSelfClosingElement */ && node.kind <= 291 /* JsxExpression */ || node.kind === 11 /* JsxText */ || node.kind === 29 /* LessThanToken */ || node.kind === 31 /* GreaterThanToken */ || node.kind === 79 /* Identifier */ || node.kind === 19 /* CloseBraceToken */ || node.kind === 18 /* OpenBraceToken */ || node.kind === 43 /* SlashToken */) { + if (node.kind >= 283 /* JsxSelfClosingElement */ && node.kind <= 292 /* JsxExpression */ || node.kind === 11 /* JsxText */ || node.kind === 29 /* LessThanToken */ || node.kind === 31 /* GreaterThanToken */ || node.kind === 79 /* Identifier */ || node.kind === 19 /* CloseBraceToken */ || node.kind === 18 /* OpenBraceToken */ || node.kind === 43 /* SlashToken */) { node = node.parent; - } else if (node.kind === 281 /* JsxElement */) { + } else if (node.kind === 282 /* JsxElement */) { if (position > node.getStart(sourceFile)) return true; node = node.parent; @@ -127066,11 +127128,11 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 112 /* TypeOfKeyword */: - case 94 /* ExtendsKeyword */: - case 141 /* KeyOfKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 113 /* TypeOfKeyword */: + case 95 /* ExtendsKeyword */: + case 142 /* KeyOfKeyword */: case 24 /* DotToken */: case 51 /* BarToken */: case 57 /* QuestionToken */: @@ -127121,15 +127183,15 @@ result.push("deprecated" /* deprecatedModifier */); if (node.flags & 16777216 /* Ambient */) result.push("declare" /* ambientModifier */); - if (node.kind === 274 /* ExportAssignment */) + if (node.kind === 275 /* ExportAssignment */) result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 180 /* TypeReference */ || node.kind === 210 /* CallExpression */) { + if (node.kind === 181 /* TypeReference */ || node.kind === 211 /* CallExpression */) { return node.typeArguments; } - if (isFunctionLike(node) || node.kind === 260 /* ClassDeclaration */ || node.kind === 261 /* InterfaceDeclaration */) { + if (isFunctionLike(node) || node.kind === 261 /* ClassDeclaration */ || node.kind === 262 /* InterfaceDeclaration */) { return node.typeParameters; } return void 0; @@ -127143,12 +127205,15 @@ } return false; } + function areIntersectedTypesAvoidingStringReduction(checker, t1, t2) { + return !!(t1.flags & 4 /* String */) && checker.isEmptyAnonymousObjectType(t2); + } function isStringAndEmptyAnonymousObjectIntersection(type) { if (!type.isIntersection()) { return false; } const { types, checker } = type; - return types.length === 2 && types[0].flags & 4 /* String */ && checker.isEmptyAnonymousObjectType(types[1]); + return types.length === 2 && (areIntersectedTypesAvoidingStringReduction(checker, types[0], types[1]) || areIntersectedTypesAvoidingStringReduction(checker, types[1], types[0])); } function isPunctuation(kind) { return 18 /* FirstPunctuation */ <= kind && kind <= 78 /* LastPunctuation */; @@ -127158,9 +127223,9 @@ } function isAccessibilityModifier(kind) { switch (kind) { - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: return true; } return false; @@ -127171,14 +127236,14 @@ return result; } function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 206 /* ArrayLiteralExpression */ || node.kind === 207 /* ObjectLiteralExpression */) { - if (node.parent.kind === 223 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 207 /* ArrayLiteralExpression */ || node.kind === 208 /* ObjectLiteralExpression */) { + if (node.parent.kind === 224 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { return true; } - if (node.parent.kind === 247 /* ForOfStatement */ && node.parent.initializer === node) { + if (node.parent.kind === 248 /* ForOfStatement */ && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 299 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 300 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -127247,7 +127312,7 @@ return contains(typeKeywords, kind); } function isTypeKeywordToken(node) { - return node.kind === 154 /* TypeKeyword */; + return node.kind === 155 /* TypeKeyword */; } function isTypeKeywordTokenOrIdentifier(node) { return isTypeKeywordToken(node) || isIdentifier(node) && node.text === "type"; @@ -127276,7 +127341,7 @@ return type.isTypeParameter() ? type.getConstraint() || type : type; } function getNameFromPropertyName(name) { - return name.kind === 164 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); + return name.kind === 165 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); } function programContainsModules(program) { return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!(s.externalModuleIndicator || s.commonJsModuleIndicator)); @@ -127398,7 +127463,7 @@ } function insertImports(changes, sourceFile, imports, blankLineBetween, preferences) { const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 240 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; + const importKindPredicate = decl.kind === 241 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; const existingImportStatements = filter(sourceFile.statements, importKindPredicate); let sortKind = isArray(imports) ? ts_OrganizeImports_exports.detectImportDeclarationSorting(imports, preferences) : 3 /* Both */; const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); @@ -127963,13 +128028,13 @@ function getContextualTypeFromParent(node, checker, contextFlags) { const parent2 = walkUpParenthesizedExpressions(node.parent); switch (parent2.kind) { - case 211 /* NewExpression */: + case 212 /* NewExpression */: return checker.getContextualType(parent2, contextFlags); - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const { left, operatorToken, right } = parent2; return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node, contextFlags); } - case 292 /* CaseClause */: + case 293 /* CaseClause */: return getSwitchedType(parent2, checker); default: return checker.getContextualType(node, contextFlags); @@ -127995,8 +128060,8 @@ switch (node.kind) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 212 /* TaggedTemplateExpression */: + case 226 /* TemplateExpression */: + case 213 /* TaggedTemplateExpression */: return true; default: return false; @@ -128031,16 +128096,16 @@ return typeIsAccessible ? res : void 0; } function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 176 /* CallSignature */ || kind === 177 /* ConstructSignature */ || kind === 178 /* IndexSignature */ || kind === 168 /* PropertySignature */ || kind === 170 /* MethodSignature */; + return kind === 177 /* CallSignature */ || kind === 178 /* ConstructSignature */ || kind === 179 /* IndexSignature */ || kind === 169 /* PropertySignature */ || kind === 171 /* MethodSignature */; } function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 259 /* FunctionDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 260 /* FunctionDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 264 /* ModuleDeclaration */; + return kind === 265 /* ModuleDeclaration */; } function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 240 /* VariableStatement */ || kind === 241 /* ExpressionStatement */ || kind === 243 /* DoStatement */ || kind === 248 /* ContinueStatement */ || kind === 249 /* BreakStatement */ || kind === 250 /* ReturnStatement */ || kind === 254 /* ThrowStatement */ || kind === 256 /* DebuggerStatement */ || kind === 169 /* PropertyDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 274 /* ExportAssignment */; + return kind === 241 /* VariableStatement */ || kind === 242 /* ExpressionStatement */ || kind === 244 /* DoStatement */ || kind === 249 /* ContinueStatement */ || kind === 250 /* BreakStatement */ || kind === 251 /* ReturnStatement */ || kind === 255 /* ThrowStatement */ || kind === 257 /* DebuggerStatement */ || kind === 170 /* PropertyDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 275 /* ExportAssignment */; } function nodeIsASICandidate(node, sourceFile) { const lastToken = node.getLastToken(sourceFile); @@ -128064,7 +128129,7 @@ } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { return false; } - if (node.kind === 243 /* DoStatement */) { + if (node.kind === 244 /* DoStatement */) { return true; } const topNode = findAncestor(node, (ancestor) => !ancestor.parent); @@ -128595,25 +128660,25 @@ })(SemanticMeaning || {}); tripleSlashDirectivePrefixRegex = /^\/\/\/\s* { QuotePreference5[QuotePreference5["Single"] = 0] = "Single"; @@ -129081,8 +129146,8 @@ handleToken(); lastNonTriviaToken = token; } - const end = scanner2.getTextPos(); - pushEncodedClassification(scanner2.getTokenPos(), end, offset, classFromKind(token), spans); + const end = scanner2.getTokenEnd(); + pushEncodedClassification(scanner2.getTokenStart(), end, offset, classFromKind(token), spans); if (end >= text.length) { const end2 = getNewEndOfLineState(scanner2, token, lastOrUndefined(templateStack)); if (end2 !== void 0) { @@ -129108,11 +129173,11 @@ angleBracketStack--; } break; - case 131 /* AnyKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: + case 132 /* AnyKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: if (angleBracketStack > 0 && !syntacticClassifierAbsent) { token = 79 /* Identifier */; } @@ -129265,11 +129330,11 @@ return true; } switch (keyword2) { - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: - case 135 /* ConstructorKeyword */: - case 124 /* StaticKeyword */: - case 127 /* AccessorKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: + case 136 /* ConstructorKeyword */: + case 125 /* StaticKeyword */: + case 128 /* AccessorKeyword */: return true; default: return false; @@ -129309,10 +129374,10 @@ case 31 /* GreaterThanToken */: case 32 /* LessThanEqualsToken */: case 33 /* GreaterThanEqualsToken */: - case 102 /* InstanceOfKeyword */: - case 101 /* InKeyword */: - case 128 /* AsKeyword */: - case 150 /* SatisfiesKeyword */: + case 103 /* InstanceOfKeyword */: + case 102 /* InKeyword */: + case 129 /* AsKeyword */: + case 151 /* SatisfiesKeyword */: case 34 /* EqualsEqualsToken */: case 35 /* ExclamationEqualsToken */: case 36 /* EqualsEqualsEqualsToken */: @@ -129394,13 +129459,13 @@ } function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -129547,14 +129612,14 @@ result.push(type); } function classifyLeadingTriviaAndGetTokenStart(token) { - triviaScanner.setTextPos(token.pos); + triviaScanner.resetTokenState(token.pos); while (true) { - const start = triviaScanner.getTextPos(); + const start = triviaScanner.getTokenEnd(); if (!couldStartTrivia(sourceFile.text, start)) { return start; } const kind = triviaScanner.scan(); - const end = triviaScanner.getTextPos(); + const end = triviaScanner.getTokenEnd(); const width = end - start; if (!isTrivia(kind)) { return start; @@ -129566,7 +129631,7 @@ case 2 /* SingleLineCommentTrivia */: case 3 /* MultiLineCommentTrivia */: classifyComment(token, kind, start, width); - triviaScanner.setTextPos(end); + triviaScanner.resetTokenState(end); continue; case 7 /* ConflictMarkerTrivia */: const text = sourceFile.text; @@ -129616,49 +129681,49 @@ pos = tag.tagName.end; let commentStart = tag.tagName.end; switch (tag.kind) { - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: const param = tag; processJSDocParameterTag(param); commentStart = param.isNameFirst && ((_a2 = param.typeExpression) == null ? void 0 : _a2.end) || param.name.end; break; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: const prop = tag; commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; break; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; commentStart = tag.typeParameters.end; break; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 312 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; + commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 313 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; break; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: commentStart = tag.typeExpression.end; break; - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = tag.typeExpression.end; break; - case 346 /* JSDocThisTag */: - case 343 /* JSDocEnumTag */: + case 347 /* JSDocThisTag */: + case 344 /* JSDocEnumTag */: commentStart = tag.typeExpression.end; break; - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; break; - case 350 /* JSDocSeeTag */: + case 351 /* JSDocSeeTag */: commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; break; - case 331 /* JSDocAugmentsTag */: - case 332 /* JSDocImplementsTag */: + case 332 /* JSDocAugmentsTag */: + case 333 /* JSDocImplementsTag */: commentStart = tag.class.end; break; - case 352 /* JSDocThrowsTag */: + case 353 /* JSDocThrowsTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_h = tag.typeExpression) == null ? void 0 : _h.end) || commentStart; @@ -129765,15 +129830,15 @@ } } pushClassification(start, i - start, 1 /* comment */); - mergeConflictScanner.setTextPos(i); - while (mergeConflictScanner.getTextPos() < end) { + mergeConflictScanner.resetTokenState(i); + while (mergeConflictScanner.getTokenEnd() < end) { classifyDisabledCodeToken(); } } function classifyDisabledCodeToken() { - const start = mergeConflictScanner.getTextPos(); + const start = mergeConflictScanner.getTokenEnd(); const tokenKind = mergeConflictScanner.scan(); - const end = mergeConflictScanner.getTextPos(); + const end = mergeConflictScanner.getTokenEnd(); const type = classifyTokenType(tokenKind); if (type) { pushClassification(start, end - start, type); @@ -129803,22 +129868,22 @@ } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 284 /* JsxClosingElement */: + case 285 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -129839,11 +129904,11 @@ if (token) { const parent2 = token.parent; if (tokenKind === 63 /* EqualsToken */) { - if (parent2.kind === 257 /* VariableDeclaration */ || parent2.kind === 169 /* PropertyDeclaration */ || parent2.kind === 166 /* Parameter */ || parent2.kind === 288 /* JsxAttribute */) { + if (parent2.kind === 258 /* VariableDeclaration */ || parent2.kind === 170 /* PropertyDeclaration */ || parent2.kind === 167 /* Parameter */ || parent2.kind === 289 /* JsxAttribute */) { return 5 /* operator */; } } - if (parent2.kind === 223 /* BinaryExpression */ || parent2.kind === 221 /* PrefixUnaryExpression */ || parent2.kind === 222 /* PostfixUnaryExpression */ || parent2.kind === 224 /* ConditionalExpression */) { + if (parent2.kind === 224 /* BinaryExpression */ || parent2.kind === 222 /* PrefixUnaryExpression */ || parent2.kind === 223 /* PostfixUnaryExpression */ || parent2.kind === 225 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -129853,7 +129918,7 @@ } else if (tokenKind === 9 /* BigIntLiteral */) { return 25 /* bigintLiteral */; } else if (tokenKind === 10 /* StringLiteral */) { - return token && token.parent.kind === 288 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 289 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 13 /* RegularExpressionLiteral */) { return 6 /* stringLiteral */; } else if (isTemplateLiteralKind(tokenKind)) { @@ -129863,32 +129928,32 @@ } else if (tokenKind === 79 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 166 /* Parameter */: + case 167 /* Parameter */: if (token.parent.name === token) { return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -129926,14 +129991,14 @@ 8 /* NumericLiteral */, 9 /* BigIntLiteral */, 13 /* RegularExpressionLiteral */, - 108 /* ThisKeyword */, + 109 /* ThisKeyword */, 45 /* PlusPlusToken */, 46 /* MinusMinusToken */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 19 /* CloseBraceToken */, - 110 /* TrueKeyword */, - 95 /* FalseKeyword */ + 111 /* TrueKeyword */, + 96 /* FalseKeyword */ ], (token) => token, () => true); } }); @@ -129997,50 +130062,50 @@ } function getHighlightSpans(node, sourceFile) { switch (node.kind) { - case 99 /* IfKeyword */: - case 91 /* ElseKeyword */: + case 100 /* IfKeyword */: + case 92 /* ElseKeyword */: return isIfStatement(node.parent) ? getIfElseOccurrences(node.parent, sourceFile) : void 0; - case 105 /* ReturnKeyword */: + case 106 /* ReturnKeyword */: return useParent(node.parent, isReturnStatement, getReturnOccurrences); - case 109 /* ThrowKeyword */: + case 110 /* ThrowKeyword */: return useParent(node.parent, isThrowStatement, getThrowOccurrences); - case 111 /* TryKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: - const tryStatement = node.kind === 83 /* CatchKeyword */ ? node.parent.parent : node.parent; + case 112 /* TryKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: + const tryStatement = node.kind === 84 /* CatchKeyword */ ? node.parent.parent : node.parent; return useParent(tryStatement, isTryStatement, getTryCatchFinallyOccurrences); - case 107 /* SwitchKeyword */: + case 108 /* SwitchKeyword */: return useParent(node.parent, isSwitchStatement, getSwitchCaseDefaultOccurrences); - case 82 /* CaseKeyword */: - case 88 /* DefaultKeyword */: { + case 83 /* CaseKeyword */: + case 89 /* DefaultKeyword */: { if (isDefaultClause(node.parent) || isCaseClause(node.parent)) { return useParent(node.parent.parent.parent, isSwitchStatement, getSwitchCaseDefaultOccurrences); } return void 0; } - case 81 /* BreakKeyword */: - case 86 /* ContinueKeyword */: + case 82 /* BreakKeyword */: + case 87 /* ContinueKeyword */: return useParent(node.parent, isBreakOrContinueStatement, getBreakOrContinueStatementOccurrences); - case 97 /* ForKeyword */: - case 115 /* WhileKeyword */: - case 90 /* DoKeyword */: + case 98 /* ForKeyword */: + case 116 /* WhileKeyword */: + case 91 /* DoKeyword */: return useParent(node.parent, (n) => isIterationStatement( n, /*lookInLabeledStatements*/ true ), getLoopBreakContinueOccurrences); - case 135 /* ConstructorKeyword */: - return getFromAllDeclarations(isConstructorDeclaration, [135 /* ConstructorKeyword */]); - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: - return getFromAllDeclarations(isAccessor, [137 /* GetKeyword */, 151 /* SetKeyword */]); - case 133 /* AwaitKeyword */: + case 136 /* ConstructorKeyword */: + return getFromAllDeclarations(isConstructorDeclaration, [136 /* ConstructorKeyword */]); + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: + return getFromAllDeclarations(isAccessor, [138 /* GetKeyword */, 152 /* SetKeyword */]); + case 134 /* AwaitKeyword */: return useParent(node.parent, isAwaitExpression, getAsyncAndAwaitOccurrences); - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return highlightSpans(getAsyncAndAwaitOccurrences(node)); - case 125 /* YieldKeyword */: + case 126 /* YieldKeyword */: return highlightSpans(getYieldOccurrences(node)); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return void 0; default: return isModifierKind(node.kind) && (isDeclaration(node.parent) || isVariableStatement(node.parent)) ? highlightSpans(getModifierOccurrences(node.kind, node.parent)) : void 0; @@ -130073,7 +130138,7 @@ let child = throwStatement; while (child.parent) { const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 308 /* SourceFile */) { + if (isFunctionBlock(parent2) || parent2.kind === 309 /* SourceFile */) { return parent2; } if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { @@ -130103,15 +130168,15 @@ function getBreakOrContinueOwner(statement) { return findAncestor(statement, (node) => { switch (node.kind) { - case 252 /* SwitchStatement */: - if (statement.kind === 248 /* ContinueStatement */) { + case 253 /* SwitchStatement */: + if (statement.kind === 249 /* ContinueStatement */) { return false; } - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 244 /* WhileStatement */: - case 243 /* DoStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 245 /* WhileStatement */: + case 244 /* DoStatement */: return !statement.label || isLabeledBy(node, statement.label.escapedText); default: return isFunctionLike(node) && "quit"; @@ -130124,24 +130189,24 @@ function getNodesToSearchForModifier(declaration, modifierFlag) { const container = declaration.parent; switch (container.kind) { - case 265 /* ModuleBlock */: - case 308 /* SourceFile */: - case 238 /* Block */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 266 /* ModuleBlock */: + case 309 /* SourceFile */: + case 239 /* Block */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; } - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 184 /* TypeLiteral */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 185 /* TypeLiteral */: const nodes = container.members; if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); @@ -130152,7 +130217,7 @@ return [...nodes, container]; } return nodes; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return void 0; default: Debug.assertNever(container, "Invalid container kind."); @@ -130167,11 +130232,11 @@ } function getLoopBreakContinueOccurrences(loopNode) { const keywords = []; - if (pushKeywordIf(keywords, loopNode.getFirstToken(), 97 /* ForKeyword */, 115 /* WhileKeyword */, 90 /* DoKeyword */)) { - if (loopNode.kind === 243 /* DoStatement */) { + if (pushKeywordIf(keywords, loopNode.getFirstToken(), 98 /* ForKeyword */, 116 /* WhileKeyword */, 91 /* DoKeyword */)) { + if (loopNode.kind === 244 /* DoStatement */) { const loopTokens = loopNode.getChildren(); for (let i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 115 /* WhileKeyword */)) { + if (pushKeywordIf(keywords, loopTokens[i], 116 /* WhileKeyword */)) { break; } } @@ -130179,7 +130244,7 @@ } forEach(aggregateAllBreakAndContinueStatements(loopNode.statement), (statement) => { if (ownsBreakOrContinueStatement(loopNode, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 81 /* BreakKeyword */, 86 /* ContinueKeyword */); + pushKeywordIf(keywords, statement.getFirstToken(), 82 /* BreakKeyword */, 87 /* ContinueKeyword */); } }); return keywords; @@ -130188,13 +130253,13 @@ const owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -130202,12 +130267,12 @@ } function getSwitchCaseDefaultOccurrences(switchStatement) { const keywords = []; - pushKeywordIf(keywords, switchStatement.getFirstToken(), 107 /* SwitchKeyword */); + pushKeywordIf(keywords, switchStatement.getFirstToken(), 108 /* SwitchKeyword */); forEach(switchStatement.caseBlock.clauses, (clause) => { - pushKeywordIf(keywords, clause.getFirstToken(), 82 /* CaseKeyword */, 88 /* DefaultKeyword */); + pushKeywordIf(keywords, clause.getFirstToken(), 83 /* CaseKeyword */, 89 /* DefaultKeyword */); forEach(aggregateAllBreakAndContinueStatements(clause), (statement) => { if (ownsBreakOrContinueStatement(switchStatement, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 81 /* BreakKeyword */); + pushKeywordIf(keywords, statement.getFirstToken(), 82 /* BreakKeyword */); } }); }); @@ -130215,13 +130280,13 @@ } function getTryCatchFinallyOccurrences(tryStatement, sourceFile) { const keywords = []; - pushKeywordIf(keywords, tryStatement.getFirstToken(), 111 /* TryKeyword */); + pushKeywordIf(keywords, tryStatement.getFirstToken(), 112 /* TryKeyword */); if (tryStatement.catchClause) { - pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 83 /* CatchKeyword */); + pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 84 /* CatchKeyword */); } if (tryStatement.finallyBlock) { - const finallyKeyword = findChildOfKind(tryStatement, 96 /* FinallyKeyword */, sourceFile); - pushKeywordIf(keywords, finallyKeyword, 96 /* FinallyKeyword */); + const finallyKeyword = findChildOfKind(tryStatement, 97 /* FinallyKeyword */, sourceFile); + pushKeywordIf(keywords, finallyKeyword, 97 /* FinallyKeyword */); } return keywords; } @@ -130232,11 +130297,11 @@ } const keywords = []; forEach(aggregateOwnedThrowStatements(owner), (throwStatement2) => { - keywords.push(findChildOfKind(throwStatement2, 109 /* ThrowKeyword */, sourceFile)); + keywords.push(findChildOfKind(throwStatement2, 110 /* ThrowKeyword */, sourceFile)); }); if (isFunctionBlock(owner)) { forEachReturnStatement(owner, (returnStatement) => { - keywords.push(findChildOfKind(returnStatement, 105 /* ReturnKeyword */, sourceFile)); + keywords.push(findChildOfKind(returnStatement, 106 /* ReturnKeyword */, sourceFile)); }); } return keywords; @@ -130248,10 +130313,10 @@ } const keywords = []; forEachReturnStatement(cast(func.body, isBlock), (returnStatement2) => { - keywords.push(findChildOfKind(returnStatement2, 105 /* ReturnKeyword */, sourceFile)); + keywords.push(findChildOfKind(returnStatement2, 106 /* ReturnKeyword */, sourceFile)); }); forEach(aggregateOwnedThrowStatements(func.body), (throwStatement) => { - keywords.push(findChildOfKind(throwStatement, 109 /* ThrowKeyword */, sourceFile)); + keywords.push(findChildOfKind(throwStatement, 110 /* ThrowKeyword */, sourceFile)); }); return keywords; } @@ -130263,13 +130328,13 @@ const keywords = []; if (func.modifiers) { func.modifiers.forEach((modifier) => { - pushKeywordIf(keywords, modifier, 132 /* AsyncKeyword */); + pushKeywordIf(keywords, modifier, 133 /* AsyncKeyword */); }); } forEachChild(func, (child) => { traverseWithoutCrossingFunction(child, (node2) => { if (isAwaitExpression(node2)) { - pushKeywordIf(keywords, node2.getFirstToken(), 133 /* AwaitKeyword */); + pushKeywordIf(keywords, node2.getFirstToken(), 134 /* AwaitKeyword */); } }); }); @@ -130284,7 +130349,7 @@ forEachChild(func, (child) => { traverseWithoutCrossingFunction(child, (node2) => { if (isYieldExpression(node2)) { - pushKeywordIf(keywords, node2.getFirstToken(), 125 /* YieldKeyword */); + pushKeywordIf(keywords, node2.getFirstToken(), 126 /* YieldKeyword */); } }); }); @@ -130300,7 +130365,7 @@ const keywords = getIfElseKeywords(ifStatement, sourceFile); const result = []; for (let i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 91 /* ElseKeyword */ && i < keywords.length - 1) { + if (keywords[i].kind === 92 /* ElseKeyword */ && i < keywords.length - 1) { const elseKeyword = keywords[i]; const ifKeyword = keywords[i + 1]; let shouldCombineElseAndIf = true; @@ -130331,9 +130396,9 @@ } while (true) { const children = ifStatement.getChildren(sourceFile); - pushKeywordIf(keywords, children[0], 99 /* IfKeyword */); + pushKeywordIf(keywords, children[0], 100 /* IfKeyword */); for (let i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 91 /* ElseKeyword */)) { + if (pushKeywordIf(keywords, children[i], 92 /* ElseKeyword */)) { break; } } @@ -131172,7 +131237,7 @@ } function getFileReference() { const fileName = scanner.getTokenValue(); - const pos = scanner.getTokenPos(); + const pos = scanner.getTokenStart(); return { fileName, pos, end: pos + fileName.length }; } function recordAmbientExternalModule() { @@ -131192,9 +131257,9 @@ } function tryConsumeDeclare() { let token = scanner.getToken(); - if (token === 136 /* DeclareKeyword */) { + if (token === 137 /* DeclareKeyword */) { token = nextToken(); - if (token === 142 /* ModuleKeyword */) { + if (token === 143 /* ModuleKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordAmbientExternalModule(); @@ -131209,7 +131274,7 @@ return false; } let token = scanner.getToken(); - if (token === 100 /* ImportKeyword */) { + if (token === 101 /* ImportKeyword */) { token = nextToken(); if (token === 20 /* OpenParenToken */) { token = nextToken(); @@ -131221,10 +131286,10 @@ recordModuleName(); return true; } else { - if (token === 154 /* TypeKeyword */) { + if (token === 155 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); - return token2 !== 158 /* FromKeyword */ && (token2 === 41 /* AsteriskToken */ || token2 === 18 /* OpenBraceToken */ || token2 === 79 /* Identifier */ || isKeyword(token2)); + return token2 !== 159 /* FromKeyword */ && (token2 === 41 /* AsteriskToken */ || token2 === 18 /* OpenBraceToken */ || token2 === 79 /* Identifier */ || isKeyword(token2)); }); if (skipTypeKeyword) { token = nextToken(); @@ -131232,7 +131297,7 @@ } if (token === 79 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -131258,7 +131323,7 @@ } if (token === 19 /* CloseBraceToken */) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -131267,11 +131332,11 @@ } } else if (token === 41 /* AsteriskToken */) { token = nextToken(); - if (token === 128 /* AsKeyword */) { + if (token === 129 /* AsKeyword */) { token = nextToken(); if (token === 79 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -131287,10 +131352,10 @@ } function tryConsumeExport() { let token = scanner.getToken(); - if (token === 93 /* ExportKeyword */) { + if (token === 94 /* ExportKeyword */) { markAsExternalModuleIfTopLevel(); token = nextToken(); - if (token === 154 /* TypeKeyword */) { + if (token === 155 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); return token2 === 41 /* AsteriskToken */ || token2 === 18 /* OpenBraceToken */; @@ -131306,7 +131371,7 @@ } if (token === 19 /* CloseBraceToken */) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -131315,15 +131380,15 @@ } } else if (token === 41 /* AsteriskToken */) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); } } - } else if (token === 100 /* ImportKeyword */) { + } else if (token === 101 /* ImportKeyword */) { token = nextToken(); - if (token === 154 /* TypeKeyword */) { + if (token === 155 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); return token2 === 79 /* Identifier */ || isKeyword(token2); @@ -131350,7 +131415,7 @@ } function tryConsumeRequireCall(skipCurrentToken, allowTemplateLiterals = false) { let token = skipCurrentToken ? nextToken() : scanner.getToken(); - if (token === 147 /* RequireKeyword */) { + if (token === 148 /* RequireKeyword */) { token = nextToken(); if (token === 20 /* OpenParenToken */) { token = nextToken(); @@ -131407,7 +131472,7 @@ switch (token) { case 1 /* EndOfFileToken */: break loop; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: tryConsumeImport(); break; case 15 /* TemplateHead */: @@ -131695,13 +131760,13 @@ function containsTopLevelCommonjs(sourceFile) { return sourceFile.statements.some((statement) => { switch (statement.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall( propertyAccessLeftHandSide(decl.initializer), /*checkArgumentIsStringLiteralLike*/ true )); - case 241 /* ExpressionStatement */: { + case 242 /* ExpressionStatement */: { const { expression } = statement; if (!isBinaryExpression(expression)) return isRequireCall( @@ -131722,10 +131787,10 @@ } function importNameForConvertToDefaultImport(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 271 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 268 /* ImportEqualsDeclaration */: + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 272 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; + case 269 /* ImportEqualsDeclaration */: return node.name; default: return void 0; @@ -131784,23 +131849,23 @@ if (node.arguments.length < maxArguments) return true; return maxArguments === 1 || some(node.arguments, (arg) => { - return arg.kind === 104 /* NullKeyword */ || isIdentifier(arg) && arg.text === "undefined"; + return arg.kind === 105 /* NullKeyword */ || isIdentifier(arg) && arg.text === "undefined"; }); } function isFixablePromiseArgument(arg, checker) { switch (arg.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: const functionFlags = getFunctionFlags(arg); if (functionFlags & 1 /* Generator */) { return false; } - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return true; case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: { + case 209 /* PropertyAccessExpression */: { const symbol = checker.getSymbolAtLocation(arg); if (!symbol) { return false; @@ -131834,10 +131899,10 @@ } function canBeConvertedToAsync(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: return false; @@ -132012,9 +132077,9 @@ } function shouldKeepItem(declaration, checker) { switch (declaration.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 268 /* ImportEqualsDeclaration */: + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 269 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); return importer.escapedName !== imported.escapedName; @@ -132024,7 +132089,7 @@ } function tryAddSingleDeclarationName(declaration, containers) { const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 164 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); + return !!name && (pushLiteral(name, containers) || name.kind === 165 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); } function tryAddComputedPropertyName(expression, containers) { return pushLiteral(expression, containers) || isPropertyAccessExpression(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers); @@ -132035,7 +132100,7 @@ function getContainers(declaration) { const containers = []; const name = getNameOfDeclaration(declaration); - if (name && name.kind === 164 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { + if (name && name.kind === 165 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { return emptyArray; } containers.shift(); @@ -132208,7 +132273,7 @@ } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 223 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + return !hasDynamicName(node) || node.kind !== 224 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -132216,7 +132281,7 @@ return; } switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: const ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (const param of ctr.parameters) { @@ -132225,32 +132290,32 @@ } } break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 171 /* MethodSignature */: if (hasNavigationBarName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (hasNavigationBarName(node)) { addNodeWithRecursiveInitializer(node); } break; - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (hasNavigationBarName(node)) { addLeafNode(node); } break; - case 270 /* ImportClause */: + case 271 /* ImportClause */: const importClause = node; if (importClause.name) { addLeafNode(importClause.name); } const { namedBindings } = importClause; if (namedBindings) { - if (namedBindings.kind === 271 /* NamespaceImport */) { + if (namedBindings.kind === 272 /* NamespaceImport */) { addLeafNode(namedBindings); } else { for (const element of namedBindings.elements) { @@ -132259,16 +132324,16 @@ } } break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: addNodeWithRecursiveChild(node, node.name); break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: const { expression } = node; isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: - case 257 /* VariableDeclaration */: { + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: + case 258 /* VariableDeclaration */: { const child = node; if (isBindingPattern(child.name)) { addChildrenRecursively(child.name); @@ -132277,18 +132342,18 @@ } break; } - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: const nameNode = node.name; if (nameNode && isIdentifier(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); break; - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: startNode(node); for (const member of node.members) { if (!isComputedProperty(member)) { @@ -132297,19 +132362,19 @@ } endNode(); break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: startNode(node); for (const member of node.members) { addChildrenRecursively(member); } endNode(); break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const expression2 = node.expression; const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; if (child) { @@ -132321,16 +132386,16 @@ } break; } - case 278 /* ExportSpecifier */: - case 268 /* ImportEqualsDeclaration */: - case 178 /* IndexSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 262 /* TypeAliasDeclaration */: + case 279 /* ExportSpecifier */: + case 269 /* ImportEqualsDeclaration */: + case 179 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 263 /* TypeAliasDeclaration */: addLeafNode(node); break; - case 210 /* CallExpression */: - case 223 /* BinaryExpression */: { + case 211 /* CallExpression */: + case 224 /* BinaryExpression */: { const special = getAssignmentDeclarationKind(node); switch (special) { case 1 /* ExportsProperty */: @@ -132540,12 +132605,12 @@ return false; } switch (a.kind) { - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return isStatic(a) === isStatic(b); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); default: return true; @@ -132562,7 +132627,7 @@ if (!a.body || !b.body) { return a.body === b.body; } - return a.body.kind === b.body.kind && (a.body.kind !== 264 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); + return a.body.kind === b.body.kind && (a.body.kind !== 265 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); } function merge(target, source) { target.additionalNodes = target.additionalNodes || []; @@ -132583,7 +132648,7 @@ return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); } function tryGetName(node) { - if (node.kind === 264 /* ModuleDeclaration */) { + if (node.kind === 265 /* ModuleDeclaration */) { return getModuleName(node); } const declName = getNameOfDeclaration(node); @@ -132592,16 +132657,16 @@ return propertyName && unescapeLeadingUnderscores(propertyName); } switch (node.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 228 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 229 /* ClassExpression */: return getFunctionOrClassName(node); default: return void 0; } } function getItemName(node, name) { - if (node.kind === 264 /* ModuleDeclaration */) { + if (node.kind === 265 /* ModuleDeclaration */) { return cleanText(getModuleName(node)); } if (name) { @@ -132611,27 +132676,27 @@ } } switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: if (getSyntacticModifierFlags(node) & 1024 /* Default */) { return "default"; } return getFunctionOrClassName(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return "constructor"; - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return "new()"; - case 176 /* CallSignature */: + case 177 /* CallSignature */: return "()"; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return "[]"; default: return ""; @@ -132656,19 +132721,19 @@ return true; } switch (navigationBarNodeKind(item)) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 263 /* EnumDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 308 /* SourceFile */: - case 262 /* TypeAliasDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 264 /* EnumDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 309 /* SourceFile */: + case 263 /* TypeAliasDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: return true; - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -132678,10 +132743,10 @@ return false; } switch (navigationBarNodeKind(item2.parent)) { - case 265 /* ModuleBlock */: - case 308 /* SourceFile */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: + case 266 /* ModuleBlock */: + case 309 /* SourceFile */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: return true; default: return false; @@ -132740,7 +132805,7 @@ } function getFullyQualifiedModuleName(moduleDeclaration) { const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 264 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 265 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } @@ -132750,13 +132815,13 @@ return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 164 /* ComputedPropertyName */; + return !member.name || member.name.kind === 165 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 308 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); + return node.kind === 309 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); } function getModifiers2(node) { - if (node.parent && node.parent.kind === 257 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 258 /* VariableDeclaration */) { node = node.parent; } return getNodeModifiers(node); @@ -132801,9 +132866,9 @@ } function isFunctionOrClassExpression(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: return true; default: return false; @@ -132889,10 +132954,10 @@ return children; } function addSyntheticNodes(nodes, pos, end, parent2) { - scanner.setTextPos(pos); + scanner.resetTokenState(pos); while (pos < end) { const token = scanner.scan(); - const textPos = scanner.getTextPos(); + const textPos = scanner.getTokenEnd(); if (textPos <= end) { if (token === 79 /* Identifier */) { if (hasTabstop(parent2)) { @@ -132909,7 +132974,7 @@ } } function createSyntaxList(nodes, parent2) { - const list = createNode(354 /* SyntaxList */, nodes.pos, nodes.end, parent2); + const list = createNode(355 /* SyntaxList */, nodes.pos, nodes.end, parent2); list._children = []; let pos = nodes.pos; for (const node of nodes) { @@ -132934,7 +132999,7 @@ var _a2; if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 174 /* GetAccessor */ || declaration.kind === 175 /* SetAccessor */) { + if (declaration.kind === 175 /* GetAccessor */ || declaration.kind === 176 /* SetAccessor */) { return symbol.getContextualJsDocTags(declaration, checker); } return ((_a2 = symbol.declarations) == null ? void 0 : _a2.length) === 1 ? symbol.getJsDocTags() : void 0; @@ -132957,7 +133022,7 @@ const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 174 /* GetAccessor */ || declaration.kind === 175 /* SetAccessor */) { + if (declaration.kind === 175 /* GetAccessor */ || declaration.kind === 176 /* SetAccessor */) { return symbol.getContextualDocumentationComment(declaration, checker); } return symbol.getDocumentationComment(checker); @@ -132971,7 +133036,7 @@ } function findBaseOfDeclaration(checker, declaration, cb) { var _a2; - const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 173 /* Constructor */ ? declaration.parent.parent : declaration.parent; + const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 174 /* Constructor */ ? declaration.parent.parent : declaration.parent; if (!classOrInterfaceDeclaration) return; const isStaticMember = hasStaticModifier(declaration); @@ -133467,15 +133532,15 @@ switch (node.kind) { case 79 /* Identifier */: return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 208 /* PropertyAccessExpression */: - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: return !isInComment(sourceFile, position); - case 108 /* ThisKeyword */: - case 194 /* ThisType */: - case 106 /* SuperKeyword */: - case 199 /* NamedTupleMember */: + case 109 /* ThisKeyword */: + case 195 /* ThisType */: + case 107 /* SuperKeyword */: + case 200 /* NamedTupleMember */: return true; - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return isImportMeta(node); default: return false; @@ -133573,15 +133638,15 @@ return void 0; } switch (node.kind) { - case 208 /* PropertyAccessExpression */: - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: case 10 /* StringLiteral */: - case 95 /* FalseKeyword */: - case 110 /* TrueKeyword */: - case 104 /* NullKeyword */: - case 106 /* SuperKeyword */: - case 108 /* ThisKeyword */: - case 194 /* ThisType */: + case 96 /* FalseKeyword */: + case 111 /* TrueKeyword */: + case 105 /* NullKeyword */: + case 107 /* SuperKeyword */: + case 109 /* ThisKeyword */: + case 195 /* ThisType */: case 79 /* Identifier */: break; default: @@ -133592,7 +133657,7 @@ if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 264 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 265 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { break; @@ -134219,7 +134284,7 @@ }); } function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 280 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); + return isDeclarationName(node) || node.parent.kind === 281 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); @@ -134230,11 +134295,11 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - if (node.parent.kind === 164 /* ComputedPropertyName */) { + if (node.parent.kind === 165 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; } case 79 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 207 /* ObjectLiteralExpression */ || node.parent.parent.kind === 289 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; + return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 208 /* ObjectLiteralExpression */ || node.parent.parent.kind === 290 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; } return void 0; } @@ -134275,7 +134340,7 @@ return discriminatedPropertySymbols; } function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 209 /* ElementAccessExpression */ && node.parent.argumentExpression === node; + return node && node.parent && node.parent.kind === 210 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { if (sys) { @@ -134359,8 +134424,8 @@ if (!children.length) { return void 0; } - const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 353 /* LastJSDocNode */); - return child.kind < 163 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + const child = find(children, (kid) => kid.kind < 313 /* FirstJSDocNode */ || kid.kind > 354 /* LastJSDocNode */); + return child.kind < 164 /* FirstNode */ ? child : child.getFirstToken(sourceFile); } getLastToken(sourceFile) { this.assertHasRealPosition(); @@ -134369,7 +134434,7 @@ if (!child) { return void 0; } - return child.kind < 163 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 164 /* FirstNode */ ? child : child.getLastToken(sourceFile); } forEachChild(cbNode, cbNodeArray) { return forEachChild(this, cbNode, cbNodeArray); @@ -134670,7 +134735,7 @@ SourceFileObject = class extends NodeObject { constructor(kind, pos, end) { super(kind, pos, end); - this.kind = 308 /* SourceFile */; + this.kind = 309 /* SourceFile */; } update(newText, textChangeRange) { return updateSourceFile(this, newText, textChangeRange); @@ -134726,10 +134791,10 @@ } function visit(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: const functionDeclaration = node; const declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -134745,29 +134810,29 @@ } forEachChild(node, visit); break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 264 /* ModuleDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 278 /* ExportSpecifier */: - case 273 /* ImportSpecifier */: - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 184 /* TypeLiteral */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 279 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 185 /* TypeLiteral */: addDeclaration(node); forEachChild(node, visit); break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { break; } - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: { + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: { const decl = node; if (isBindingPattern(decl.name)) { forEachChild(decl.name, visit); @@ -134777,12 +134842,12 @@ visit(decl.initializer); } } - case 302 /* EnumMember */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 303 /* EnumMember */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: addDeclaration(node); break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDeclaration = node; if (exportDeclaration.exportClause) { if (isNamedExports(exportDeclaration.exportClause)) { @@ -134792,14 +134857,14 @@ } } break; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: const importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause.name); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 272 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { forEach(importClause.namedBindings.elements, visit); @@ -134807,7 +134872,7 @@ } } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) !== 0 /* None */) { addDeclaration(node); } @@ -135986,89 +136051,89 @@ if (node) { const { parent: parent2 } = node; switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 257 /* VariableDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 258 /* VariableDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return spanInVariableDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return spanInParameterDeclaration(node); - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 238 /* Block */: + case 239 /* Block */: if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return spanInBlock(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return spanInBlock(node.block); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return textSpan(node.expression); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return spanInNode(node.statement); - case 256 /* DebuggerStatement */: + case 257 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return spanInNode(node.statement); - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return spanInForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return spanInInitializerOfForLike(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return spanInNode(node.statements[0]); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return spanInBlock(node.tryBlock); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return textSpan(node, node.expression); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return textSpan(node, node.expression); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return textSpan(node, node.moduleReference); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (getModuleInstanceState(node) !== 1 /* Instantiated */) { return void 0; } - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 205 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 206 /* BindingElement */: return textSpan(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return spanInNode(node.statement); - case 167 /* Decorator */: + case 168 /* Decorator */: return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return spanInBindingPattern(node); - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return void 0; case 26 /* SemicolonToken */: case 1 /* EndOfFileToken */: @@ -136090,22 +136155,22 @@ case 31 /* GreaterThanToken */: case 29 /* LessThanToken */: return spanInGreaterThanOrLessThanToken(node); - case 115 /* WhileKeyword */: + case 116 /* WhileKeyword */: return spanInWhileKeyword(node); - case 91 /* ElseKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 92 /* ElseKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return spanInNextNode(node); - case 162 /* OfKeyword */: + case 163 /* OfKeyword */: return spanInOfKeyword(node); default: if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 79 /* Identifier */ || node.kind === 227 /* SpreadElement */ || node.kind === 299 /* PropertyAssignment */ || node.kind === 300 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { + if ((node.kind === 79 /* Identifier */ || node.kind === 228 /* SpreadElement */ || node.kind === 300 /* PropertyAssignment */ || node.kind === 301 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { return textSpan(node); } - if (node.kind === 223 /* BinaryExpression */) { + if (node.kind === 224 /* BinaryExpression */) { const { left, operatorToken } = node; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern( @@ -136121,19 +136186,19 @@ } if (isExpressionNode(node)) { switch (parent2.kind) { - case 243 /* DoStatement */: + case 244 /* DoStatement */: return spanInPreviousNode(node); - case 167 /* Decorator */: + case 168 /* Decorator */: return spanInNode(node.parent); - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: return textSpan(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (node.parent.operatorToken.kind === 27 /* CommaToken */) { return textSpan(node); } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (node.parent.body === node) { return textSpan(node); } @@ -136141,25 +136206,25 @@ } } switch (node.parent.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } break; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: if (node.parent.type === node) { return spanInNextNode(node.parent.type); } break; - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: { + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: { const { initializer, type } = node.parent; if (initializer === node || type === node || isAssignmentOperator(node.kind)) { return spanInPreviousNode(node); } break; } - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const { left } = node.parent; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { return spanInPreviousNode(node); @@ -136182,14 +136247,14 @@ } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 246 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 247 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } const parent2 = variableDeclaration.parent; if (isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } - if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 247 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 248 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -136216,7 +136281,7 @@ } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 260 /* ClassDeclaration */ && functionDeclaration.kind !== 173 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 261 /* ClassDeclaration */ && functionDeclaration.kind !== 174 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -136236,22 +136301,22 @@ } function spanInBlock(block) { switch (block.parent.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return void 0; } - case 244 /* WhileStatement */: - case 242 /* IfStatement */: - case 246 /* ForInStatement */: + case 245 /* WhileStatement */: + case 243 /* IfStatement */: + case 247 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 258 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 259 /* VariableDeclarationList */) { const variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -136274,64 +136339,64 @@ function spanInBindingPattern(bindingPattern) { const firstBindingElement = forEach( bindingPattern.elements, - (element) => element.kind !== 229 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 230 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 205 /* BindingElement */) { + if (bindingPattern.parent.kind === 206 /* BindingElement */) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 204 /* ArrayBindingPattern */ && node2.kind !== 203 /* ObjectBindingPattern */); - const elements = node2.kind === 206 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; + Debug.assert(node2.kind !== 205 /* ArrayBindingPattern */ && node2.kind !== 204 /* ObjectBindingPattern */); + const elements = node2.kind === 207 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; const firstBindingElement = forEach( elements, - (element) => element.kind !== 229 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 230 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node2.parent.kind === 223 /* BinaryExpression */ ? node2.parent : node2); + return textSpan(node2.parent.kind === 224 /* BinaryExpression */ ? node2.parent : node2); } function spanInOpenBraceToken(node2) { switch (node2.parent.kind) { - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: const enumDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const classDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); } return spanInNode(node2.parent); } function spanInCloseBraceToken(node2) { switch (node2.parent.kind) { - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { return void 0; } - case 263 /* EnumDeclaration */: - case 260 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 261 /* ClassDeclaration */: return textSpan(node2); - case 238 /* Block */: + case 239 /* Block */: if (isFunctionBlock(node2.parent)) { return textSpan(node2); } - case 295 /* CatchClause */: + case 296 /* CatchClause */: return spanInNode(lastOrUndefined(node2.parent.statements)); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: const caseBlock = node2.parent; const lastClause = lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(lastOrUndefined(lastClause.statements)); } return void 0; - case 203 /* ObjectBindingPattern */: + case 204 /* ObjectBindingPattern */: const bindingPattern = node2.parent; return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -136344,7 +136409,7 @@ } function spanInCloseBracketToken(node2) { switch (node2.parent.kind) { - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: const bindingPattern = node2.parent; return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -136356,57 +136421,57 @@ } } function spanInOpenParenToken(node2) { - if (node2.parent.kind === 243 /* DoStatement */ || // Go to while keyword and do action instead - node2.parent.kind === 210 /* CallExpression */ || node2.parent.kind === 211 /* NewExpression */) { + if (node2.parent.kind === 244 /* DoStatement */ || // Go to while keyword and do action instead + node2.parent.kind === 211 /* CallExpression */ || node2.parent.kind === 212 /* NewExpression */) { return spanInPreviousNode(node2); } - if (node2.parent.kind === 214 /* ParenthesizedExpression */) { + if (node2.parent.kind === 215 /* ParenthesizedExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInCloseParenToken(node2) { switch (node2.parent.kind) { - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: - case 244 /* WhileStatement */: - case 243 /* DoStatement */: - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 214 /* ParenthesizedExpression */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: + case 245 /* WhileStatement */: + case 244 /* DoStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 215 /* ParenthesizedExpression */: return spanInPreviousNode(node2); default: return spanInNode(node2.parent); } } function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 299 /* PropertyAssignment */ || node2.parent.kind === 166 /* Parameter */) { + if (isFunctionLike(node2.parent) || node2.parent.kind === 300 /* PropertyAssignment */ || node2.parent.kind === 167 /* Parameter */) { return spanInPreviousNode(node2); } return spanInNode(node2.parent); } function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 213 /* TypeAssertionExpression */) { + if (node2.parent.kind === 214 /* TypeAssertionExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInWhileKeyword(node2) { - if (node2.parent.kind === 243 /* DoStatement */) { + if (node2.parent.kind === 244 /* DoStatement */) { return textSpanEndingAtNextToken(node2, node2.parent.expression); } return spanInNode(node2.parent); } function spanInOfKeyword(node2) { - if (node2.parent.kind === 247 /* ForOfStatement */) { + if (node2.parent.kind === 248 /* ForOfStatement */) { return spanInNextNode(node2); } return spanInNode(node2.parent); @@ -136455,7 +136520,7 @@ return Debug.checkDefined(node.modifiers && find(node.modifiers, isDefaultModifier3)); } function isDefaultModifier3(node) { - return node.kind === 88 /* DefaultKeyword */; + return node.kind === 89 /* DefaultKeyword */; } function getSymbolOfCallHierarchyDeclaration(typeChecker, node) { const location = getCallHierarchyDeclarationReferenceNode(node); @@ -136504,16 +136569,16 @@ return; } switch (node.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - if (node.parent.kind === 207 /* ObjectLiteralExpression */) { + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + if (node.parent.kind === 208 /* ObjectLiteralExpression */) { return (_a2 = getAssignedName(node.parent)) == null ? void 0 : _a2.getText(); } return (_b = getNameOfDeclaration(node.parent)) == null ? void 0 : _b.getText(); - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { return node.parent.parent.name.getText(); } @@ -136595,7 +136660,7 @@ } return void 0; } - if (location.kind === 124 /* StaticKeyword */ && isClassStaticBlockDeclaration(location.parent)) { + if (location.kind === 125 /* StaticKeyword */ && isClassStaticBlockDeclaration(location.parent)) { location = location.parent; continue; } @@ -136731,55 +136796,55 @@ } switch (node.kind) { case 79 /* Identifier */: - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return; - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: recordCallSite(node); return; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: collect(node.expression); return; - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: collect(node.name); collect(node.initializer); return; - case 210 /* CallExpression */: + case 211 /* CallExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 211 /* NewExpression */: + case 212 /* NewExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: recordCallSite(node); collect(node.tag); collect(node.template); return; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: recordCallSite(node); collect(node.tagName); collect(node.attributes); return; - case 167 /* Decorator */: + case 168 /* Decorator */: recordCallSite(node); collect(node.expression); return; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: recordCallSite(node); forEachChild(node, collect); break; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: collect(node.expression); return; } @@ -136832,25 +136897,25 @@ const callSites = []; const collect = createCallSiteCollector(program, callSites); switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: collectCallSitesOfSourceFile(node, collect); break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: collectCallSitesOfModuleDeclaration(node, collect); break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: collectCallSitesOfClassLikeDeclaration(node, collect); break; - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: collectCallSitesOfClassStaticBlockDeclaration(node, collect); break; default: @@ -136927,13 +136992,13 @@ let inJSXElement = false; function visit(node) { switch (node.kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { @@ -137104,25 +137169,25 @@ return TokenModifier2; })(TokenModifier || {}); tokenFromDeclarationMapping = /* @__PURE__ */ new Map([ - [257 /* VariableDeclaration */, 7 /* variable */], - [166 /* Parameter */, 6 /* parameter */], - [169 /* PropertyDeclaration */, 9 /* property */], - [264 /* ModuleDeclaration */, 3 /* namespace */], - [263 /* EnumDeclaration */, 1 /* enum */], - [302 /* EnumMember */, 8 /* enumMember */], - [260 /* ClassDeclaration */, 0 /* class */], - [171 /* MethodDeclaration */, 11 /* member */], - [259 /* FunctionDeclaration */, 10 /* function */], - [215 /* FunctionExpression */, 10 /* function */], - [170 /* MethodSignature */, 11 /* member */], - [174 /* GetAccessor */, 9 /* property */], - [175 /* SetAccessor */, 9 /* property */], - [168 /* PropertySignature */, 9 /* property */], - [261 /* InterfaceDeclaration */, 2 /* interface */], - [262 /* TypeAliasDeclaration */, 5 /* type */], - [165 /* TypeParameter */, 4 /* typeParameter */], - [299 /* PropertyAssignment */, 9 /* property */], - [300 /* ShorthandPropertyAssignment */, 9 /* property */] + [258 /* VariableDeclaration */, 7 /* variable */], + [167 /* Parameter */, 6 /* parameter */], + [170 /* PropertyDeclaration */, 9 /* property */], + [265 /* ModuleDeclaration */, 3 /* namespace */], + [264 /* EnumDeclaration */, 1 /* enum */], + [303 /* EnumMember */, 8 /* enumMember */], + [261 /* ClassDeclaration */, 0 /* class */], + [172 /* MethodDeclaration */, 11 /* member */], + [260 /* FunctionDeclaration */, 10 /* function */], + [216 /* FunctionExpression */, 10 /* function */], + [171 /* MethodSignature */, 11 /* member */], + [175 /* GetAccessor */, 9 /* property */], + [176 /* SetAccessor */, 9 /* property */], + [169 /* PropertySignature */, 9 /* property */], + [262 /* InterfaceDeclaration */, 2 /* interface */], + [263 /* TypeAliasDeclaration */, 5 /* type */], + [166 /* TypeParameter */, 4 /* typeParameter */], + [300 /* PropertyAssignment */, 9 /* property */], + [301 /* ShorthandPropertyAssignment */, 9 /* property */] ]); } }); @@ -137250,7 +137315,7 @@ // src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts function makeChange(changeTracker, sourceFile, assertion) { - const replacement = isAsExpression(assertion) ? factory.createAsExpression(assertion.expression, factory.createKeywordTypeNode(157 /* UnknownKeyword */)) : factory.createTypeAssertion(factory.createKeywordTypeNode(157 /* UnknownKeyword */), assertion.expression); + const replacement = isAsExpression(assertion) ? factory.createAsExpression(assertion.expression, factory.createKeywordTypeNode(158 /* UnknownKeyword */)) : factory.createTypeAssertion(factory.createKeywordTypeNode(158 /* UnknownKeyword */), assertion.expression); changeTracker.replaceNode(sourceFile, assertion.expression, replacement); } function getAssertion(sourceFile, pos) { @@ -137446,7 +137511,7 @@ } const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 240 /* VariableStatement */); + const variableStatement = getAncestor(declaration, 241 /* VariableStatement */); if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; @@ -137505,7 +137570,7 @@ checker.getTypeAtLocation(errorNode).flags & 1 /* Any */; } function isInsideAwaitableBody(node) { - return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 259 /* FunctionDeclaration */ || ancestor.parent.kind === 215 /* FunctionExpression */ || ancestor.parent.kind === 216 /* ArrowFunction */ || ancestor.parent.kind === 171 /* MethodDeclaration */)); + return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 260 /* FunctionDeclaration */ || ancestor.parent.kind === 216 /* FunctionExpression */ || ancestor.parent.kind === 217 /* ArrowFunction */ || ancestor.parent.kind === 172 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -137513,7 +137578,7 @@ const asyncIter = checker.getAsyncIterableType(); if (asyncIter && checker.isTypeAssignableTo(exprType, asyncIter)) { const forOf = insertionSite.parent; - changeTracker.replaceNode(sourceFile, forOf, factory.updateForOfStatement(forOf, factory.createToken(133 /* AwaitKeyword */), forOf.initializer, forOf.expression, forOf.statement)); + changeTracker.replaceNode(sourceFile, forOf, factory.updateForOfStatement(forOf, factory.createToken(134 /* AwaitKeyword */), forOf.initializer, forOf.expression, forOf.statement)); return; } } @@ -137665,16 +137730,16 @@ } function applyChange(changeTracker, initializer, sourceFile, fixedNodes) { if (!fixedNodes || tryAddToSet(fixedNodes, initializer)) { - changeTracker.insertModifierBefore(sourceFile, 85 /* ConstKeyword */, initializer); + changeTracker.insertModifierBefore(sourceFile, 86 /* ConstKeyword */, initializer); } } function isPossiblyPartOfDestructuring(node) { switch (node.kind) { case 79 /* Identifier */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return true; default: return false; @@ -137691,7 +137756,7 @@ function isPossiblyPartOfCommaSeperatedInitializer(node) { switch (node.kind) { case 79 /* Identifier */: - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: case 27 /* CommaToken */: return true; default: @@ -137742,8 +137807,8 @@ return; } const declaration = token.parent; - if (declaration.kind === 169 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { - changeTracker.insertModifierBefore(sourceFile, 136 /* DeclareKeyword */, declaration); + if (declaration.kind === 170 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { + changeTracker.insertModifierBefore(sourceFile, 137 /* DeclareKeyword */, declaration); } } var fixId5, errorCodes5; @@ -137909,7 +137974,7 @@ const d = add.valueDeclaration; if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ - ...d.type.kind === 189 /* UnionType */ ? d.type.types : [d.type], + ...d.type.kind === 190 /* UnionType */ ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") ]); changes.replaceNode(d.getSourceFile(), d.type, t); @@ -137986,26 +138051,26 @@ } } function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 257 /* VariableDeclaration */ || node.kind === 168 /* PropertySignature */ || node.kind === 169 /* PropertyDeclaration */; + return isFunctionLikeDeclaration(node) || node.kind === 258 /* VariableDeclaration */ || node.kind === 169 /* PropertySignature */ || node.kind === 170 /* PropertyDeclaration */; } function transformJSDocType(node) { switch (node.kind) { - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: return factory.createTypeReferenceNode("any", emptyArray); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return transformJSDocOptionalType(node); - case 318 /* JSDocNonNullableType */: + case 319 /* JSDocNonNullableType */: return transformJSDocType(node.type); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return transformJSDocNullableType(node); - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: return transformJSDocVariadicType(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return transformJSDocFunctionType(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return transformJSDocTypeReference(node); - case 325 /* JSDocTypeLiteral */: + case 326 /* JSDocTypeLiteral */: return transformJSDocTypeLiteral(node); default: const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); @@ -138019,7 +138084,7 @@ void 0, isIdentifier(tag.name) ? tag.name : tag.name.right, isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(57 /* QuestionToken */) : void 0, - tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ))); setEmitFlags(typeNode, 1 /* SingleLine */); return typeNode; @@ -138035,11 +138100,11 @@ } function transformJSDocFunctionType(node) { var _a2; - return factory.createFunctionTypeNode(emptyArray, node.parameters.map(transformJSDocParameter), (_a2 = node.type) != null ? _a2 : factory.createKeywordTypeNode(131 /* AnyKeyword */)); + return factory.createFunctionTypeNode(emptyArray, node.parameters.map(transformJSDocParameter), (_a2 = node.type) != null ? _a2 : factory.createKeywordTypeNode(132 /* AnyKeyword */)); } function transformJSDocParameter(node) { const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 321 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; + const isRest = node.type.kind === 322 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; const name = node.name || (isRest ? "rest" : "arg" + index); const dotdotdot = isRest ? factory.createToken(25 /* DotDotDotToken */) : node.dotDotDotToken; return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer); @@ -138080,10 +138145,10 @@ void 0, /*dotDotDotToken*/ void 0, - node.typeArguments[0].kind === 148 /* NumberKeyword */ ? "n" : "s", + node.typeArguments[0].kind === 149 /* NumberKeyword */ ? "n" : "s", /*questionToken*/ void 0, - factory.createTypeReferenceNode(node.typeArguments[0].kind === 148 /* NumberKeyword */ ? "number" : "string", []), + factory.createTypeReferenceNode(node.typeArguments[0].kind === 149 /* NumberKeyword */ ? "number" : "string", []), /*initializer*/ void 0 ); @@ -138161,7 +138226,7 @@ ); } } else { - createClassElement(member, [factory.createToken(124 /* StaticKeyword */)], memberElements); + createClassElement(member, [factory.createToken(125 /* StaticKeyword */)], memberElements); } }); } @@ -138221,7 +138286,7 @@ })) { return; } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 241 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; + const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 242 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; changes.delete(sourceFile, nodeToDelete); if (!assignmentExpr) { members.push(factory.createPropertyDeclaration( @@ -138284,7 +138349,7 @@ return createArrowFunctionExpressionMember(members2, expression, name); } function createFunctionExpressionMember(members2, functionExpression, name) { - const fullModifiers = concatenate(modifiers, getModifierKindFromSource(functionExpression, 132 /* AsyncKeyword */)); + const fullModifiers = concatenate(modifiers, getModifierKindFromSource(functionExpression, 133 /* AsyncKeyword */)); const method = factory.createMethodDeclaration( fullModifiers, /*asteriskToken*/ @@ -138306,12 +138371,12 @@ function createArrowFunctionExpressionMember(members2, arrowFunction, name) { const arrowFunctionBody = arrowFunction.body; let bodyBlock; - if (arrowFunctionBody.kind === 238 /* Block */) { + if (arrowFunctionBody.kind === 239 /* Block */) { bodyBlock = arrowFunctionBody; } else { bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); } - const fullModifiers = concatenate(modifiers, getModifierKindFromSource(arrowFunction, 132 /* AsyncKeyword */)); + const fullModifiers = concatenate(modifiers, getModifierKindFromSource(arrowFunction, 133 /* AsyncKeyword */)); const method = factory.createMethodDeclaration( fullModifiers, /*asteriskToken*/ @@ -138345,7 +138410,7 @@ initializer.body )); } - const modifiers = getModifierKindFromSource(node.parent.parent, 93 /* ExportKeyword */); + const modifiers = getModifierKindFromSource(node.parent.parent, 94 /* ExportKeyword */); const cls = factory.createClassDeclaration( modifiers, node.name, @@ -138367,7 +138432,7 @@ node.body )); } - const modifiers = getModifierKindFromSource(node, 93 /* ExportKeyword */); + const modifiers = getModifierKindFromSource(node, 94 /* ExportKeyword */); const cls = factory.createClassDeclaration( modifiers, node.name, @@ -138448,7 +138513,7 @@ return; } const pos = skipTrivia(sourceFile.text, moveRangePastModifiers(functionToConvert).pos); - changes.insertModifierAt(sourceFile, pos, 132 /* AsyncKeyword */, { suffix: " " }); + changes.insertModifierAt(sourceFile, pos, 133 /* AsyncKeyword */, { suffix: " " }); for (const returnStatement of returnStatements) { forEachChild(returnStatement, function visit(node) { if (isCallExpression(node)) { @@ -138629,7 +138694,7 @@ return silentFail(); } function isNullOrUndefined2({ checker }, node) { - if (node.kind === 104 /* NullKeyword */) + if (node.kind === 105 /* NullKeyword */) return true; if (isIdentifier(node) && !isGeneratedIdentifier(node) && idText(node) === "undefined") { const symbol = checker.getSymbolAtLocation(node); @@ -138867,9 +138932,9 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, inputArgName, parent2, transformer) { var _a2; switch (func.kind) { - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: break; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: case 79 /* Identifier */: if (!inputArgName) { break; @@ -138894,8 +138959,8 @@ continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); } return varDeclOrAssignment; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: { + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: { const funcBody = func.body; const returnType2 = (_a2 = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a2.getReturnType(); if (isBlock(funcBody)) { @@ -139137,7 +139202,7 @@ } const importNode = importFromModuleSpecifier(moduleSpecifier); switch (importNode.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: changes.replaceNode(importingFile, importNode, makeImport( importNode.name, /*namedImports*/ @@ -139146,7 +139211,7 @@ quotePreference )); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isRequireCall( importNode, /*checkArgumentIsStringLiteralLike*/ @@ -139215,13 +139280,13 @@ } function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) { switch (statement.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); return false; - case 241 /* ExpressionStatement */: { + case 242 /* ExpressionStatement */: { const { expression } = statement; switch (expression.kind) { - case 210 /* CallExpression */: { + case 211 /* CallExpression */: { if (isRequireCall( expression, /*checkArgumentIsStringLiteralLike*/ @@ -139238,7 +139303,7 @@ } return false; } - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const { operatorToken } = expression; return operatorToken.kind === 63 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify); } @@ -139292,8 +139357,8 @@ } function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: { + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: { const tmp = makeUniqueName(propertyName, identifiers); return convertedImports([ makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), @@ -139341,15 +139406,15 @@ function tryChangeModuleExportsObject(object, useSitesToUnqualify) { const statements = mapAllOrFail(object.properties, (prop) => { switch (prop.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return void 0; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 171 /* MethodDeclaration */: - return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(93 /* ExportKeyword */)], prop, useSitesToUnqualify); + case 172 /* MethodDeclaration */: + return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(94 /* ExportKeyword */)], prop, useSitesToUnqualify); default: Debug.assertNever(prop, `Convert to ES6 got invalid prop kind ${prop.kind}`); } @@ -139407,7 +139472,7 @@ function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sourceFile, changes) { const name = left.name.text; if ((isFunctionExpression(right) || isArrowFunction(right) || isClassExpression(right)) && (!right.name || right.name.text === name)) { - changes.replaceRange(sourceFile, { pos: left.getStart(sourceFile), end: right.getStart(sourceFile) }, factory.createToken(93 /* ExportKeyword */), { suffix: " " }); + changes.replaceRange(sourceFile, { pos: left.getStart(sourceFile), end: right.getStart(sourceFile) }, factory.createToken(94 /* ExportKeyword */), { suffix: " " }); if (!right.name) changes.insertName(sourceFile, right, name); const semi = findChildOfKind(parent2, 26 /* SemicolonToken */, sourceFile); @@ -139418,23 +139483,23 @@ sourceFile, left.expression, findChildOfKind(left, 24 /* DotToken */, sourceFile), - [factory.createToken(93 /* ExportKeyword */), factory.createToken(85 /* ConstKeyword */)], + [factory.createToken(94 /* ExportKeyword */), factory.createToken(86 /* ConstKeyword */)], { joiner: " ", suffix: " " } ); } } function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { - const modifiers = [factory.createToken(93 /* ExportKeyword */)]; + const modifiers = [factory.createToken(94 /* ExportKeyword */)]; switch (exported.kind) { - case 215 /* FunctionExpression */: { + case 216 /* FunctionExpression */: { const { name: expressionName } = exported; if (expressionName && expressionName.text !== name) { return exportConst(); } } - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); default: return exportConst(); @@ -139459,7 +139524,7 @@ replaceNode ); function replaceNode(original) { - if (original.kind === 208 /* PropertyAccessExpression */) { + if (original.kind === 209 /* PropertyAccessExpression */) { const replacement = useSitesToUnqualify.get(original); useSitesToUnqualify.delete(original); return replacement; @@ -139468,7 +139533,7 @@ } function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: { + case 204 /* ObjectBindingPattern */: { const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier(e.propertyName) || !isIdentifier(e.name) ? void 0 : makeImportSpecifier(e.propertyName && e.propertyName.text, e.name.text)); if (importSpecifiers) { return convertedImports([makeImport( @@ -139480,7 +139545,7 @@ )]); } } - case 204 /* ArrayBindingPattern */: { + case 205 /* ArrayBindingPattern */: { const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); return convertedImports([ makeImport( @@ -139567,11 +139632,11 @@ function isFreeIdentifier(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return parent2.name !== node; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return parent2.propertyName !== node; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return parent2.propertyName !== node; default: return true; @@ -139734,7 +139799,7 @@ const exportDeclaration = exportClause.parent; const typeExportSpecifiers = getTypeExportSpecifiers(exportSpecifier, context); if (typeExportSpecifiers.length === exportClause.elements.length) { - changes.insertModifierBefore(context.sourceFile, 154 /* TypeKeyword */, exportClause); + changes.insertModifierBefore(context.sourceFile, 155 /* TypeKeyword */, exportClause); } else { const valueExportDeclaration = factory.updateExportDeclaration( exportDeclaration, @@ -139961,10 +140026,10 @@ const typeName = (_a2 = tag.name) == null ? void 0 : _a2.getText(); if (!typeName) return; - if (typeExpression.kind === 325 /* JSDocTypeLiteral */) { + if (typeExpression.kind === 326 /* JSDocTypeLiteral */) { return createInterfaceForTypeLiteral(typeName, typeExpression); } - if (typeExpression.kind === 312 /* JSDocTypeExpression */) { + if (typeExpression.kind === 313 /* JSDocTypeExpression */) { return createTypeAliasForTypeExpression(typeName, typeExpression); } } @@ -140579,11 +140644,11 @@ function getNamespaceLikeImportText(declaration) { var _a2, _b, _c; switch (declaration.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return (_a2 = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a2.text; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return declaration.name.text; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); @@ -140603,11 +140668,11 @@ } function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, compilerOptions) { return firstDefined(existingImports, ({ declaration, importKind, symbol, targetFlags }) => { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 268 /* ImportEqualsDeclaration */) { + if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 269 /* ImportEqualsDeclaration */) { return void 0; } - if (declaration.kind === 257 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 203 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; + if (declaration.kind === 258 /* VariableDeclaration */) { + return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 204 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; } const { importClause } = declaration; if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier)) @@ -140627,7 +140692,7 @@ if (importKind === 1 /* Default */ && (name || // Cannot add a default import to a declaration that already has one addAsTypeOnly === 2 /* Required */ && namedBindings)) return void 0; - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 271 /* NamespaceImport */) + if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 272 /* NamespaceImport */) return void 0; return { kind: 2 /* AddToExisting */, @@ -140647,7 +140712,7 @@ if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); } - } else if (i.kind === 269 /* ImportDeclaration */ || i.kind === 268 /* ImportEqualsDeclaration */) { + } else if (i.kind === 270 /* ImportDeclaration */ || i.kind === 269 /* ImportEqualsDeclaration */) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); @@ -141100,7 +141165,7 @@ case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile, preferences); - return promotedDeclaration.kind === 273 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; + return promotedDeclaration.kind === 274 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; } default: return Debug.assertNever(fix, `Unexpected fix kind ${fix.kind}`); @@ -141108,12 +141173,12 @@ } function getModuleSpecifierText(promotedDeclaration) { var _a2, _b; - return promotedDeclaration.kind === 268 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a2 = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; + return promotedDeclaration.kind === 269 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a2 = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; } function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceFile, preferences) { const convertExistingToTypeOnly = importNameElisionDisabled(compilerOptions); switch (aliasDeclaration.kind) { - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences); if (aliasDeclaration.parent.elements.length > 1 && sortKind) { @@ -141137,13 +141202,13 @@ promoteImportClause(aliasDeclaration.parent.parent); return aliasDeclaration.parent.parent; } - case 270 /* ImportClause */: + case 271 /* ImportClause */: promoteImportClause(aliasDeclaration); return aliasDeclaration; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: promoteImportClause(aliasDeclaration.parent); return aliasDeclaration.parent; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); return aliasDeclaration; default: @@ -141154,13 +141219,13 @@ if (convertExistingToTypeOnly) { const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { - if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 273 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { + if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 274 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { changes.delete(sourceFile, aliasDeclaration); changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); } for (const element of namedImports.elements) { if (element !== aliasDeclaration && !element.isTypeOnly) { - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, element); + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, element); } } } @@ -141169,7 +141234,7 @@ } function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, compilerOptions, preferences) { var _a2; - if (clause.kind === 203 /* ObjectBindingPattern */) { + if (clause.kind === 204 /* ObjectBindingPattern */) { if (defaultImport) { addElementToBindingPattern(clause, defaultImport.name, "default"); } @@ -141238,7 +141303,7 @@ changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(clause, sourceFile)); if (convertExistingToTypeOnly && existingSpecifiers) { for (const specifier of existingSpecifiers) { - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, specifier); + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, specifier); } } } @@ -141606,7 +141671,7 @@ const lastDecorator = findLast(modifiers, isDecorator); const modifierPos = abstractModifier ? abstractModifier.end : staticModifier ? staticModifier.end : accessibilityModifier ? accessibilityModifier.end : lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : classElement.getStart(sourceFile); const options = accessibilityModifier || staticModifier || abstractModifier ? { prefix: " " } : { suffix: " " }; - changeTracker.insertModifierAt(sourceFile, modifierPos, 161 /* OverrideKeyword */, options); + changeTracker.insertModifierAt(sourceFile, modifierPos, 162 /* OverrideKeyword */, options); } function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { const classElement = findContainerClassElementLike(sourceFile, pos); @@ -141620,13 +141685,13 @@ } function isClassElementLikeHasJSDoc(node) { switch (node.kind) { - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; - case 166 /* Parameter */: + case 167 /* Parameter */: return isParameterPropertyDeclaration(node, node.parent); default: return false; @@ -141798,7 +141863,7 @@ /*includeClassComputedPropertyName*/ false ))) { - const fnKeyword = Debug.checkDefined(findChildOfKind(fn, 98 /* FunctionKeyword */, sourceFile)); + const fnKeyword = Debug.checkDefined(findChildOfKind(fn, 99 /* FunctionKeyword */, sourceFile)); const { name } = fn; const body = Debug.checkDefined(fn.body); if (isFunctionExpression(fn)) { @@ -141812,7 +141877,7 @@ changes.insertText(sourceFile, body.pos, " =>"); return [Diagnostics.Convert_function_expression_0_to_arrow_function, name ? name.text : ANONYMOUS]; } else { - changes.replaceNode(sourceFile, fnKeyword, factory.createToken(85 /* ConstKeyword */)); + changes.replaceNode(sourceFile, fnKeyword, factory.createToken(86 /* ConstKeyword */)); changes.insertText(sourceFile, name.end, " = "); changes.insertText(sourceFile, body.pos, " =>"); return [Diagnostics.Convert_function_declaration_0_to_arrow_function, name.text]; @@ -142032,7 +142097,7 @@ // src/services/codefixes/fixIncorrectNamedTupleSyntax.ts function getNamedTupleMember(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 199 /* NamedTupleMember */); + return findAncestor(token, (t) => t.kind === 200 /* NamedTupleMember */); } function doChange10(changes, sourceFile, namedTupleMember) { if (!namedTupleMember) { @@ -142041,10 +142106,10 @@ let unwrappedType = namedTupleMember.type; let sawOptional = false; let sawRest = false; - while (unwrappedType.kind === 187 /* OptionalType */ || unwrappedType.kind === 188 /* RestType */ || unwrappedType.kind === 193 /* ParenthesizedType */) { - if (unwrappedType.kind === 187 /* OptionalType */) { + while (unwrappedType.kind === 188 /* OptionalType */ || unwrappedType.kind === 189 /* RestType */ || unwrappedType.kind === 194 /* ParenthesizedType */) { + if (unwrappedType.kind === 188 /* OptionalType */) { sawOptional = true; - } else if (unwrappedType.kind === 188 /* RestType */) { + } else if (unwrappedType.kind === 189 /* RestType */) { sawRest = true; } unwrappedType = unwrappedType.type; @@ -142100,7 +142165,7 @@ containingType = checker.getNonNullableType(containingType); } suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); - } else if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 101 /* InKeyword */ && parent2.left === node && isPrivateIdentifier(node)) { + } else if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 102 /* InKeyword */ && parent2.left === node && isPrivateIdentifier(node)) { const receiverType = checker.getTypeAtLocation(parent2.right); suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, receiverType); } else if (isQualifiedName(parent2) && parent2.right === node) { @@ -142357,19 +142422,19 @@ } function getVariableLikeInitializer(declaration) { switch (declaration.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: - case 299 /* PropertyAssignment */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: + case 300 /* PropertyAssignment */: return declaration.initializer; - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 300 /* ShorthandPropertyAssignment */: - case 168 /* PropertySignature */: - case 302 /* EnumMember */: - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: + case 301 /* ShorthandPropertyAssignment */: + case 169 /* PropertySignature */: + case 303 /* EnumMember */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: return void 0; } } @@ -142596,7 +142661,7 @@ function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { const tokenName = token.text; if (makeStatic) { - if (classDeclaration.kind === 228 /* ClassExpression */) { + if (classDeclaration.kind === 229 /* ClassExpression */) { return; } const className = classDeclaration.name.getText(); @@ -142649,7 +142714,7 @@ } function getTypeNode2(checker, node, token) { let typeNode; - if (token.parent.parent.kind === 223 /* BinaryExpression */) { + if (token.parent.parent.kind === 224 /* BinaryExpression */) { const binaryExpression = token.parent.parent; const otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left; const widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression))); @@ -142663,7 +142728,7 @@ 1 /* NoTruncation */ ) : void 0; } - return typeNode || factory.createKeywordTypeNode(131 /* AnyKeyword */); + return typeNode || factory.createKeywordTypeNode(132 /* AnyKeyword */); } function addPropertyDeclaration(changeTracker, sourceFile, node, tokenName, typeNode, modifierFlags) { const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0; @@ -142700,7 +142765,7 @@ return res; } function createAddIndexSignatureAction(context, sourceFile, node, tokenName, typeNode) { - const stringTypeNode = factory.createKeywordTypeNode(152 /* StringKeyword */); + const stringTypeNode = factory.createKeywordTypeNode(153 /* StringKeyword */); const indexingParameter = factory.createParameterDeclaration( /*modifiers*/ void 0, @@ -142740,7 +142805,7 @@ } function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 171 /* MethodDeclaration */ : 170 /* MethodSignature */; + const kind = isClassLike(parentDeclaration) ? 172 /* MethodDeclaration */ : 171 /* MethodSignature */; const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); if (containingMethodDeclaration) { @@ -142769,8 +142834,8 @@ function addFunctionDeclaration(changes, context, info) { const quotePreference = getQuotePreference(context.sourceFile, context.preferences); const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(259 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( - 259 /* FunctionDeclaration */, + const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(260 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( + 260 /* FunctionDeclaration */, context, quotePreference, info.signature, @@ -142919,7 +142984,7 @@ if (signature === void 0) return createUndefined(); const func = createSignatureDeclarationFromSignature( - 215 /* FunctionExpression */, + 216 /* FunctionExpression */, context, quotePreference, signature[0], @@ -143274,7 +143339,7 @@ } function getNodes(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - if (token.kind !== 108 /* ThisKeyword */) + if (token.kind !== 109 /* ThisKeyword */) return void 0; const constructor = getContainingFunction(token); const superCall = findSuperCall(constructor.body); @@ -143548,11 +143613,11 @@ const token = getTokenAtPosition(sourceFile, pos); const heritageClauses = getContainingClass(token).heritageClauses; const extendsToken = heritageClauses[0].getFirstToken(); - return extendsToken.kind === 94 /* ExtendsKeyword */ ? { extendsToken, heritageClauses } : void 0; + return extendsToken.kind === 95 /* ExtendsKeyword */ ? { extendsToken, heritageClauses } : void 0; } function doChanges2(changes, sourceFile, extendsToken, heritageClauses) { - changes.replaceNode(sourceFile, extendsToken, factory.createToken(117 /* ImplementsKeyword */)); - if (heritageClauses.length === 2 && heritageClauses[0].token === 94 /* ExtendsKeyword */ && heritageClauses[1].token === 117 /* ImplementsKeyword */) { + changes.replaceNode(sourceFile, extendsToken, factory.createToken(118 /* ImplementsKeyword */)); + if (heritageClauses.length === 2 && heritageClauses[0].token === 95 /* ExtendsKeyword */ && heritageClauses[1].token === 118 /* ImplementsKeyword */) { const implementsToken = heritageClauses[1].getFirstToken(); const implementsFullStart = implementsToken.getFullStart(); changes.replaceRange(sourceFile, { pos: implementsFullStart, end: implementsFullStart }, factory.createToken(27 /* CommaToken */)); @@ -143797,18 +143862,18 @@ // src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts function getImportDeclaration(sourceFile, program, start) { const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier); - if (!identifier || identifier.parent.kind !== 180 /* TypeReference */) + if (!identifier || identifier.parent.kind !== 181 /* TypeReference */) return; const checker = program.getTypeChecker(); const symbol = checker.getSymbolAtLocation(identifier); return find((symbol == null ? void 0 : symbol.declarations) || emptyArray, or(isImportClause, isImportSpecifier, isImportEqualsDeclaration)); } function doTypeOnlyImportChange(changes, sourceFile, importDeclaration, program) { - if (importDeclaration.kind === 268 /* ImportEqualsDeclaration */) { - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, importDeclaration.name); + if (importDeclaration.kind === 269 /* ImportEqualsDeclaration */) { + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, importDeclaration.name); return; } - const importClause = importDeclaration.kind === 270 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; + const importClause = importDeclaration.kind === 271 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; if (importClause.name && importClause.namedBindings) { return; } @@ -143820,7 +143885,7 @@ if (importsValue) { return; } - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, importClause); + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, importClause); } function doNamespaceImportChange(changes, sourceFile, importDeclaration, program) { ts_refactor_exports.doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, importDeclaration.parent); @@ -143839,7 +143904,7 @@ const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); if (!importDeclaration) return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 273 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); + const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 274 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); const typeOnlyChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => doTypeOnlyImportChange(t, context.sourceFile, importDeclaration, context.program)); let actions2; if (namespaceChanges.length) { @@ -143857,7 +143922,7 @@ // src/services/codefixes/fixUnusedIdentifier.ts function changeInferToUnknown(changes, sourceFile, token) { - changes.replaceNode(sourceFile, token.parent, factory.createKeywordTypeNode(157 /* UnknownKeyword */)); + changes.replaceNode(sourceFile, token.parent, factory.createKeywordTypeNode(158 /* UnknownKeyword */)); } function createDeleteFix(changes, diag2) { return createCodeFixAction(fixName3, changes, diag2, fixIdDelete, Diagnostics.Delete_all_unused_declarations); @@ -143866,16 +143931,16 @@ changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } function isImport(token) { - return token.kind === 100 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 273 /* ImportSpecifier */ || token.parent.kind === 270 /* ImportClause */); + return token.kind === 101 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 274 /* ImportSpecifier */ || token.parent.kind === 271 /* ImportClause */); } function tryGetFullImport(token) { - return token.kind === 100 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; + return token.kind === 101 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; } function canDeleteEntireVariableStatement(sourceFile, token) { return isVariableDeclarationList(token.parent) && first(token.parent.getChildren(sourceFile)) === token; } function deleteEntireVariableStatement(changes, sourceFile, node) { - changes.delete(sourceFile, node.parent.kind === 240 /* VariableStatement */ ? node.parent : node); + changes.delete(sourceFile, node.parent.kind === 241 /* VariableStatement */ ? node.parent : node); } function deleteDestructuringElements(changes, sourceFile, node) { forEach(node.elements, (n) => changes.delete(sourceFile, n)); @@ -143901,7 +143966,7 @@ function tryPrefixDeclaration(changes, errorCode, sourceFile, token) { if (errorCode === Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code) return; - if (token.kind === 138 /* InferKeyword */) { + if (token.kind === 139 /* InferKeyword */) { token = cast(token.parent, isInferTypeNode).typeParameter.name; } if (isIdentifier(token) && canPrefix(token)) { @@ -143917,14 +143982,14 @@ } function canPrefix(token) { switch (token.parent.kind) { - case 166 /* Parameter */: - case 165 /* TypeParameter */: + case 167 /* Parameter */: + case 166 /* TypeParameter */: return true; - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { const varDecl = token.parent; switch (varDecl.parent.parent.kind) { - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: return true; } } @@ -143973,8 +144038,8 @@ function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { const { parent: parent2 } = parameter; switch (parent2.kind) { - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: const index = parent2.parameters.indexOf(parameter); const referent = isMethodDeclaration(parent2) ? parent2.name : parent2; const entries = ts_FindAllReferences_exports.Core.getReferencedSymbolsForNode(parent2.pos, referent, program, sourceFiles, cancellationToken); @@ -143992,18 +144057,18 @@ } } return true; - case 259 /* FunctionDeclaration */: { + case 260 /* FunctionDeclaration */: { if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { return isLastParameter(parent2, parameter, isFixAll); } return true; } - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return isLastParameter(parent2, parameter, isFixAll); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return false; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return true; default: return Debug.failBadSyntaxKind(parent2); @@ -144096,7 +144161,7 @@ ]; } const result = []; - if (token.kind === 138 /* InferKeyword */) { + if (token.kind === 139 /* InferKeyword */) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => changeInferToUnknown(t, sourceFile, token)); const name = cast(token.parent, isInferTypeNode).typeParameter.name.text; result.push(createCodeFixAction(fixName3, changes, [Diagnostics.Replace_infer_0_with_unknown, name], fixIdInfer, Diagnostics.Replace_all_unused_infer_with_unknown)); @@ -144154,7 +144219,7 @@ break; } case fixIdDelete: { - if (token.kind === 138 /* InferKeyword */ || isImport(token)) { + if (token.kind === 139 /* InferKeyword */ || isImport(token)) { break; } else if (isJSDocTemplateTag(token)) { changes.delete(sourceFile, token); @@ -144186,7 +144251,7 @@ break; } case fixIdInfer: - if (token.kind === 138 /* InferKeyword */) { + if (token.kind === 139 /* InferKeyword */) { changeInferToUnknown(changes, sourceFile, token); } break; @@ -144216,7 +144281,7 @@ const container = (isBlock(statement.parent) ? statement.parent : statement).parent; if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { - case 242 /* IfStatement */: + case 243 /* IfStatement */: if (container.elseStatement) { if (isBlock(statement.parent)) { break; @@ -144225,8 +144290,8 @@ } return; } - case 244 /* WhileStatement */: - case 245 /* ForStatement */: + case 245 /* WhileStatement */: + case 246 /* ForStatement */: changes.delete(sourceFile, container); return; } @@ -144322,22 +144387,22 @@ } function isTypeContainer(node) { switch (node.kind) { - case 231 /* AsExpression */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 259 /* FunctionDeclaration */: - case 174 /* GetAccessor */: - case 178 /* IndexSignature */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 175 /* SetAccessor */: - case 262 /* TypeAliasDeclaration */: - case 213 /* TypeAssertionExpression */: - case 257 /* VariableDeclaration */: + case 232 /* AsExpression */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 260 /* FunctionDeclaration */: + case 175 /* GetAccessor */: + case 179 /* IndexSignature */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 176 /* SetAccessor */: + case 263 /* TypeAliasDeclaration */: + case 214 /* TypeAssertionExpression */: + case 258 /* VariableDeclaration */: return true; default: return false; @@ -144379,7 +144444,7 @@ const { typeNode, type } = info; const original = typeNode.getText(sourceFile); const actions2 = [fix(type, fixIdPlain, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)]; - if (typeNode.kind === 317 /* JSDocNullableType */) { + if (typeNode.kind === 318 /* JSDocNullableType */) { actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); } return actions2; @@ -144397,7 +144462,7 @@ if (!info) return; const { typeNode, type } = info; - const fixedType = typeNode.kind === 317 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; + const fixedType = typeNode.kind === 318 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; doChange21(changes, sourceFile, typeNode, fixedType, checker); }); } @@ -144470,14 +144535,14 @@ } let insertBefore; switch (containingFunction.kind) { - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: insertBefore = containingFunction.name; break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - insertBefore = findChildOfKind(containingFunction, 98 /* FunctionKeyword */, sourceFile); + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + insertBefore = findChildOfKind(containingFunction, 99 /* FunctionKeyword */, sourceFile); break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: const kind = containingFunction.typeParameters ? 29 /* LessThanToken */ : 20 /* OpenParenToken */; insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); break; @@ -144496,7 +144561,7 @@ changes.replaceNode(sourceFile, returnType, factory.createTypeReferenceNode("Promise", factory.createNodeArray([returnType]))); } } - changes.insertModifierBefore(sourceFile, 132 /* AsyncKeyword */, insertBefore); + changes.insertModifierBefore(sourceFile, 133 /* AsyncKeyword */, insertBefore); } var fixId36, errorCodes46; var init_fixAwaitInSyncFunction = __esm({ @@ -144631,7 +144696,7 @@ return errorCode; } function doChange25(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, preferences) { - if (!isParameterPropertyModifier(token.kind) && token.kind !== 79 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 108 /* ThisKeyword */) { + if (!isParameterPropertyModifier(token.kind) && token.kind !== 79 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 109 /* ThisKeyword */) { return void 0; } const { parent: parent2 } = token; @@ -144784,7 +144849,7 @@ function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 168 /* PropertySignature */) { + if (isInJSFile(sourceFile) && declaration.kind !== 169 /* PropertySignature */) { const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; if (!parent2) { return; @@ -144895,17 +144960,17 @@ function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { let searchToken; switch (containingFunction.kind) { - case 173 /* Constructor */: - searchToken = findChildOfKind(containingFunction, 135 /* ConstructorKeyword */, sourceFile); + case 174 /* Constructor */: + searchToken = findChildOfKind(containingFunction, 136 /* ConstructorKeyword */, sourceFile); break; - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: const parent2 = containingFunction.parent; searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; break; - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: searchToken = containingFunction.name; break; } @@ -145041,44 +145106,44 @@ node = node.parent; } switch (node.parent.kind) { - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: inferTypeFromExpressionStatement(node, usage); break; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: usage.isNumber = true; break; - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: inferTypeFromPrefixUnaryExpression(node.parent, usage); break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: inferTypeFromBinaryExpression(node, node.parent, usage); break; - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: inferTypeFromSwitchStatementLabel(node.parent, usage); break; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: if (node.parent.expression === node) { inferTypeFromCallExpression(node.parent, usage); } else { inferTypeFromContextualType(node, usage); } break; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: inferTypeFromPropertyAccessExpression(node.parent, usage); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: inferTypeFromPropertyElementExpression(node.parent, node, usage); break; - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: inferTypeFromPropertyAssignment(node.parent, usage); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: inferTypeFromPropertyDeclaration(node.parent, usage); break; - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { const { name, initializer } = node.parent; if (node === name) { if (initializer) { @@ -145168,14 +145233,14 @@ case 35 /* ExclamationEqualsToken */: addCandidateType(usage, checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left)); break; - case 101 /* InKeyword */: + case 102 /* InKeyword */: if (node === parent2.left) { usage.isString = true; } break; case 56 /* BarBarToken */: case 60 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 257 /* VariableDeclaration */ || isAssignmentExpression( + if (node === parent2.left && (node.parent.parent.kind === 258 /* VariableDeclaration */ || isAssignmentExpression( node.parent.parent, /*excludeCompoundAssignment*/ true @@ -145185,7 +145250,7 @@ break; case 55 /* AmpersandAmpersandToken */: case 27 /* CommaToken */: - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: break; } } @@ -145203,7 +145268,7 @@ } } calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 210 /* CallExpression */) { + if (parent2.kind === 211 /* CallExpression */) { (usage.calls || (usage.calls = [])).push(call); } else { (usage.constructs || (usage.constructs = [])).push(call); @@ -145756,7 +145821,7 @@ const declaration = declarations == null ? void 0 : declarations[0]; const checker = context.program.getTypeChecker(); const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); - const kind = (_a2 = declaration == null ? void 0 : declaration.kind) != null ? _a2 : 168 /* PropertySignature */; + const kind = (_a2 = declaration == null ? void 0 : declaration.kind) != null ? _a2 : 169 /* PropertySignature */; const declarationName = getSynthesizedDeepClone( getNameOfDeclaration(declaration), /*includeTrivia*/ @@ -145773,8 +145838,8 @@ const ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient; const quotePreference = getQuotePreference(sourceFile, preferences); switch (kind) { - case 168 /* PropertySignature */: - case 169 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 170 /* PropertyDeclaration */: const flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : void 0; let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { @@ -145793,8 +145858,8 @@ void 0 )); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { Debug.assertIsDefined(declarations); let typeNode2 = checker.typeToTypeNode( type, @@ -145842,8 +145907,8 @@ } break; } - case 170 /* MethodSignature */: - case 171 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 172 /* MethodDeclaration */: Debug.assertIsDefined(declarations); const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); if (!some(signatures)) { @@ -145870,7 +145935,7 @@ break; } function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(171 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); + const method = createSignatureDeclarationFromSignature(172 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); if (method) addClassElement(method); } @@ -145880,7 +145945,7 @@ modifiers2 = combine(modifiers2, factory.createModifiersFromModifierFlags(modifierFlags)); } if (shouldAddOverrideKeyword()) { - modifiers2 = append(modifiers2, factory.createToken(161 /* OverrideKeyword */)); + modifiers2 = append(modifiers2, factory.createToken(162 /* OverrideKeyword */)); } return modifiers2 && factory.createNodeArray(modifiers2); } @@ -146041,7 +146106,7 @@ tracker ); switch (kind) { - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return factory.createMethodDeclaration( modifiers, asteriskToken, @@ -146053,7 +146118,7 @@ type, createStubbedMethodBody(quotePreference) ); - case 170 /* MethodSignature */: + case 171 /* MethodSignature */: return factory.createMethodSignature( modifiers, name, @@ -146061,9 +146126,9 @@ void 0, typeParameters, parameters, - type === void 0 ? factory.createKeywordTypeNode(157 /* UnknownKeyword */) : type + type === void 0 ? factory.createKeywordTypeNode(158 /* UnknownKeyword */) : type ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return factory.createFunctionDeclaration( modifiers, asteriskToken, @@ -146180,7 +146245,7 @@ /*questionToken*/ minArgumentCount !== void 0 && i >= minArgumentCount ? factory.createToken(57 /* QuestionToken */) : void 0, /*type*/ - inJs ? void 0 : (types == null ? void 0 : types[i]) || factory.createKeywordTypeNode(157 /* UnknownKeyword */), + inJs ? void 0 : (types == null ? void 0 : types[i]) || factory.createKeywordTypeNode(158 /* UnknownKeyword */), /*initializer*/ void 0 ); @@ -146220,7 +146285,7 @@ maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", /*questionToken*/ maxNonRestArgs >= minArgumentCount ? factory.createToken(57 /* QuestionToken */) : void 0, - factory.createArrayTypeNode(factory.createKeywordTypeNode(157 /* UnknownKeyword */)), + factory.createArrayTypeNode(factory.createKeywordTypeNode(158 /* UnknownKeyword */)), /*initializer*/ void 0 ); @@ -146468,7 +146533,7 @@ isStatic: hasStaticModifier(declaration), isReadonly: hasEffectiveReadonlyModifier(declaration), type: getDeclarationType(declaration, program), - container: declaration.kind === 166 /* Parameter */ ? declaration.parent.parent : declaration.parent, + container: declaration.kind === 167 /* Parameter */ ? declaration.parent.parent : declaration.parent, originalName: declaration.name.text, declaration, fieldName, @@ -146563,10 +146628,10 @@ if (!constructor.body) return; constructor.body.forEachChild(function recur(node) { - if (isElementAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */ && isStringLiteral(node.argumentExpression) && node.argumentExpression.text === originalName && isWriteAccess(node)) { + if (isElementAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */ && isStringLiteral(node.argumentExpression) && node.argumentExpression.text === originalName && isWriteAccess(node)) { changeTracker.replaceNode(file, node.argumentExpression, factory.createStringLiteral(fieldName)); } - if (isPropertyAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */ && node.name.text === originalName && isWriteAccess(node)) { + if (isPropertyAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */ && node.name.text === originalName && isWriteAccess(node)) { changeTracker.replaceNode(file, node.name, factory.createIdentifier(fieldName)); } if (!isFunctionLike(node) && !isClassLike(node)) { @@ -146581,7 +146646,7 @@ const type = typeChecker.getTypeFromTypeNode(typeNode); if (!typeChecker.isTypeAssignableTo(typeChecker.getUndefinedType(), type)) { const types = isUnionTypeNode(typeNode) ? typeNode.types : [typeNode]; - return factory.createUnionTypeNode([...types, factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]); + return factory.createUnionTypeNode([...types, factory.createKeywordTypeNode(156 /* UndefinedKeyword */)]); } } return typeNode; @@ -146640,7 +146705,7 @@ } function getActionsForUsageOfInvalidImport(context) { const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 210 /* CallExpression */ : 211 /* NewExpression */; + const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 211 /* CallExpression */ : 212 /* NewExpression */; const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); if (!node) { return []; @@ -146741,7 +146806,7 @@ return createCodeFixAction(fixName6, changes, [Diagnostics.Add_undefined_type_to_property_0, info.prop.name.getText()], fixIdAddUndefinedType, Diagnostics.Add_undefined_type_to_all_uninitialized_properties); } function addUndefinedType(changeTracker, sourceFile, info) { - const undefinedTypeNode = factory.createKeywordTypeNode(155 /* UndefinedKeyword */); + const undefinedTypeNode = factory.createKeywordTypeNode(156 /* UndefinedKeyword */); const types = isUnionTypeNode(info.type) ? info.type.types.concat(undefinedTypeNode) : [info.type, undefinedTypeNode]; const unionTypeNode = factory.createUnionTypeNode(types); if (info.isJs) { @@ -147044,8 +147109,8 @@ // src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts function getImportTypeNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - Debug.assert(token.kind === 100 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 202 /* ImportType */, "Token parent should be an ImportType"); + Debug.assert(token.kind === 101 /* ImportKeyword */, "This token should be an ImportKeyword"); + Debug.assert(token.parent.kind === 203 /* ImportType */, "Token parent should be an ImportType"); return token.parent; } function doChange29(changes, sourceFile, importType) { @@ -147174,7 +147239,7 @@ parameter.type ); const mappedIntersectionType = factory.createMappedTypeNode( - hasEffectiveReadonlyModifier(indexSignature) ? factory.createModifier(146 /* ReadonlyKeyword */) : void 0, + hasEffectiveReadonlyModifier(indexSignature) ? factory.createModifier(147 /* ReadonlyKeyword */) : void 0, mappedTypeParameter, /*nameType*/ void 0, @@ -147249,7 +147314,7 @@ // src/services/codefixes/removeUnnecessaryAwait.ts function makeChange10(changeTracker, sourceFile, span) { - const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 133 /* AwaitKeyword */); + const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 134 /* AwaitKeyword */); const awaitExpression = awaitKeyword && tryCast(awaitKeyword.parent, isAwaitExpression); if (!awaitExpression) { return; @@ -147264,7 +147329,7 @@ ); if (isIdentifier(leftMostExpression)) { const precedingToken = findPrecedingToken(awaitExpression.parent.pos, sourceFile); - if (precedingToken && precedingToken.kind !== 103 /* NewKeyword */) { + if (precedingToken && precedingToken.kind !== 104 /* NewKeyword */) { expressionToReplace = awaitExpression.parent; } } @@ -147369,13 +147434,13 @@ const declaration = tryCast((_a2 = symbol == null ? void 0 : symbol.valueDeclaration) == null ? void 0 : _a2.parent, isVariableDeclarationList); if (declaration === void 0) return; - const constToken = findChildOfKind(declaration, 85 /* ConstKeyword */, sourceFile); + const constToken = findChildOfKind(declaration, 86 /* ConstKeyword */, sourceFile); if (constToken === void 0) return; return { symbol, token: constToken }; } function doChange32(changes, sourceFile, token) { - changes.replaceNode(sourceFile, token, factory.createToken(119 /* LetKeyword */)); + changes.replaceNode(sourceFile, token, factory.createToken(120 /* LetKeyword */)); } var fixId49, errorCodes61; var init_convertConstToLet = __esm({ @@ -147475,7 +147540,7 @@ const typeArguments = getEffectiveTypeArguments(decl.parent.parent); if (some(typeArguments)) { const typeArgument = typeArguments[0]; - const needsParens = !isUnionTypeNode(typeArgument) && !isParenthesizedTypeNode(typeArgument) && isParenthesizedTypeNode(factory.createUnionTypeNode([typeArgument, factory.createKeywordTypeNode(114 /* VoidKeyword */)]).types[0]); + const needsParens = !isUnionTypeNode(typeArgument) && !isParenthesizedTypeNode(typeArgument) && isParenthesizedTypeNode(factory.createUnionTypeNode([typeArgument, factory.createKeywordTypeNode(115 /* VoidKeyword */)]).types[0]); if (needsParens) { changes.insertText(sourceFile, typeArgument.pos, "("); } @@ -147762,7 +147827,7 @@ if (stringCompletions) { return stringCompletions; } - if (previousToken && isBreakOrContinueStatement(previousToken.parent) && (previousToken.kind === 81 /* BreakKeyword */ || previousToken.kind === 86 /* ContinueKeyword */ || previousToken.kind === 79 /* Identifier */)) { + if (previousToken && isBreakOrContinueStatement(previousToken.parent) && (previousToken.kind === 82 /* BreakKeyword */ || previousToken.kind === 87 /* ContinueKeyword */ || previousToken.kind === 79 /* Identifier */)) { return getLabelCompletionAtPosition(previousToken.parent); } const completionData = getCompletionData( @@ -147904,7 +147969,7 @@ } function keywordFiltersFromSyntaxKind(keywordCompletion) { switch (keywordCompletion) { - case 154 /* TypeKeyword */: + case 155 /* TypeKeyword */: return 8 /* TypeKeyword */; default: Debug.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters"); @@ -148130,14 +148195,14 @@ } function typeNodeToExpression(typeNode, languageVersion, quotePreference) { switch (typeNode.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: const typeName = typeNode.typeName; return entityNameToExpression(typeName, languageVersion, quotePreference); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: const objectExpression = typeNodeToExpression(typeNode.objectType, languageVersion, quotePreference); const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference); return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression); - case 198 /* LiteralType */: + case 199 /* LiteralType */: const literal = typeNode.literal; switch (literal.kind) { case 10 /* StringLiteral */: @@ -148146,12 +148211,12 @@ return factory.createNumericLiteral(literal.text, literal.numericLiteralFlags); } return void 0; - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference); return exp && (isIdentifier(exp) ? exp : factory.createParenthesizedExpression(exp)); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference); - case 202 /* ImportType */: + case 203 /* ImportType */: Debug.fail(`We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.`); } return void 0; @@ -148186,12 +148251,12 @@ function getJsxClosingTagCompletion(location, sourceFile) { const jsxClosingElement = findAncestor(location, (node) => { switch (node.kind) { - case 284 /* JsxClosingElement */: + case 285 /* JsxClosingElement */: return true; case 43 /* SlashToken */: case 31 /* GreaterThanToken */: case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return false; default: return "quit"; @@ -148545,10 +148610,10 @@ const quotePreference = getQuotePreference(sourceFile, preferences); const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (declaration.kind) { - case 168 /* PropertySignature */: - case 169 /* PropertyDeclaration */: - case 170 /* MethodSignature */: - case 171 /* MethodDeclaration */: { + case 169 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 171 /* MethodSignature */: + case 172 /* MethodDeclaration */: { let effectiveType = type.flags & 1048576 /* Union */ && type.types.length < 10 ? checker.getUnionType(type.types, 2 /* Subtype */) : type; if (effectiveType.flags & 1048576 /* Union */) { const functionTypes = filter(effectiveType.types, (type2) => checker.getSignaturesOfType(type2, 0 /* Call */).length > 0); @@ -148785,8 +148850,8 @@ true ); const isImportSpecifierTypeOnly = importStatementCompletion.couldBeTypeOnlyImportSpecifier; - const topLevelTypeOnlyText = importStatementCompletion.isTopLevelTypeOnly ? ` ${tokenToString(154 /* TypeKeyword */)} ` : " "; - const importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? `${tokenToString(154 /* TypeKeyword */)} ` : ""; + const topLevelTypeOnlyText = importStatementCompletion.isTopLevelTypeOnly ? ` ${tokenToString(155 /* TypeKeyword */)} ` : " "; + const importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? `${tokenToString(155 /* TypeKeyword */)} ` : ""; const suffix = useSemicolons ? ";" : ""; switch (importKind) { case 3 /* CommonJS */: @@ -149162,18 +149227,18 @@ return getContextualTypeFromParent(previousToken, checker); case 63 /* EqualsToken */: switch (parent2.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return checker.getContextualType(parent2.initializer); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return checker.getTypeAtLocation(parent2.left); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return checker.getContextualTypeForJsxAttribute(parent2); default: return void 0; } - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: return checker.getContextualType(parent2); - case 82 /* CaseKeyword */: + case 83 /* CaseKeyword */: const caseClause = tryCast(parent2, isCaseClause); return caseClause ? getSwitchedType(caseClause, checker) : void 0; case 18 /* OpenBraceToken */: @@ -149204,7 +149269,7 @@ } function isModuleSymbol(symbol) { var _a2; - return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 308 /* SourceFile */)); + return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 309 /* SourceFile */)); } function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { const typeChecker = program.getTypeChecker(); @@ -149236,7 +149301,7 @@ const typeExpression = tryGetTypeExpressionFromTag(tag); if (typeExpression) { currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 351 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { + if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 352 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); } } @@ -149294,7 +149359,7 @@ isRightOfDot = contextToken.kind === 24 /* DotToken */; isRightOfQuestionDot = contextToken.kind === 28 /* QuestionDotToken */; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); @@ -149302,68 +149367,68 @@ return void 0; } break; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: node = parent2.left; break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: node = parent2.name; break; - case 202 /* ImportType */: + case 203 /* ImportType */: node = parent2; break; - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: node = parent2.getFirstToken(sourceFile); - Debug.assert(node.kind === 100 /* ImportKeyword */ || node.kind === 103 /* NewKeyword */); + Debug.assert(node.kind === 101 /* ImportKeyword */ || node.kind === 104 /* NewKeyword */); break; default: return void 0; } } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 208 /* PropertyAccessExpression */) { + if (parent2 && parent2.kind === 209 /* PropertyAccessExpression */) { contextToken = parent2; parent2 = parent2.parent; } if (currentToken.parent === location) { switch (currentToken.kind) { case 31 /* GreaterThanToken */: - if (currentToken.parent.kind === 281 /* JsxElement */ || currentToken.parent.kind === 283 /* JsxOpeningElement */) { + if (currentToken.parent.kind === 282 /* JsxElement */ || currentToken.parent.kind === 284 /* JsxOpeningElement */) { location = currentToken; } break; case 43 /* SlashToken */: - if (currentToken.parent.kind === 282 /* JsxSelfClosingElement */) { + if (currentToken.parent.kind === 283 /* JsxSelfClosingElement */) { location = currentToken; } break; } } switch (parent2.kind) { - case 284 /* JsxClosingElement */: + case 285 /* JsxClosingElement */: if (contextToken.kind === 43 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (!binaryExpressionMayBeOpenTag(parent2)) { break; } - case 282 /* JsxSelfClosingElement */: - case 281 /* JsxElement */: - case 283 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: + case 282 /* JsxElement */: + case 284 /* JsxOpeningElement */: isJsxIdentifierExpected = true; if (contextToken.kind === 29 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } break; - case 291 /* JsxExpression */: - case 290 /* JsxSpreadAttribute */: - if (previousToken.kind === 19 /* CloseBraceToken */ || previousToken.kind === 79 /* Identifier */ && previousToken.parent.kind === 288 /* JsxAttribute */) { + case 292 /* JsxExpression */: + case 291 /* JsxSpreadAttribute */: + if (previousToken.kind === 19 /* CloseBraceToken */ || previousToken.kind === 79 /* Identifier */ && previousToken.parent.kind === 289 /* JsxAttribute */) { isJsxIdentifierExpected = true; } break; - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: if (parent2.initializer === previousToken && previousToken.end < position) { isJsxIdentifierExpected = true; break; @@ -149451,15 +149516,15 @@ }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: - case 345 /* JSDocReturnTag */: - case 347 /* JSDocTypeTag */: - case 349 /* JSDocTypedefTag */: - case 352 /* JSDocThrowsTag */: - case 353 /* JSDocSatisfiesTag */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 346 /* JSDocReturnTag */: + case 348 /* JSDocTypeTag */: + case 350 /* JSDocTypedefTag */: + case 353 /* JSDocThrowsTag */: + case 354 /* JSDocSatisfiesTag */: return true; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return !!tag.constraint; default: return false; @@ -149468,7 +149533,7 @@ function tryGetTypeExpressionFromTag(tag) { if (isTagWithTypeExpression(tag)) { const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 312 /* JSDocTypeExpression */ ? typeExpression : void 0; + return typeExpression && typeExpression.kind === 313 /* JSDocTypeExpression */ ? typeExpression : void 0; } if (isJSDocAugmentsTag(tag) || isJSDocImplementsTag(tag)) { return tag.class; @@ -149478,7 +149543,7 @@ function getTypeScriptMemberSymbols() { completionKind = 2 /* PropertyAccess */; const isImportType = isLiteralImportTypeNode(node); - const isTypeLocation = insideJsDocTagTypeExpression || isImportType && !node.isTypeOf || isPartOfTypeNode(node.parent) || isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); + const isTypeLocation = isImportType && !node.isTypeOf || isPartOfTypeNode(node.parent) || isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); const isRhsOfImportDeclaration = isInRightSideOfInternalImportEqualsDeclaration(node); if (isEntityName(node) || isImportType || isPropertyAccessExpression(node)) { const isNamespaceName = isModuleDeclaration(node.parent); @@ -149498,13 +149563,13 @@ } : isRhsOfImportDeclaration ? ( // Any kind is allowed when dotting off namespace in internal import equals declaration (symbol2) => isValidTypeAccess(symbol2) || isValidValueAccess(symbol2) - ) : isTypeLocation ? isValidTypeAccess : isValidValueAccess; + ) : isTypeLocation || insideJsDocTagTypeExpression ? isValidTypeAccess : isValidValueAccess; for (const exportedSymbol of exportedSymbols) { if (isValidAccess(exportedSymbol)) { symbols.push(exportedSymbol); } } - if (!isTypeLocation && symbol.declarations && symbol.declarations.some((d) => d.kind !== 308 /* SourceFile */ && d.kind !== 264 /* ModuleDeclaration */ && d.kind !== 263 /* EnumDeclaration */)) { + if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 309 /* SourceFile */ && d.kind !== 265 /* ModuleDeclaration */ && d.kind !== 264 /* EnumDeclaration */)) { let type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); let insertQuestionDot = false; if (type.isNullableType()) { @@ -149547,7 +149612,7 @@ if (isRightOfQuestionDot && some(type.getCallSignatures())) { isNewIdentifierLocation = true; } - const propertyAccess = node.kind === 202 /* ImportType */ ? node : node.parent; + const propertyAccess = node.kind === 203 /* ImportType */ ? node : node.parent; if (inCheckedFile) { for (const symbol of type.getApparentProperties()) { if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) { @@ -149703,7 +149768,7 @@ } } } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 308 /* SourceFile */) { + if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 309 /* SourceFile */) { const thisType = typeChecker.tryGetThisTypeAt( scopeNode, /*includeGlobalThis*/ @@ -149738,10 +149803,10 @@ } function isSnippetScope(scopeNode) { switch (scopeNode.kind) { - case 308 /* SourceFile */: - case 225 /* TemplateExpression */: - case 291 /* JsxExpression */: - case 238 /* Block */: + case 309 /* SourceFile */: + case 226 /* TemplateExpression */: + case 292 /* JsxExpression */: + case 239 /* Block */: return true; default: return isStatement(scopeNode); @@ -149751,24 +149816,24 @@ return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 112 /* TypeOfKeyword */ && (contextToken2.parent.kind === 183 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 129 /* AssertsKeyword */ && contextToken2.parent.kind === 179 /* TypePredicate */); + return contextToken2 && (contextToken2.kind === 113 /* TypeOfKeyword */ && (contextToken2.parent.kind === 184 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 130 /* AssertsKeyword */ && contextToken2.parent.kind === 180 /* TypePredicate */); } function isContextTokenTypeLocation(contextToken2) { if (contextToken2) { const parentKind = contextToken2.parent.kind; switch (contextToken2.kind) { case 58 /* ColonToken */: - return parentKind === 169 /* PropertyDeclaration */ || parentKind === 168 /* PropertySignature */ || parentKind === 166 /* Parameter */ || parentKind === 257 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); + return parentKind === 170 /* PropertyDeclaration */ || parentKind === 169 /* PropertySignature */ || parentKind === 167 /* Parameter */ || parentKind === 258 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); case 63 /* EqualsToken */: - return parentKind === 262 /* TypeAliasDeclaration */; - case 128 /* AsKeyword */: - return parentKind === 231 /* AsExpression */; + return parentKind === 263 /* TypeAliasDeclaration */; + case 129 /* AsKeyword */: + return parentKind === 232 /* AsExpression */; case 29 /* LessThanToken */: - return parentKind === 180 /* TypeReference */ || parentKind === 213 /* TypeAssertionExpression */; - case 94 /* ExtendsKeyword */: - return parentKind === 165 /* TypeParameter */; - case 150 /* SatisfiesKeyword */: - return parentKind === 235 /* SatisfiesExpression */; + return parentKind === 181 /* TypeReference */ || parentKind === 214 /* TypeAssertionExpression */; + case 95 /* ExtendsKeyword */: + return parentKind === 166 /* TypeParameter */; + case 151 /* SatisfiesKeyword */: + return parentKind === 236 /* SatisfiesExpression */; } } return false; @@ -149946,14 +150011,14 @@ return true; } if (contextToken2.kind === 31 /* GreaterThanToken */ && contextToken2.parent) { - if (location === contextToken2.parent && (location.kind === 283 /* JsxOpeningElement */ || location.kind === 282 /* JsxSelfClosingElement */)) { + if (location === contextToken2.parent && (location.kind === 284 /* JsxOpeningElement */ || location.kind === 283 /* JsxSelfClosingElement */)) { return false; } - if (contextToken2.parent.kind === 283 /* JsxOpeningElement */) { - return location.parent.kind !== 283 /* JsxOpeningElement */; + if (contextToken2.parent.kind === 284 /* JsxOpeningElement */) { + return location.parent.kind !== 284 /* JsxOpeningElement */; } - if (contextToken2.parent.kind === 284 /* JsxClosingElement */ || contextToken2.parent.kind === 282 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 281 /* JsxElement */; + if (contextToken2.parent.kind === 285 /* JsxClosingElement */ || contextToken2.parent.kind === 283 /* JsxSelfClosingElement */) { + return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 282 /* JsxElement */; } } return false; @@ -149964,29 +150029,29 @@ const tokenKind = keywordForNode(contextToken); switch (tokenKind) { case 27 /* CommaToken */: - return containingNodeKind === 210 /* CallExpression */ || containingNodeKind === 173 /* Constructor */ || containingNodeKind === 211 /* NewExpression */ || containingNodeKind === 206 /* ArrayLiteralExpression */ || containingNodeKind === 223 /* BinaryExpression */ || containingNodeKind === 181 /* FunctionType */ || containingNodeKind === 207 /* ObjectLiteralExpression */; + return containingNodeKind === 211 /* CallExpression */ || containingNodeKind === 174 /* Constructor */ || containingNodeKind === 212 /* NewExpression */ || containingNodeKind === 207 /* ArrayLiteralExpression */ || containingNodeKind === 224 /* BinaryExpression */ || containingNodeKind === 182 /* FunctionType */ || containingNodeKind === 208 /* ObjectLiteralExpression */; case 20 /* OpenParenToken */: - return containingNodeKind === 210 /* CallExpression */ || containingNodeKind === 173 /* Constructor */ || containingNodeKind === 211 /* NewExpression */ || containingNodeKind === 214 /* ParenthesizedExpression */ || containingNodeKind === 193 /* ParenthesizedType */; + return containingNodeKind === 211 /* CallExpression */ || containingNodeKind === 174 /* Constructor */ || containingNodeKind === 212 /* NewExpression */ || containingNodeKind === 215 /* ParenthesizedExpression */ || containingNodeKind === 194 /* ParenthesizedType */; case 22 /* OpenBracketToken */: - return containingNodeKind === 206 /* ArrayLiteralExpression */ || containingNodeKind === 178 /* IndexSignature */ || containingNodeKind === 164 /* ComputedPropertyName */; - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 100 /* ImportKeyword */: + return containingNodeKind === 207 /* ArrayLiteralExpression */ || containingNodeKind === 179 /* IndexSignature */ || containingNodeKind === 165 /* ComputedPropertyName */; + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 101 /* ImportKeyword */: return true; case 24 /* DotToken */: - return containingNodeKind === 264 /* ModuleDeclaration */; + return containingNodeKind === 265 /* ModuleDeclaration */; case 18 /* OpenBraceToken */: - return containingNodeKind === 260 /* ClassDeclaration */ || containingNodeKind === 207 /* ObjectLiteralExpression */; + return containingNodeKind === 261 /* ClassDeclaration */ || containingNodeKind === 208 /* ObjectLiteralExpression */; case 63 /* EqualsToken */: - return containingNodeKind === 257 /* VariableDeclaration */ || containingNodeKind === 223 /* BinaryExpression */; + return containingNodeKind === 258 /* VariableDeclaration */ || containingNodeKind === 224 /* BinaryExpression */; case 15 /* TemplateHead */: - return containingNodeKind === 225 /* TemplateExpression */; + return containingNodeKind === 226 /* TemplateExpression */; case 16 /* TemplateMiddle */: - return containingNodeKind === 236 /* TemplateSpan */; - case 132 /* AsyncKeyword */: - return containingNodeKind === 171 /* MethodDeclaration */ || containingNodeKind === 300 /* ShorthandPropertyAssignment */; + return containingNodeKind === 237 /* TemplateSpan */; + case 133 /* AsyncKeyword */: + return containingNodeKind === 172 /* MethodDeclaration */ || containingNodeKind === 301 /* ShorthandPropertyAssignment */; case 41 /* AsteriskToken */: - return containingNodeKind === 171 /* MethodDeclaration */; + return containingNodeKind === 172 /* MethodDeclaration */; } if (isClassMemberCompletionKeyword(tokenKind)) { return true; @@ -150024,7 +150089,7 @@ completionKind = 0 /* ObjectPropertyDeclaration */; let typeMembers; let existingMembers; - if (objectLikeContainer.kind === 207 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 208 /* ObjectLiteralExpression */) { const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker); if (instantiatedType === void 0) { if (objectLikeContainer.flags & 33554432 /* InWithStatement */) { @@ -150046,16 +150111,16 @@ } } } else { - Debug.assert(objectLikeContainer.kind === 203 /* ObjectBindingPattern */); + Debug.assert(objectLikeContainer.kind === 204 /* ObjectBindingPattern */); isNewIdentifierLocation = false; const rootDeclaration = getRootDeclaration(objectLikeContainer.parent); if (!isVariableLike(rootDeclaration)) return Debug.fail("Root declaration is not variable-like."); - let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 247 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 166 /* Parameter */) { + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 248 /* ForOfStatement */; + if (!canGetType && rootDeclaration.kind === 167 /* Parameter */) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 171 /* MethodDeclaration */ || rootDeclaration.parent.kind === 175 /* SetAccessor */) { + } else if (rootDeclaration.parent.kind === 172 /* MethodDeclaration */ || rootDeclaration.parent.kind === 176 /* SetAccessor */) { canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -150081,7 +150146,7 @@ const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); symbols = concatenate(symbols, filteredMembers); setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 207 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { + if (objectLikeContainer.kind === 208 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { transformObjectLiteralMembersSortText(symbolsStartIndex); collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); } @@ -150097,10 +150162,10 @@ if (!isTypeKeywordTokenOrIdentifier(contextToken)) { keywordFilters = 8 /* TypeKeyword */; } - const { moduleSpecifier } = namedImportsOrExports.kind === 272 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 273 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; if (!moduleSpecifier) { isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 272 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; + return namedImportsOrExports.kind === 273 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; } const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); if (!moduleSpecifierSymbol) { @@ -150225,11 +150290,11 @@ case 30 /* LessThanSlashToken */: case 43 /* SlashToken */: case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: - case 289 /* JsxAttributes */: - case 288 /* JsxAttribute */: - case 290 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 282 /* JsxSelfClosingElement */ || parent2.kind === 283 /* JsxOpeningElement */)) { + case 209 /* PropertyAccessExpression */: + case 290 /* JsxAttributes */: + case 289 /* JsxAttribute */: + case 291 /* JsxSpreadAttribute */: + if (parent2 && (parent2.kind === 283 /* JsxSelfClosingElement */ || parent2.kind === 284 /* JsxOpeningElement */)) { if (contextToken2.kind === 31 /* GreaterThanToken */) { const precedingToken = findPrecedingToken( contextToken2.pos, @@ -150241,20 +150306,20 @@ break; } return parent2; - } else if (parent2.kind === 288 /* JsxAttribute */) { + } else if (parent2.kind === 289 /* JsxAttribute */) { return parent2.parent.parent; } break; case 10 /* StringLiteral */: - if (parent2 && (parent2.kind === 288 /* JsxAttribute */ || parent2.kind === 290 /* JsxSpreadAttribute */)) { + if (parent2 && (parent2.kind === 289 /* JsxAttribute */ || parent2.kind === 291 /* JsxSpreadAttribute */)) { return parent2.parent.parent; } break; case 19 /* CloseBraceToken */: - if (parent2 && parent2.kind === 291 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 288 /* JsxAttribute */) { + if (parent2 && parent2.kind === 292 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 289 /* JsxAttribute */) { return parent2.parent.parent.parent; } - if (parent2 && parent2.kind === 290 /* JsxSpreadAttribute */) { + if (parent2 && parent2.kind === 291 /* JsxSpreadAttribute */) { return parent2.parent.parent; } break; @@ -150267,59 +150332,59 @@ const containingNodeKind = parent2.kind; switch (contextToken2.kind) { case 27 /* CommaToken */: - return containingNodeKind === 257 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 240 /* VariableStatement */ || containingNodeKind === 263 /* EnumDeclaration */ || // enum a { foo, | - isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 261 /* InterfaceDeclaration */ || // interface A= contextToken2.pos; case 24 /* DotToken */: - return containingNodeKind === 204 /* ArrayBindingPattern */; + return containingNodeKind === 205 /* ArrayBindingPattern */; case 58 /* ColonToken */: - return containingNodeKind === 205 /* BindingElement */; + return containingNodeKind === 206 /* BindingElement */; case 22 /* OpenBracketToken */: - return containingNodeKind === 204 /* ArrayBindingPattern */; + return containingNodeKind === 205 /* ArrayBindingPattern */; case 20 /* OpenParenToken */: - return containingNodeKind === 295 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); + return containingNodeKind === 296 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); case 18 /* OpenBraceToken */: - return containingNodeKind === 263 /* EnumDeclaration */; + return containingNodeKind === 264 /* EnumDeclaration */; case 29 /* LessThanToken */: - return containingNodeKind === 260 /* ClassDeclaration */ || // class A< | - containingNodeKind === 228 /* ClassExpression */ || // var C = class D< | - containingNodeKind === 261 /* InterfaceDeclaration */ || // interface A< | - containingNodeKind === 262 /* TypeAliasDeclaration */ || // type List< | + return containingNodeKind === 261 /* ClassDeclaration */ || // class A< | + containingNodeKind === 229 /* ClassExpression */ || // var C = class D< | + containingNodeKind === 262 /* InterfaceDeclaration */ || // interface A< | + containingNodeKind === 263 /* TypeAliasDeclaration */ || // type List< | isFunctionLikeKind(containingNodeKind); - case 124 /* StaticKeyword */: - return containingNodeKind === 169 /* PropertyDeclaration */ && !isClassLike(parent2.parent); + case 125 /* StaticKeyword */: + return containingNodeKind === 170 /* PropertyDeclaration */ && !isClassLike(parent2.parent); case 25 /* DotDotDotToken */: - return containingNodeKind === 166 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 204 /* ArrayBindingPattern */; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - return containingNodeKind === 166 /* Parameter */ && !isConstructorDeclaration(parent2.parent); - case 128 /* AsKeyword */: - return containingNodeKind === 273 /* ImportSpecifier */ || containingNodeKind === 278 /* ExportSpecifier */ || containingNodeKind === 271 /* NamespaceImport */; - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: + return containingNodeKind === 167 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 205 /* ArrayBindingPattern */; + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + return containingNodeKind === 167 /* Parameter */ && !isConstructorDeclaration(parent2.parent); + case 129 /* AsKeyword */: + return containingNodeKind === 274 /* ImportSpecifier */ || containingNodeKind === 279 /* ExportSpecifier */ || containingNodeKind === 272 /* NamespaceImport */; + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: return !isFromObjectTypeDeclaration(contextToken2); case 79 /* Identifier */: - if (containingNodeKind === 273 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { + if (containingNodeKind === 274 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { return false; } break; - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: - case 118 /* InterfaceKeyword */: - case 98 /* FunctionKeyword */: - case 113 /* VarKeyword */: - case 100 /* ImportKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: - case 138 /* InferKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: + case 119 /* InterfaceKeyword */: + case 99 /* FunctionKeyword */: + case 114 /* VarKeyword */: + case 101 /* ImportKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: + case 139 /* InferKeyword */: return true; - case 154 /* TypeKeyword */: - return containingNodeKind !== 273 /* ImportSpecifier */; + case 155 /* TypeKeyword */: + return containingNodeKind !== 274 /* ImportSpecifier */; case 41 /* AsteriskToken */: return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); } @@ -150332,28 +150397,28 @@ } } switch (keywordForNode(contextToken2)) { - case 126 /* AbstractKeyword */: - case 84 /* ClassKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 92 /* EnumKeyword */: - case 98 /* FunctionKeyword */: - case 118 /* InterfaceKeyword */: - case 119 /* LetKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 124 /* StaticKeyword */: - case 113 /* VarKeyword */: + case 127 /* AbstractKeyword */: + case 85 /* ClassKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 93 /* EnumKeyword */: + case 99 /* FunctionKeyword */: + case 119 /* InterfaceKeyword */: + case 120 /* LetKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 125 /* StaticKeyword */: + case 114 /* VarKeyword */: return true; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return isPropertyDeclaration(contextToken2.parent); } const ancestorClassLike = findAncestor(contextToken2.parent, isClassLike); if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { return false; } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 169 /* PropertyDeclaration */); + const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 170 /* PropertyDeclaration */); if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { return false; @@ -150367,7 +150432,7 @@ return contextToken2.kind !== 63 /* EqualsToken */ && (contextToken2.kind === 26 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); } function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 173 /* Constructor */; + return isFunctionLikeKind(kind) && kind !== 174 /* Constructor */; } function isDotOfNumericLiteral(contextToken2) { if (contextToken2.kind === 8 /* NumericLiteral */) { @@ -150377,7 +150442,7 @@ return false; } function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 258 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); + return node2.parent.kind === 259 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); } function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (existingMembers.length === 0) { @@ -150386,7 +150451,7 @@ const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set(); const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 299 /* PropertyAssignment */ && m.kind !== 300 /* ShorthandPropertyAssignment */ && m.kind !== 205 /* BindingElement */ && m.kind !== 171 /* MethodDeclaration */ && m.kind !== 174 /* GetAccessor */ && m.kind !== 175 /* SetAccessor */ && m.kind !== 301 /* SpreadAssignment */) { + if (m.kind !== 300 /* PropertyAssignment */ && m.kind !== 301 /* ShorthandPropertyAssignment */ && m.kind !== 206 /* BindingElement */ && m.kind !== 172 /* MethodDeclaration */ && m.kind !== 175 /* GetAccessor */ && m.kind !== 176 /* SetAccessor */ && m.kind !== 302 /* SpreadAssignment */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -150466,7 +150531,7 @@ function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 169 /* PropertyDeclaration */ && m.kind !== 171 /* MethodDeclaration */ && m.kind !== 174 /* GetAccessor */ && m.kind !== 175 /* SetAccessor */) { + if (m.kind !== 170 /* PropertyDeclaration */ && m.kind !== 172 /* MethodDeclaration */ && m.kind !== 175 /* GetAccessor */ && m.kind !== 176 /* SetAccessor */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -150492,7 +150557,7 @@ if (isCurrentlyEditingNode(attr)) { continue; } - if (attr.kind === 288 /* JsxAttribute */) { + if (attr.kind === 289 /* JsxAttribute */) { seenNames.add(attr.name.escapedText); } else if (isJsxSpreadAttribute(attr)) { setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); @@ -150518,7 +150583,7 @@ break; case 41 /* AsteriskToken */: return isMethodDeclaration(parent2) ? tryCast(parent2.parent, isObjectLiteralExpression) : void 0; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return tryCast(parent2.parent, isObjectLiteralExpression); case 79 /* Identifier */: return contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent) ? contextToken.parent.parent : void 0; @@ -150592,7 +150657,7 @@ case 0 /* None */: return false; case 1 /* All */: - return isFunctionLikeBodyKeyword(kind) || kind === 136 /* DeclareKeyword */ || kind === 142 /* ModuleKeyword */ || kind === 154 /* TypeKeyword */ || kind === 143 /* NamespaceKeyword */ || kind === 126 /* AbstractKeyword */ || isTypeKeyword(kind) && kind !== 155 /* UndefinedKeyword */; + return isFunctionLikeBodyKeyword(kind) || kind === 137 /* DeclareKeyword */ || kind === 143 /* ModuleKeyword */ || kind === 155 /* TypeKeyword */ || kind === 144 /* NamespaceKeyword */ || kind === 127 /* AbstractKeyword */ || isTypeKeyword(kind) && kind !== 156 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); case 2 /* ClassElementKeywords */: @@ -150602,11 +150667,11 @@ case 4 /* ConstructorParameterKeywords */: return isParameterPropertyModifier(kind); case 6 /* TypeAssertionKeywords */: - return isTypeKeyword(kind) || kind === 85 /* ConstKeyword */; + return isTypeKeyword(kind) || kind === 86 /* ConstKeyword */; case 7 /* TypeKeywords */: return isTypeKeyword(kind); case 8 /* TypeKeyword */: - return kind === 154 /* TypeKeyword */; + return kind === 155 /* TypeKeyword */; default: return Debug.assertNever(keywordFilter); } @@ -150614,58 +150679,58 @@ } function isTypeScriptOnlyKeyword(kind) { switch (kind) { - case 126 /* AbstractKeyword */: - case 131 /* AnyKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 136 /* DeclareKeyword */: - case 92 /* EnumKeyword */: - case 159 /* GlobalKeyword */: - case 117 /* ImplementsKeyword */: - case 138 /* InferKeyword */: - case 118 /* InterfaceKeyword */: - case 140 /* IsKeyword */: - case 141 /* KeyOfKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 144 /* NeverKeyword */: - case 148 /* NumberKeyword */: - case 149 /* ObjectKeyword */: - case 161 /* OverrideKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 146 /* ReadonlyKeyword */: - case 152 /* StringKeyword */: - case 153 /* SymbolKeyword */: - case 154 /* TypeKeyword */: - case 156 /* UniqueKeyword */: - case 157 /* UnknownKeyword */: + case 127 /* AbstractKeyword */: + case 132 /* AnyKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 137 /* DeclareKeyword */: + case 93 /* EnumKeyword */: + case 160 /* GlobalKeyword */: + case 118 /* ImplementsKeyword */: + case 139 /* InferKeyword */: + case 119 /* InterfaceKeyword */: + case 141 /* IsKeyword */: + case 142 /* KeyOfKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 145 /* NeverKeyword */: + case 149 /* NumberKeyword */: + case 150 /* ObjectKeyword */: + case 162 /* OverrideKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 147 /* ReadonlyKeyword */: + case 153 /* StringKeyword */: + case 154 /* SymbolKeyword */: + case 155 /* TypeKeyword */: + case 157 /* UniqueKeyword */: + case 158 /* UnknownKeyword */: return true; default: return false; } } function isInterfaceOrTypeLiteralCompletionKeyword(kind) { - return kind === 146 /* ReadonlyKeyword */; + return kind === 147 /* ReadonlyKeyword */; } function isClassMemberCompletionKeyword(kind) { switch (kind) { - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 135 /* ConstructorKeyword */: - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 161 /* OverrideKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 136 /* ConstructorKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 162 /* OverrideKeyword */: return true; default: return isClassMemberModifier(kind); } } function isFunctionLikeBodyKeyword(kind) { - return kind === 132 /* AsyncKeyword */ || kind === 133 /* AwaitKeyword */ || kind === 128 /* AsKeyword */ || kind === 150 /* SatisfiesKeyword */ || kind === 154 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); + return kind === 133 /* AsyncKeyword */ || kind === 134 /* AwaitKeyword */ || kind === 129 /* AsKeyword */ || kind === 151 /* SatisfiesKeyword */ || kind === 155 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); } function keywordForNode(node) { var _a2; @@ -150680,7 +150745,7 @@ const currentLine = file.getLineAndCharacterOfPosition(position).line; if ((isImportDeclaration(parent2) || isExportDeclaration(parent2) && parent2.moduleSpecifier) && contextToken === parent2.moduleSpecifier && tokenLine === currentLine) { entries.push({ - name: tokenToString(130 /* AssertKeyword */), + name: tokenToString(131 /* AssertKeyword */), kind: "keyword" /* keyword */, kindModifiers: "" /* none */, sortText: SortText.GlobalsOrKeywords @@ -150706,7 +150771,7 @@ function getApparentProperties(type, node, checker) { if (!type.isUnion()) return type.getApparentProperties(); - return checker.getAllPossiblePropertiesOfTypes(filter(type.types, (memberType) => !(memberType.flags & 134348796 /* Primitive */ || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties())))); + return checker.getAllPossiblePropertiesOfTypes(filter(type.types, (memberType) => !(memberType.flags & 402784252 /* Primitive */ || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties())))); } function containsNonPublicProperties(props) { return some(props, (p) => !!(getDeclarationModifierFlagsFromSymbol(p) & 24 /* NonPublicAccessibilityModifier */)); @@ -150717,7 +150782,7 @@ function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { var _a2; switch (location.kind) { - case 354 /* SyntaxList */: + case 355 /* SyntaxList */: return tryCast(location.parent, isObjectTypeDeclaration); case 1 /* EndOfFileToken */: const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration); @@ -150740,7 +150805,7 @@ } if (!contextToken) return void 0; - if (location.kind === 135 /* ConstructorKeyword */ || isIdentifier(contextToken) && isPropertyDeclaration(contextToken.parent) && isClassLike(location)) { + if (location.kind === 136 /* ConstructorKeyword */ || isIdentifier(contextToken) && isPropertyDeclaration(contextToken.parent) && isClassLike(location)) { return findAncestor(contextToken, isClassLike); } switch (contextToken.kind) { @@ -150776,7 +150841,7 @@ case 26 /* SemicolonToken */: case 27 /* CommaToken */: case 79 /* Identifier */: - if (parent2.kind === 168 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 169 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { return parent2.parent; } break; @@ -150793,11 +150858,11 @@ if (!t) return void 0; switch (node.kind) { - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 190 /* IntersectionType */: - case 184 /* TypeLiteral */: - case 189 /* UnionType */: + case 191 /* IntersectionType */: + case 185 /* TypeLiteral */: + case 190 /* UnionType */: return t; } } @@ -150820,7 +150885,7 @@ case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 43 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 308 /* SourceFile */; + return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 309 /* SourceFile */; default: return Debug.assertNever(triggerCharacter); } @@ -150889,7 +150954,7 @@ return { isKeywordOnlyCompletion, keywordCompletion, - isNewIdentifierLocation: !!(candidate || keywordCompletion === 154 /* TypeKeyword */), + isNewIdentifierLocation: !!(candidate || keywordCompletion === 155 /* TypeKeyword */), isTopLevelTypeOnly: !!((_b = (_a2 = tryCast(candidate, isImportDeclaration)) == null ? void 0 : _a2.importClause) == null ? void 0 : _b.isTypeOnly) || !!((_c = tryCast(candidate, isImportEqualsDeclaration)) == null ? void 0 : _c.isTypeOnly), couldBeTypeOnlyImportSpecifier: !!candidate && couldBeTypeOnlyImportSpecifier(candidate, contextToken), replacementSpan: getSingleLineReplacementSpanForImportCompletionNode(candidate) @@ -150897,20 +150962,20 @@ function getCandidate() { const parent2 = contextToken.parent; if (isImportEqualsDeclaration(parent2)) { - keywordCompletion = contextToken.kind === 154 /* TypeKeyword */ ? void 0 : 154 /* TypeKeyword */; + keywordCompletion = contextToken.kind === 155 /* TypeKeyword */ ? void 0 : 155 /* TypeKeyword */; return isModuleSpecifierMissingOrEmpty(parent2.moduleReference) ? parent2 : void 0; } if (couldBeTypeOnlyImportSpecifier(parent2, contextToken) && canCompleteFromNamedBindings(parent2.parent)) { return parent2; } if (isNamedImports(parent2) || isNamespaceImport(parent2)) { - if (!parent2.parent.isTypeOnly && (contextToken.kind === 18 /* OpenBraceToken */ || contextToken.kind === 100 /* ImportKeyword */ || contextToken.kind === 27 /* CommaToken */)) { - keywordCompletion = 154 /* TypeKeyword */; + if (!parent2.parent.isTypeOnly && (contextToken.kind === 18 /* OpenBraceToken */ || contextToken.kind === 101 /* ImportKeyword */ || contextToken.kind === 27 /* CommaToken */)) { + keywordCompletion = 155 /* TypeKeyword */; } if (canCompleteFromNamedBindings(parent2)) { if (contextToken.kind === 19 /* CloseBraceToken */ || contextToken.kind === 79 /* Identifier */) { isKeywordOnlyCompletion = true; - keywordCompletion = 158 /* FromKeyword */; + keywordCompletion = 159 /* FromKeyword */; } else { return parent2.parent.parent; } @@ -150918,11 +150983,11 @@ return void 0; } if (isImportKeyword(contextToken) && isSourceFile(parent2)) { - keywordCompletion = 154 /* TypeKeyword */; + keywordCompletion = 155 /* TypeKeyword */; return contextToken; } if (isImportKeyword(contextToken) && isImportDeclaration(parent2)) { - keywordCompletion = 154 /* TypeKeyword */; + keywordCompletion = 155 /* TypeKeyword */; return isModuleSpecifierMissingOrEmpty(parent2.moduleSpecifier) ? parent2 : void 0; } return void 0; @@ -150937,8 +151002,8 @@ if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); } - Debug.assert(top.kind !== 100 /* ImportKeyword */ && top.kind !== 273 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 269 /* ImportDeclaration */ ? (_c = getPotentiallyInvalidImportSpecifier((_b = top.importClause) == null ? void 0 : _b.namedBindings)) != null ? _c : top.moduleSpecifier : top.moduleReference; + Debug.assert(top.kind !== 101 /* ImportKeyword */ && top.kind !== 274 /* ImportSpecifier */); + const potentialSplitPoint = top.kind === 270 /* ImportDeclaration */ ? (_c = getPotentiallyInvalidImportSpecifier((_b = top.importClause) == null ? void 0 : _b.namedBindings)) != null ? _c : top.moduleSpecifier : top.moduleReference; const withoutModuleSpecifier = { pos: top.getFirstToken().getStart(), end: potentialSplitPoint.pos @@ -151091,7 +151156,7 @@ _keywordCompletions = []; allKeywordsCompletions = memoize(() => { const res = []; - for (let i = 81 /* FirstKeyword */; i <= 162 /* LastKeyword */; i++) { + for (let i = 82 /* FirstKeyword */; i <= 163 /* LastKeyword */; i++) { res.push({ name: tokenToString(i), kind: "keyword" /* keyword */, @@ -151261,26 +151326,26 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeChecker, compilerOptions, host, preferences) { const parent2 = walkUpParentheses(node.parent); switch (parent2.kind) { - case 198 /* LiteralType */: { + case 199 /* LiteralType */: { const grandParent = walkUpParentheses(parent2.parent); switch (grandParent.kind) { - case 230 /* ExpressionWithTypeArguments */: - case 180 /* TypeReference */: { + case 231 /* ExpressionWithTypeArguments */: + case 181 /* TypeReference */: { const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); if (typeArgument) { return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; } return void 0; } - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: const { indexType, objectType } = grandParent; if (!rangeContainsPosition(indexType, position)) { return void 0; } return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType)); - case 202 /* ImportType */: + case 203 /* ImportType */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - case 189 /* UnionType */: { + case 190 /* UnionType */: { if (!isTypeReferenceNode(grandParent.parent)) { return void 0; } @@ -151292,30 +151357,30 @@ return void 0; } } - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker, parent2.parent); } return fromContextualType() || fromContextualType(0 /* None */); - case 209 /* ElementAccessExpression */: { + case 210 /* ElementAccessExpression */: { const { expression, argumentExpression } = parent2; if (node === skipParentheses(argumentExpression)) { return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression)); } return void 0; } - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 288 /* JsxAttribute */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 289 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 288 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); + const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 289 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(); } - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 280 /* ExternalModuleReference */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 281 /* ExternalModuleReference */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - case 292 /* CaseClause */: + case 293 /* CaseClause */: const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses); const contextualTypes = fromContextualType(); if (!contextualTypes) { @@ -151336,9 +151401,9 @@ } function walkUpParentheses(node) { switch (node.kind) { - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return walkUpParenthesizedTypes(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return walkUpParenthesizedExpressions(node); default: return node; @@ -152032,14 +152097,14 @@ if (cancellationToken) cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(direct)) { handleImportCall(direct); break; } if (!isAvailableThroughGlobal) { const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 257 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent2.kind === 258 /* VariableDeclaration */) { const { name } = parent2; if (name.kind === 79 /* Identifier */) { directImports.push(name); @@ -152050,7 +152115,7 @@ break; case 79 /* Identifier */: break; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: handleNamespaceImport( direct, direct.name, @@ -152059,10 +152124,10 @@ false ); break; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 271 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 272 /* NamespaceImport */) { handleNamespaceImport( direct, namedBindings.name, @@ -152075,10 +152140,10 @@ addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 277 /* NamespaceExport */) { + } else if (direct.exportClause.kind === 278 /* NamespaceExport */) { addIndirectUser( getSourceFileLikeForImportDeclaration(direct), /** addTransitiveDependencies */ @@ -152088,7 +152153,7 @@ directImports.push(direct); } break; - case 202 /* ImportType */: + case 203 /* ImportType */: if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { addIndirectUser( direct.getSourceFile(), @@ -152129,7 +152194,7 @@ directImports.push(importDeclaration); } else if (!isAvailableThroughGlobal) { const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 308 /* SourceFile */ || sourceFileLike.kind === 264 /* ModuleDeclaration */); + Debug.assert(sourceFileLike.kind === 309 /* SourceFile */ || sourceFileLike.kind === 265 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUser( sourceFileLike, @@ -152183,7 +152248,7 @@ } return { importSearches, singleReferences }; function handleImport(decl) { - if (decl.kind === 268 /* ImportEqualsDeclaration */) { + if (decl.kind === 269 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } @@ -152193,7 +152258,7 @@ handleNamespaceImportLike(decl); return; } - if (decl.kind === 202 /* ImportType */) { + if (decl.kind === 203 /* ImportType */) { if (decl.qualifier) { const firstIdentifier = getFirstIdentifier(decl.qualifier); if (firstIdentifier.escapedText === symbolName(exportSymbol)) { @@ -152207,7 +152272,7 @@ if (decl.moduleSpecifier.kind !== 10 /* StringLiteral */) { return; } - if (decl.kind === 275 /* ExportDeclaration */) { + if (decl.kind === 276 /* ExportDeclaration */) { if (decl.exportClause && isNamedExports(decl.exportClause)) { searchForNamedImport(decl.exportClause); } @@ -152216,10 +152281,10 @@ const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: handleNamespaceImportLike(namedBindings.name); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { searchForNamedImport(namedBindings); } @@ -152253,7 +152318,7 @@ addSearch(name, checker.getSymbolAtLocation(name)); } } else { - const localSymbol = element.kind === 278 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); + const localSymbol = element.kind === 279 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); } } @@ -152277,7 +152342,7 @@ const checker = program.getTypeChecker(); for (const referencingFile of sourceFiles) { const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 308 /* SourceFile */) { + if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 309 /* SourceFile */) { for (const ref of referencingFile.referencedFiles) { if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { refs.push({ kind: "reference", referencingFile, ref }); @@ -152319,7 +152384,7 @@ return map2; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 308 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( + return forEach(sourceFileLike.kind === 309 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( // TODO: GH#18217 action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action) )); @@ -152332,15 +152397,15 @@ } else { forEachPossibleImportOrExportStatement(sourceFile, (statement) => { switch (statement.kind) { - case 275 /* ExportDeclaration */: - case 269 /* ImportDeclaration */: { + case 276 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: { const decl = statement; if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; } - case 268 /* ImportEqualsDeclaration */: { + case 269 /* ImportEqualsDeclaration */: { const decl = statement; if (isExternalModuleImportEquals(decl)) { action(decl, decl.moduleReference.expression); @@ -152358,7 +152423,7 @@ const { parent: parent2 } = node; const grandparent = parent2.parent; if (symbol.exportSymbol) { - if (parent2.kind === 208 /* PropertyAccessExpression */) { + if (parent2.kind === 209 /* PropertyAccessExpression */) { return ((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport( grandparent, /*useLhsSymbol*/ @@ -152475,15 +152540,15 @@ function isNodeImport(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return parent2.name === node && isExternalModuleImportEquals(parent2); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return !parent2.propertyName; - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: Debug.assert(parent2.name === node); return true; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); default: return false; @@ -152514,21 +152579,21 @@ return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { return node.getSourceFile(); } const { parent: parent2 } = node; - if (parent2.kind === 308 /* SourceFile */) { + if (parent2.kind === 309 /* SourceFile */) { return parent2; } - Debug.assert(parent2.kind === 265 /* ModuleBlock */); + Debug.assert(parent2.kind === 266 /* ModuleBlock */); return cast(parent2.parent, isAmbientModuleDeclaration); } function isAmbientModuleDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; + return node.kind === 265 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; } function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 280 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; + return eq.moduleReference.kind === 281 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; } var ExportKind2, ImportExport; var init_importTracker = __esm({ @@ -152593,7 +152658,7 @@ if (node.parent.name === node || // node is name of declaration, use parent isConstructorDeclaration(node.parent) || isExportAssignment(node.parent) || // Property name of the import export specifier or binding pattern, use parent (isImportOrExportSpecifier(node.parent) || isBindingElement(node.parent)) && node.parent.propertyName === node || // Is default export - node.kind === 88 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) { + node.kind === 89 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) { return getContextNode(node.parent); } return void 0; @@ -152602,28 +152667,28 @@ if (!node) return void 0; switch (node.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getContextNode(node.parent.parent); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent; - case 278 /* ExportSpecifier */: - case 271 /* NamespaceImport */: + case 279 /* ExportSpecifier */: + case 272 /* NamespaceImport */: return node.parent.parent; - case 270 /* ImportClause */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 278 /* NamespaceExport */: return node.parent; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isExpressionStatement(node.parent) ? node.parent : node; - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: return { start: node.initializer, end: node.expression }; - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( findAncestor( node.parent, @@ -152656,13 +152721,13 @@ )); } function isDefinitionForReference(node) { - return node.kind === 88 /* DefaultKeyword */ || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 135 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent); + return node.kind === 89 /* DefaultKeyword */ || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 136 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent); } function getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) { const node = getTouchingPropertyName(sourceFile, position); let referenceEntries; const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 208 /* PropertyAccessExpression */ || node.parent.kind === 205 /* BindingElement */ || node.parent.kind === 209 /* ElementAccessExpression */ || node.kind === 106 /* SuperKeyword */) { + if (node.parent.kind === 209 /* PropertyAccessExpression */ || node.parent.kind === 206 /* BindingElement */ || node.parent.kind === 210 /* ElementAccessExpression */ || node.kind === 107 /* SuperKeyword */) { referenceEntries = entries && [...entries]; } else if (entries) { const queue = createQueue(entries); @@ -152683,15 +152748,15 @@ return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return void 0; } const checker = program.getTypeChecker(); - if (node.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 301 /* ShorthandPropertyAssignment */) { const result = []; Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); return result; - } else if (node.kind === 106 /* SuperKeyword */ || isSuperProperty(node.parent)) { + } else if (node.kind === 107 /* SuperKeyword */ || isSuperProperty(node.parent)) { const symbol = checker.getSymbolAtLocation(node); return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)]; } else { @@ -152878,12 +152943,12 @@ const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); if (symbol) { return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 207 /* ObjectLiteralExpression */) { + } else if (node.kind === 208 /* ObjectLiteralExpression */) { return { kind: "interface" /* interfaceElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("object literal"), punctuationPart(21 /* CloseParenToken */)] }; - } else if (node.kind === 228 /* ClassExpression */) { + } else if (node.kind === 229 /* ClassExpression */) { return { kind: "local class" /* localClassElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(21 /* CloseParenToken */)] @@ -152927,13 +152992,13 @@ } function isWriteAccessForReference(node) { const decl = getDeclarationFromName(node); - return !!decl && declarationIsWriteAccess(decl) || node.kind === 88 /* DefaultKeyword */ || isWriteAccess(node); + return !!decl && declarationIsWriteAccess(decl) || node.kind === 89 /* DefaultKeyword */ || isWriteAccess(node); } function isDeclarationOfSymbol(node, target) { var _a2; if (!target) return false; - const source = getDeclarationFromName(node) || (node.kind === 88 /* DefaultKeyword */ ? node.parent : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent : node.kind === 135 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent) ? node.parent.parent : void 0); + const source = getDeclarationFromName(node) || (node.kind === 89 /* DefaultKeyword */ ? node.parent : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent : node.kind === 136 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent) ? node.parent.parent : void 0); const commonjsSource = source && isBinaryExpression(source) ? source.left : void 0; return !!(source && ((_a2 = target.declarations) == null ? void 0 : _a2.some((d) => d === source || d === commonjsSource))); } @@ -152941,46 +153006,46 @@ if (!!(decl.flags & 16777216 /* Ambient */)) return true; switch (decl.kind) { - case 223 /* BinaryExpression */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 88 /* DefaultKeyword */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 278 /* ExportSpecifier */: - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 261 /* InterfaceDeclaration */: - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: - case 288 /* JsxAttribute */: - case 264 /* ModuleDeclaration */: - case 267 /* NamespaceExportDeclaration */: - case 271 /* NamespaceImport */: - case 277 /* NamespaceExport */: - case 166 /* Parameter */: - case 300 /* ShorthandPropertyAssignment */: - case 262 /* TypeAliasDeclaration */: - case 165 /* TypeParameter */: + case 224 /* BinaryExpression */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 89 /* DefaultKeyword */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 279 /* ExportSpecifier */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 262 /* InterfaceDeclaration */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 289 /* JsxAttribute */: + case 265 /* ModuleDeclaration */: + case 268 /* NamespaceExportDeclaration */: + case 272 /* NamespaceImport */: + case 278 /* NamespaceExport */: + case 167 /* Parameter */: + case 301 /* ShorthandPropertyAssignment */: + case 263 /* TypeAliasDeclaration */: + case 166 /* TypeParameter */: return true; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return !!decl.body; - case 257 /* VariableDeclaration */: - case 169 /* PropertyDeclaration */: + case 258 /* VariableDeclaration */: + case 170 /* PropertyDeclaration */: return !!decl.initializer || isCatchClause(decl.parent); - case 170 /* MethodSignature */: - case 168 /* PropertySignature */: - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: + case 171 /* MethodSignature */: + case 169 /* PropertySignature */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: return false; default: return Debug.failBadSyntaxKind(decl); @@ -153227,9 +153292,9 @@ if (symbol.declarations) { for (const decl of symbol.declarations) { switch (decl.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { references.push(nodeEntry(decl.name)); } @@ -153244,7 +153309,7 @@ for (const decl of exported.declarations) { const sourceFile = decl.getSourceFile(); if (sourceFilesSet.has(sourceFile.fileName)) { - const node = isBinaryExpression(decl) && isPropertyAccessExpression(decl.left) ? decl.left.expression : isExportAssignment(decl) ? Debug.checkDefined(findChildOfKind(decl, 93 /* ExportKeyword */, sourceFile)) : getNameOfDeclaration(decl) || decl; + const node = isBinaryExpression(decl) && isPropertyAccessExpression(decl.left) ? decl.left.expression : isExportAssignment(decl) ? Debug.checkDefined(findChildOfKind(decl, 94 /* ExportKeyword */, sourceFile)) : getNameOfDeclaration(decl) || decl; references.push(nodeEntry(node)); } } @@ -153252,21 +153317,21 @@ return references.length ? [{ definition: { type: 0 /* Symbol */, symbol }, references }] : emptyArray; } function isReadonlyTypeOperator(node) { - return node.kind === 146 /* ReadonlyKeyword */ && isTypeOperatorNode(node.parent) && node.parent.operator === 146 /* ReadonlyKeyword */; + return node.kind === 147 /* ReadonlyKeyword */ && isTypeOperatorNode(node.parent) && node.parent.operator === 147 /* ReadonlyKeyword */; } function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) { if (isTypeKeyword(node.kind)) { - if (node.kind === 114 /* VoidKeyword */ && isVoidExpression(node.parent)) { + if (node.kind === 115 /* VoidKeyword */ && isVoidExpression(node.parent)) { return void 0; } - if (node.kind === 146 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { + if (node.kind === 147 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { return void 0; } return getAllReferencesForKeyword( sourceFiles, node.kind, cancellationToken, - node.kind === 146 /* ReadonlyKeyword */ ? isReadonlyTypeOperator : void 0 + node.kind === 147 /* ReadonlyKeyword */ ? isReadonlyTypeOperator : void 0 ); } if (isImportMeta(node.parent) && node.parent.name === node) { @@ -153284,7 +153349,7 @@ if (isThis(node)) { return getReferencesForThisKeyword(node, sourceFiles, cancellationToken); } - if (node.kind === 106 /* SuperKeyword */) { + if (node.kind === 107 /* SuperKeyword */) { return getReferencesForSuperKeyword(node); } return void 0; @@ -153318,7 +153383,7 @@ /*alwaysGetReferences*/ true ); - } else if (node && node.kind === 88 /* DefaultKeyword */ && symbol.escapedName === "default" /* Default */ && symbol.parent) { + } else if (node && node.kind === 89 /* DefaultKeyword */ && symbol.escapedName === "default" /* Default */ && symbol.parent) { addReference(node, symbol, state); searchForImportsOfExport(node, symbol, { exportingModuleSymbol: symbol.parent, exportKind: 1 /* Default */ }, state); } else { @@ -153353,8 +153418,8 @@ } function getSpecialSearchKind(node) { switch (node.kind) { - case 173 /* Constructor */: - case 135 /* ConstructorKeyword */: + case 174 /* Constructor */: + case 136 /* ConstructorKeyword */: return 1 /* Constructor */; case 79 /* Identifier */: if (isClassLike(node.parent)) { @@ -153562,7 +153627,7 @@ } function getSymbolScope(symbol) { const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 215 /* FunctionExpression */ || valueDeclaration.kind === 228 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 216 /* FunctionExpression */ || valueDeclaration.kind === 229 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -153571,7 +153636,7 @@ if (flags & (4 /* Property */ | 8192 /* Method */)) { const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { - return getAncestor(privateDeclaration, 260 /* ClassDeclaration */); + return getAncestor(privateDeclaration, 261 /* ClassDeclaration */); } return void 0; } @@ -153588,7 +153653,7 @@ if (scope && scope !== container) { return void 0; } - if (!container || container.kind === 308 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 309 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { return void 0; } scope = container; @@ -153712,7 +153777,7 @@ } case 8 /* NumericLiteral */: return isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === searchSymbolName.length; - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return "default".length === searchSymbolName.length; default: return false; @@ -153882,7 +153947,7 @@ } function addReference(referenceLocation, relatedSymbol, state) { const { kind, symbol } = "kind" in relatedSymbol ? relatedSymbol : { kind: void 0, symbol: relatedSymbol }; - if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 88 /* DefaultKeyword */) { + if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 89 /* DefaultKeyword */) { return; } const addRef = state.referenceAdder(symbol); @@ -153898,7 +153963,7 @@ } const pusher = () => state.referenceAdder(search.symbol); if (isClassLike(referenceLocation.parent)) { - Debug.assert(referenceLocation.kind === 88 /* DefaultKeyword */ || referenceLocation.parent.name === referenceLocation); + Debug.assert(referenceLocation.kind === 89 /* DefaultKeyword */ || referenceLocation.parent.name === referenceLocation); findOwnConstructorReferences(search.symbol, sourceFile, pusher()); } else { const classExtending = tryGetClassByExtendingIdentifier(referenceLocation); @@ -153921,7 +153986,7 @@ } if (member.body) { member.body.forEachChild(function cb(node) { - if (node.kind === 108 /* ThisKeyword */) { + if (node.kind === 109 /* ThisKeyword */) { addRef(node); } else if (!isFunctionLike(node) && !isClassLike(node)) { node.forEachChild(cb); @@ -153934,18 +153999,18 @@ const constructorSymbol = getClassConstructorSymbol(classSymbol); if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { - const ctrKeyword = findChildOfKind(decl, 135 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 173 /* Constructor */ && !!ctrKeyword); + const ctrKeyword = findChildOfKind(decl, 136 /* ConstructorKeyword */, sourceFile); + Debug.assert(decl.kind === 174 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } } if (classSymbol.exports) { classSymbol.exports.forEach((member) => { const decl = member.valueDeclaration; - if (decl && decl.kind === 171 /* MethodDeclaration */) { + if (decl && decl.kind === 172 /* MethodDeclaration */) { const body = decl.body; if (body) { - forEachDescendantOfKind(body, 108 /* ThisKeyword */, (thisKeyword) => { + forEachDescendantOfKind(body, 109 /* ThisKeyword */, (thisKeyword) => { if (isNewExpressionTarget(thisKeyword)) { addNode(thisKeyword); } @@ -153964,10 +154029,10 @@ return; } for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 173 /* Constructor */); + Debug.assert(decl.kind === 174 /* Constructor */); const body = decl.body; if (body) { - forEachDescendantOfKind(body, 106 /* SuperKeyword */, (node) => { + forEachDescendantOfKind(body, 107 /* SuperKeyword */, (node) => { if (isCallExpressionTarget(node)) { addNode(node); } @@ -153999,7 +154064,7 @@ if (refNode.kind !== 79 /* Identifier */) { return; } - if (refNode.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 301 /* ShorthandPropertyAssignment */) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); } const containingClass = getContainingClassIfInHeritageClause(refNode); @@ -154014,7 +154079,7 @@ addIfImplementation(typeHavingNode.initializer); } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { const body = typeHavingNode.body; - if (body.kind === 238 /* Block */) { + if (body.kind === 239 /* Block */) { forEachReturnStatement(body, (returnStatement) => { if (returnStatement.expression) addIfImplementation(returnStatement.expression); @@ -154036,13 +154101,13 @@ } function isImplementationExpression(node) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 206 /* ArrayLiteralExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 207 /* ArrayLiteralExpression */: return true; default: return false; @@ -154076,13 +154141,13 @@ } let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -154091,7 +154156,7 @@ } const sourceFile = searchSpaceNode.getSourceFile(); const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, "super", searchSpaceNode), (node) => { - if (node.kind !== 106 /* SuperKeyword */) { + if (node.kind !== 107 /* SuperKeyword */) { return; } const container = getSuperContainer( @@ -154104,7 +154169,7 @@ return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; } function isParameterName(node) { - return node.kind === 79 /* Identifier */ && node.parent.kind === 166 /* Parameter */ && node.parent.name === node; + return node.kind === 79 /* Identifier */ && node.parent.kind === 167 /* Parameter */ && node.parent.name === node; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { let searchSpaceNode = getThisContainer( @@ -154116,32 +154181,32 @@ ); let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isObjectLiteralMethod(searchSpaceNode)) { staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; } - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { return void 0; } - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: break; default: return void 0; } - const references = flatMap(searchSpaceNode.kind === 308 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { + const references = flatMap(searchSpaceNode.kind === 309 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { cancellationToken.throwIfCancellationRequested(); return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { if (!isThis(node)) { @@ -154157,18 +154222,18 @@ if (!canHaveSymbol(container)) return false; switch (searchSpaceNode.kind) { - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return searchSpaceNode.symbol === container.symbol; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: - case 207 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 208 /* ObjectLiteralExpression */: return container.parent && canHaveSymbol(container.parent) && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 308 /* SourceFile */: - return container.kind === 308 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); + case 309 /* SourceFile */: + return container.kind === 309 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); } }); }).map((n) => nodeEntry(n)); @@ -154292,7 +154357,7 @@ Debug.assert(paramProps.length === 2 && !!(paramProps[0].flags & 1 /* FunctionScopedVariable */) && !!(paramProps[1].flags & 4 /* Property */)); return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } - const exportSpecifier = getDeclarationOfKind(symbol, 278 /* ExportSpecifier */); + const exportSpecifier = getDeclarationOfKind(symbol, 279 /* ExportSpecifier */); if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); if (localSymbol) { @@ -154333,7 +154398,7 @@ ) || (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */) && allowBaseTypes(rootSymbol) ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, (base) => cbSymbol(sym, rootSymbol, base, kind)) : void 0)); } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol2, checker2) { - const bindingElement = getDeclarationOfKind(symbol2, 205 /* BindingElement */); + const bindingElement = getDeclarationOfKind(symbol2, 206 /* BindingElement */); if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { return getPropertySymbolFromBindingElement(checker2, bindingElement); } @@ -154486,7 +154551,7 @@ } const { parent: parent2 } = node; const typeChecker = program.getTypeChecker(); - if (node.kind === 161 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { + if (node.kind === 162 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { return getDefinitionFromOverriddenMember(typeChecker, node) || emptyArray; } if (isJumpStatementTarget(node)) { @@ -154500,16 +154565,16 @@ void 0 )] : void 0; } - if (node.kind === 105 /* ReturnKeyword */) { + if (node.kind === 106 /* ReturnKeyword */) { const functionDeclaration = findAncestor(node.parent, (n) => isClassStaticBlockDeclaration(n) ? "quit" : isFunctionLikeDeclaration(n)); return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; } - if (node.kind === 133 /* AwaitKeyword */) { + if (node.kind === 134 /* AwaitKeyword */) { const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n)); - const isAsyncFunction2 = functionDeclaration && some(functionDeclaration.modifiers, (node2) => node2.kind === 132 /* AsyncKeyword */); + const isAsyncFunction2 = functionDeclaration && some(functionDeclaration.modifiers, (node2) => node2.kind === 133 /* AsyncKeyword */); return isAsyncFunction2 ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; } - if (node.kind === 125 /* YieldKeyword */) { + if (node.kind === 126 /* YieldKeyword */) { const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n)); const isGeneratorFunction = functionDeclaration && functionDeclaration.asteriskToken; return isGeneratorFunction ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; @@ -154574,10 +154639,10 @@ return [sigInfo]; } else { const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, calledDeclaration) || emptyArray; - return node.kind === 106 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; + return node.kind === 107 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; } } - if (node.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 301 /* ShorthandPropertyAssignment */) { const shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo( decl, @@ -154752,7 +154817,7 @@ if (node.parent === declaration) { return true; } - if (declaration.kind === 271 /* NamespaceImport */) { + if (declaration.kind === 272 /* NamespaceImport */) { return false; } return true; @@ -154783,7 +154848,7 @@ failedAliasResolution )); function getConstructSignatureDefinition() { - if (symbol.flags & 32 /* Class */ && !(symbol.flags & (16 /* Function */ | 3 /* Variable */)) && (isNewExpressionTarget(node) || node.kind === 135 /* ConstructorKeyword */)) { + if (symbol.flags & 32 /* Class */ && !(symbol.flags & (16 /* Function */ | 3 /* Variable */)) && (isNewExpressionTarget(node) || node.kind === 136 /* ConstructorKeyword */)) { const cls = find(filteredDeclarations, isClassLike) || Debug.fail("Expected declaration to have at least one class-like declaration"); return getSignatureDefinition( cls.members, @@ -154855,19 +154920,19 @@ if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent); switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: if (hasEffectiveModifier(declaration, 8 /* Private */)) return false; - case 173 /* Constructor */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: + case 174 /* Constructor */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: return isDefinitionVisible(checker, declaration.parent); default: return false; @@ -154911,9 +154976,9 @@ } function isConstructorLike(node) { switch (node.kind) { - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: return true; default: return false; @@ -154963,14 +155028,14 @@ return; } switch (node.kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 216 /* ArrowFunction */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { @@ -155110,15 +155175,15 @@ } function isHintableLiteral(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: { + case 222 /* PrefixUnaryExpression */: { const operand = node.operand; return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); } - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return true; case 79 /* Identifier */: { const name = node.escapedText; @@ -155256,8 +155321,8 @@ const parts = []; forEachUnique(declarations, (declaration) => { for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 330 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 349 /* JSDocTypedefTag */ && declaration.kind !== 341 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 349 /* JSDocTypedefTag */ || t.kind === 341 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 344 /* JSDocParameterTag */ || t.kind === 345 /* JSDocReturnTag */)) { + const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 331 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); + if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 350 /* JSDocTypedefTag */ && declaration.kind !== 342 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 350 /* JSDocTypedefTag */ || t.kind === 342 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 345 /* JSDocParameterTag */ || t.kind === 346 /* JSDocReturnTag */)) { continue; } let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; @@ -155276,11 +155341,11 @@ } function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: return [declaration]; - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return getJSDocCommentsAndTags(declaration); @@ -155290,7 +155355,7 @@ const infos = []; forEachUnique(declarations, (declaration) => { const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 349 /* JSDocTypedefTag */ || t.kind === 341 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 344 /* JSDocParameterTag */ || t.kind === 345 /* JSDocReturnTag */)) { + if (tags.some((t) => t.kind === 350 /* JSDocTypedefTag */ || t.kind === 342 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 345 /* JSDocParameterTag */ || t.kind === 346 /* JSDocReturnTag */)) { return; } for (const tag of tags) { @@ -155305,21 +155370,21 @@ } return flatMap( comment, - (node) => node.kind === 324 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) + (node) => node.kind === 325 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) ); } function getCommentDisplayParts(tag, checker) { const { comment, kind } = tag; const namePart = getTagNameDisplayPart(kind); switch (kind) { - case 352 /* JSDocThrowsTag */: + case 353 /* JSDocThrowsTag */: const typeExpression = tag.typeExpression; return typeExpression ? withNode(typeExpression) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return withNode(tag.class); - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return withNode(tag.class); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: const templateTag = tag; const displayParts = []; if (templateTag.constraint) { @@ -155341,14 +155406,14 @@ displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); } return displayParts; - case 347 /* JSDocTypeTag */: - case 353 /* JSDocSatisfiesTag */: + case 348 /* JSDocTypeTag */: + case 354 /* JSDocSatisfiesTag */: return withNode(tag.typeExpression); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: - case 350 /* JSDocSeeTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: + case 351 /* JSDocSeeTag */: const { name } = tag; return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); default: @@ -155371,14 +155436,14 @@ } function getTagNameDisplayPart(kind) { switch (kind) { - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return parameterNamePart; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return propertyNamePart; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return typeParameterNamePart; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: return typeAliasNamePart; default: return textPart; @@ -155503,46 +155568,46 @@ } function getCommentOwnerInfoWorker(commentOwner, options) { switch (commentOwner.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 170 /* MethodSignature */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 171 /* MethodSignature */: + case 217 /* ArrowFunction */: const host = commentOwner; return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 262 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 263 /* TypeAliasDeclaration */: return { commentOwner }; - case 168 /* PropertySignature */: { + case 169 /* PropertySignature */: { const host2 = commentOwner; return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; } - case 240 /* VariableStatement */: { + case 241 /* VariableStatement */: { const varStatement = commentOwner; const varDeclarations = varStatement.declarationList.declarations; const host2 = varDeclarations.length === 1 && varDeclarations[0].initializer ? getRightHandSideOfAssignment(varDeclarations[0].initializer) : void 0; return host2 ? { commentOwner, parameters: host2.parameters, hasReturn: hasReturn(host2, options) } : { commentOwner }; } - case 308 /* SourceFile */: + case 309 /* SourceFile */: return "quit"; - case 264 /* ModuleDeclaration */: - return commentOwner.parent.kind === 264 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 241 /* ExpressionStatement */: + case 265 /* ModuleDeclaration */: + return commentOwner.parent.kind === 265 /* ModuleDeclaration */ ? void 0 : { commentOwner }; + case 242 /* ExpressionStatement */: return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const be = commentOwner; if (getAssignmentDeclarationKind(be) === 0 /* None */) { return "quit"; } return isFunctionLike(be.right) ? { commentOwner, parameters: be.right.parameters, hasReturn: hasReturn(be.right, options) } : { commentOwner }; } - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: const init = commentOwner.initializer; if (init && (isFunctionExpression(init) || isArrowFunction(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; @@ -155553,14 +155618,14 @@ return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock(node.body) && !!forEachReturnStatement(node.body, (n) => n)); } function getRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 214 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 215 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return rightHandSide; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return find(rightHandSide.members, isConstructorDeclaration); } } @@ -155769,7 +155834,7 @@ const endPos = decl.getStart(); scanner2.setText(sourceFile.text, startPos, endPos - startPos); let numberOfNewLines = 0; - while (scanner2.getTokenPos() < endPos) { + while (scanner2.getTokenStart() < endPos) { const tokenKind = scanner2.scan(); if (tokenKind === 4 /* NewLineTrivia */) { numberOfNewLines++; @@ -156037,11 +156102,11 @@ function getModuleSpecifierExpression(declaration) { var _a2; switch (declaration.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return (_a2 = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return declaration.moduleSpecifier; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return declaration.declarationList.declarations[0].initializer.arguments[0]; } } @@ -156141,19 +156206,19 @@ function getImportKindOrder(s1) { var _a2; switch (s1.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: if (!s1.importClause) return 0; if (s1.importClause.isTypeOnly) return 1; - if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 271 /* NamespaceImport */) + if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 272 /* NamespaceImport */) return 2; if (s1.importClause.name) return 3; return 4; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return 5; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return 6; } } @@ -156335,7 +156400,7 @@ } const lastImport = current - 1; if (lastImport !== firstImport) { - out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 100 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */)); + out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 101 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */)); } } function visitNode3(n2) { @@ -156465,43 +156530,43 @@ } function getOutliningSpanForNode(n, sourceFile) { switch (n.kind) { - case 238 /* Block */: + case 239 /* Block */: if (isFunctionLike(n.parent)) { return functionSpan(n.parent, n, sourceFile); } switch (n.parent.kind) { - case 243 /* DoStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 242 /* IfStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 295 /* CatchClause */: + case 244 /* DoStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 243 /* IfStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 296 /* CatchClause */: return spanForNode(n.parent); - case 255 /* TryStatement */: + case 256 /* TryStatement */: const tryStatement = n.parent; if (tryStatement.tryBlock === n) { return spanForNode(n.parent); } else if (tryStatement.finallyBlock === n) { - const node = findChildOfKind(tryStatement, 96 /* FinallyKeyword */, sourceFile); + const node = findChildOfKind(tryStatement, 97 /* FinallyKeyword */, sourceFile); if (node) return spanForNode(node); } default: return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); } - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return spanForNode(n.parent); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 266 /* CaseBlock */: - case 184 /* TypeLiteral */: - case 203 /* ObjectBindingPattern */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 267 /* CaseBlock */: + case 185 /* TypeLiteral */: + case 204 /* ObjectBindingPattern */: return spanForNode(n); - case 186 /* TupleType */: + case 187 /* TupleType */: return spanForNode( n, /*autoCollapse*/ @@ -156510,24 +156575,24 @@ !isTupleTypeNode(n.parent), 22 /* OpenBracketToken */ ); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return spanForNodeArray(n.statements); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return spanForObjectOrArrayLiteral(n); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return spanForObjectOrArrayLiteral(n, 22 /* OpenBracketToken */); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return spanForJSXElement(n); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return spanForJSXFragment(n); - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: return spanForTemplateLiteral(n); - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: return spanForNode( n, /*autoCollapse*/ @@ -156536,15 +156601,15 @@ !isBindingElement(n.parent), 22 /* OpenBracketToken */ ); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return spanForArrowFunction(n); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return spanForCallExpression(n); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return spanForParenthesizedExpression(n); - case 272 /* NamedImports */: - case 276 /* NamedExports */: - case 296 /* AssertClause */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: + case 297 /* AssertClause */: return spanForNamedImportsOrExportsOrAssertClause(n); } function spanForNamedImportsOrExportsOrAssertClause(node) { @@ -156665,7 +156730,7 @@ node, sourceFile, /*autoCollapse*/ - node.kind !== 216 /* ArrowFunction */ + node.kind !== 217 /* ArrowFunction */ ); } function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { @@ -156747,18 +156812,18 @@ } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 264 /* ModuleDeclaration */: { + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 265 /* ModuleDeclaration */: { const node = exportNode; if (!node.name) return void 0; return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; } - case 240 /* VariableStatement */: { + case 241 /* VariableStatement */: { const vs = exportNode; if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { return void 0; @@ -156769,7 +156834,7 @@ Debug.assert(!wasDefault, "Can't have a default flag here"); return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; } - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const node = exportNode; if (node.isExportEquals) return void 0; @@ -156796,25 +156861,25 @@ factory.createNamedExports([spec]) )); } else { - changes.delete(exportingSourceFile, Debug.checkDefined(findModifier(exportNode, 88 /* DefaultKeyword */), "Should find a default keyword in modifier list")); + changes.delete(exportingSourceFile, Debug.checkDefined(findModifier(exportNode, 89 /* DefaultKeyword */), "Should find a default keyword in modifier list")); } } else { - const exportKeyword = Debug.checkDefined(findModifier(exportNode, 93 /* ExportKeyword */), "Should find an export keyword in modifier list"); + const exportKeyword = Debug.checkDefined(findModifier(exportNode, 94 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(88 /* DefaultKeyword */)); + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(89 /* DefaultKeyword */)); break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: const decl = first(exportNode.declarationList.declarations); if (!ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile) && !decl.type) { changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(decl.initializer, "Initializer was previously known to be present"))); break; } - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 264 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 265 /* ModuleDeclaration */: changes.deleteModifier(exportingSourceFile, exportKeyword); changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); break; @@ -156840,23 +156905,23 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { const { parent: parent2 } = ref; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); break; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: { + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: { const spec = parent2; changes.replaceNode(importingSourceFile, spec, makeImportSpecifier2(exportName, spec.name.text)); break; } - case 270 /* ImportClause */: { + case 271 /* ImportClause */: { const clause = parent2; Debug.assert(clause.name === ref, "Import clause name should match provided ref"); const spec = makeImportSpecifier2(exportName, ref.text); const { namedBindings } = clause; if (!namedBindings) { changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec])); - } else if (namedBindings.kind === 271 /* NamespaceImport */) { + } else if (namedBindings.kind === 272 /* NamespaceImport */) { changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) }); const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1 /* Double */; const newImport = makeImport( @@ -156873,7 +156938,7 @@ } break; } - case 202 /* ImportType */: + case 203 /* ImportType */: const importTypeNode = parent2; changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; @@ -156884,10 +156949,10 @@ function changeNamedToDefaultImport(importingSourceFile, ref, changes) { const parent2 = ref.parent; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); break; - case 273 /* ImportSpecifier */: { + case 274 /* ImportSpecifier */: { const defaultImport = factory.createIdentifier(parent2.name.text); if (parent2.parent.elements.length === 1) { changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); @@ -156897,7 +156962,7 @@ } break; } - case 278 /* ExportSpecifier */: { + case 279 /* ExportSpecifier */: { changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); break; } @@ -157001,7 +157066,7 @@ if (!importClause.namedBindings) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; } - if (importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 272 /* NamespaceImport */) { return { convertTo: 0 /* Named */, import: importClause.namedBindings }; } const shouldUseDefault = getShouldUseDefault(context.program, importClause); @@ -157583,11 +157648,11 @@ } function isPureImport(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return true; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return !hasSyntacticModifier(node, 1 /* Export */); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall( d.initializer, /*checkArgumentIsStringLiteralLike*/ @@ -157631,7 +157696,7 @@ } deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); deleteMovedStatements(oldFile, toMove.ranges, changes); - updateImportsInOtherFiles(changes, program, host, oldFile, usage.movedSymbols, newFilename); + updateImportsInOtherFiles(changes, program, host, oldFile, usage.movedSymbols, newFilename, quotePreference); const imports = getNewFileImportsAndAddExportInOldFile(oldFile, usage.oldImportsNeededByNewFile, usage.newFileImportsFromOldFile, changes, checker, program, host, useEsModuleSyntax, quotePreference); const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromNewFile, useEsModuleSyntax); if (imports.length && body.length) { @@ -157660,7 +157725,7 @@ forEachImportInStatement(statement, (i) => deleteUnusedImports(oldFile, i, changes, (name) => toDelete.has(checker.getSymbolAtLocation(name)))); } } - function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols, newFilename) { + function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols, newFilename, quotePreference) { const checker = program.getTypeChecker(); for (const sourceFile of program.getSourceFiles()) { if (sourceFile === oldFile) @@ -157676,29 +157741,29 @@ deleteUnusedImports(sourceFile, importNode, changes, shouldMove); const pathToNewFileWithExtension = resolvePath(getDirectoryPath(oldFile.path), newFilename); const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.path, pathToNewFileWithExtension, createModuleSpecifierResolutionHost(program, host)); - const newImportDeclaration = filterImport(importNode, factory.createStringLiteral(newModuleSpecifier), shouldMove); + const newImportDeclaration = filterImport(importNode, makeStringLiteral(newModuleSpecifier, quotePreference), shouldMove); if (newImportDeclaration) changes.insertNodeAfter(sourceFile, statement, newImportDeclaration); const ns = getNamespaceLikeImport(importNode); if (ns) - updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, ns, importNode); + updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, ns, importNode, quotePreference); }); } } } function getNamespaceLikeImport(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 271 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 272 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; + case 269 /* ImportEqualsDeclaration */: return node.name; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return tryCast(node.name, isIdentifier); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); } } - function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, oldImportId, oldImportNode) { + function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, oldImportId, oldImportNode, quotePreference) { const preferredNewNamespaceName = ts_codefix_exports.moduleSpecifierToValidIdentifier(newModuleSpecifier, 99 /* ESNext */); let needUniqueName = false; const toChange = []; @@ -157721,14 +157786,14 @@ for (const ref of toChange) { changes.replaceNode(sourceFile, ref, factory.createIdentifier(newNamespaceName)); } - changes.insertNodeAfter(sourceFile, oldImportNode, updateNamespaceLikeImportNode(oldImportNode, preferredNewNamespaceName, newModuleSpecifier)); + changes.insertNodeAfter(sourceFile, oldImportNode, updateNamespaceLikeImportNode(oldImportNode, preferredNewNamespaceName, newModuleSpecifier, quotePreference)); } } - function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifier) { + function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifier, quotePreference) { const newNamespaceId = factory.createIdentifier(newNamespaceName); - const newModuleString = factory.createStringLiteral(newModuleSpecifier); + const newModuleString = makeStringLiteral(newModuleSpecifier, quotePreference); switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return factory.createImportDeclaration( /*modifiers*/ void 0, @@ -157743,7 +157808,7 @@ /*assertClause*/ void 0 ); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return factory.createImportEqualsDeclaration( /*modifiers*/ void 0, @@ -157752,7 +157817,7 @@ newNamespaceId, factory.createExternalModuleReference(newModuleString) ); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return factory.createVariableDeclaration( newNamespaceId, /*exclamationToken*/ @@ -157766,7 +157831,7 @@ } } function moduleSpecifierFromImport(i) { - return i.kind === 269 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 268 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; + return i.kind === 270 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 269 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { if (isImportDeclaration(statement)) { @@ -157825,7 +157890,7 @@ factory.createObjectBindingPattern(bindingElements), /*type*/ void 0, - createRequireCall(factory.createStringLiteral(pathToNewFileWithCorrectExtension)) + createRequireCall(makeStringLiteral(pathToNewFileWithCorrectExtension, quotePreference)) ) : void 0; } } @@ -157865,15 +157930,15 @@ } function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { switch (importDecl.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused); break; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (isUnused(importDecl.name)) { changes.delete(sourceFile, importDecl); } break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused); break; default: @@ -157885,7 +157950,7 @@ return; const { name, namedBindings } = importDecl.importClause; const defaultUnused = !name || isUnused(name); - const namedBindingsUnused = !namedBindings || (namedBindings.kind === 271 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); + const namedBindingsUnused = !namedBindings || (namedBindings.kind === 272 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); if (defaultUnused && namedBindingsUnused) { changes.delete(sourceFile, importDecl); } else { @@ -157905,7 +157970,7 @@ void 0 ) ); - } else if (namedBindings.kind === 272 /* NamedImports */) { + } else if (namedBindings.kind === 273 /* NamedImports */) { for (const element of namedBindings.elements) { if (isUnused(element.name)) changes.delete(sourceFile, element); @@ -157933,9 +157998,9 @@ } } break; - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: break; - case 203 /* ObjectBindingPattern */: + case 204 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { changes.delete( sourceFile, @@ -158056,14 +158121,14 @@ } function isInImport(decl) { switch (decl.kind) { - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: return true; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return isVariableDeclarationInImport(decl); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); default: return false; @@ -158078,7 +158143,7 @@ } function filterImport(i, moduleSpecifier, keep) { switch (i.kind) { - case 269 /* ImportDeclaration */: { + case 270 /* ImportDeclaration */: { const clause = i.importClause; if (!clause) return void 0; @@ -158093,9 +158158,9 @@ void 0 ) : void 0; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return keep(i.name) ? i : void 0; - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { const name = filterBindingName(i.name, keep); return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; } @@ -158104,7 +158169,7 @@ } } function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 271 /* NamespaceImport */) { + if (namedBindings.kind === 272 /* NamespaceImport */) { return keep(namedBindings.name) ? namedBindings : void 0; } else { const newElements = namedBindings.elements.filter((e) => keep(e.name)); @@ -158115,9 +158180,9 @@ switch (name.kind) { case 79 /* Identifier */: return keep(name) ? name : void 0; - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: return name; - case 203 /* ObjectBindingPattern */: { + case 204 /* ObjectBindingPattern */: { const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } @@ -158146,13 +158211,13 @@ } function isNonVariableTopLevelDeclaration(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 269 /* ImportEqualsDeclaration */: return true; default: return false; @@ -158160,17 +158225,17 @@ } function forEachTopLevelDeclaration(statement, cb) { switch (statement.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 269 /* ImportEqualsDeclaration */: return cb(statement); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 241 /* ExpressionStatement */: { + case 242 /* ExpressionStatement */: { const { expression } = statement; return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; } @@ -158180,8 +158245,8 @@ switch (name.kind) { case 79 /* Identifier */: return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 204 /* ArrayBindingPattern */: - case 203 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); default: return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); @@ -158192,9 +158257,9 @@ } function getTopLevelDeclarationStatement(d) { switch (d.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return d.parent.parent; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getTopLevelDeclarationStatement( cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) ); @@ -158225,26 +158290,26 @@ return useEs6Exports ? [addEs6Export(decl)] : addCommonjsExport(decl); } function addEs6Export(d) { - const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(93 /* ExportKeyword */)], getModifiers(d)) : void 0; + const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(94 /* ExportKeyword */)], getModifiers(d)) : void 0; switch (d.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const decorators = canHaveDecorators(d) ? getDecorators(d) : void 0; return factory.updateClassDeclaration(d, concatenate(decorators, modifiers), d.name, d.typeParameters, d.heritageClauses, d.members); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return Debug.fail(); default: return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); @@ -158255,18 +158320,18 @@ } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: return [decl.name.text]; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 269 /* ImportEqualsDeclaration */: return emptyArray; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return Debug.fail("Can't export an ExpressionStatement"); default: return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); @@ -158370,7 +158435,7 @@ const lastDeclaration = signatureDecls[signatureDecls.length - 1]; let updated = lastDeclaration; switch (lastDeclaration.kind) { - case 170 /* MethodSignature */: { + case 171 /* MethodSignature */: { updated = factory.updateMethodSignature( lastDeclaration, lastDeclaration.modifiers, @@ -158382,7 +158447,7 @@ ); break; } - case 171 /* MethodDeclaration */: { + case 172 /* MethodDeclaration */: { updated = factory.updateMethodDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -158396,7 +158461,7 @@ ); break; } - case 176 /* CallSignature */: { + case 177 /* CallSignature */: { updated = factory.updateCallSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -158405,7 +158470,7 @@ ); break; } - case 173 /* Constructor */: { + case 174 /* Constructor */: { updated = factory.updateConstructorDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -158414,7 +158479,7 @@ ); break; } - case 177 /* ConstructSignature */: { + case 178 /* ConstructSignature */: { updated = factory.updateConstructSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -158423,7 +158488,7 @@ ); break; } - case 259 /* FunctionDeclaration */: { + case 260 /* FunctionDeclaration */: { updated = factory.updateFunctionDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -158473,7 +158538,7 @@ p.dotDotDotToken, p.name, p.questionToken, - p.type || factory.createKeywordTypeNode(131 /* AnyKeyword */) + p.type || factory.createKeywordTypeNode(132 /* AnyKeyword */) ), p); const parameterDocComment = p.symbol && p.symbol.getDocumentationComment(checker); if (parameterDocComment) { @@ -158496,12 +158561,12 @@ } function isConvertableSignatureDeclaration(d) { switch (d.kind) { - case 170 /* MethodSignature */: - case 171 /* MethodDeclaration */: - case 176 /* CallSignature */: - case 173 /* Constructor */: - case 177 /* ConstructSignature */: - case 259 /* FunctionDeclaration */: + case 171 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 177 /* CallSignature */: + case 174 /* Constructor */: + case 178 /* ConstructSignature */: + case 260 /* FunctionDeclaration */: return true; } return false; @@ -159155,14 +159220,14 @@ const functionReference = entry.node; const parent2 = functionReference.parent; switch (parent2.kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); if (callOrNewExpression && callOrNewExpression.expression === functionReference) { return callOrNewExpression; } break; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); @@ -159171,7 +159236,7 @@ } } break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); @@ -159189,13 +159254,13 @@ const reference = entry.node; const parent2 = reference.parent; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; @@ -159237,22 +159302,22 @@ if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false; switch (functionDeclaration.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: if (isObjectLiteralExpression(functionDeclaration.parent)) { const contextualSymbol = getSymbolForContextualType(functionDeclaration.name, checker); return ((_a2 = contextualSymbol == null ? void 0 : contextualSymbol.declarations) == null ? void 0 : _a2.length) === 1 && isSingleImplementation(functionDeclaration, checker); } return isSingleImplementation(functionDeclaration, checker); - case 173 /* Constructor */: + case 174 /* Constructor */: if (isClassDeclaration(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); } - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return isValidVariableDeclaration(functionDeclaration.parent); } return false; @@ -159262,7 +159327,7 @@ } function hasNameOrDefault(functionOrClassDeclaration) { if (!functionOrClassDeclaration.name) { - const defaultKeyword = findModifier(functionOrClassDeclaration, 88 /* DefaultKeyword */); + const defaultKeyword = findModifier(functionOrClassDeclaration, 89 /* DefaultKeyword */); return !!defaultKeyword; } return true; @@ -159429,16 +159494,16 @@ } function getClassNames(constructorDeclaration) { switch (constructorDeclaration.parent.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const classDeclaration = constructorDeclaration.parent; if (classDeclaration.name) return [classDeclaration.name]; const defaultModifier = Debug.checkDefined( - findModifier(classDeclaration, 88 /* DefaultKeyword */), + findModifier(classDeclaration, 89 /* DefaultKeyword */), "Nameless class declaration should be a default export" ); return [defaultModifier]; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: const classExpression = constructorDeclaration.parent; const variableDeclaration = constructorDeclaration.parent.parent; const className = classExpression.name; @@ -159449,29 +159514,29 @@ } function getFunctionNames(functionDeclaration) { switch (functionDeclaration.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: if (functionDeclaration.name) return [functionDeclaration.name]; const defaultModifier = Debug.checkDefined( - findModifier(functionDeclaration, 88 /* DefaultKeyword */), + findModifier(functionDeclaration, 89 /* DefaultKeyword */), "Nameless function declaration should be a default export" ); return [defaultModifier]; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return [functionDeclaration.name]; - case 173 /* Constructor */: + case 174 /* Constructor */: const ctrKeyword = Debug.checkDefined( - findChildOfKind(functionDeclaration, 135 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), + findChildOfKind(functionDeclaration, 136 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword" ); - if (functionDeclaration.parent.kind === 228 /* ClassExpression */) { + if (functionDeclaration.parent.kind === 229 /* ClassExpression */) { const variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; } return [ctrKeyword]; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return [functionDeclaration.parent.name]; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name]; return [functionDeclaration.parent.name]; @@ -159569,11 +159634,11 @@ function getParentBinaryExpression(expr) { const container = findAncestor(expr.parent, (n) => { switch (n.kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return false; - case 225 /* TemplateExpression */: - case 223 /* BinaryExpression */: + case 226 /* TemplateExpression */: + case 224 /* BinaryExpression */: return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; @@ -160196,18 +160261,18 @@ function checkForStaticContext(nodeToCheck, containingClass) { let current = nodeToCheck; while (current !== containingClass) { - if (current.kind === 169 /* PropertyDeclaration */) { + if (current.kind === 170 /* PropertyDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 166 /* Parameter */) { + } else if (current.kind === 167 /* Parameter */) { const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 173 /* Constructor */) { + if (ctorOrMethod.kind === 174 /* Constructor */) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 171 /* MethodDeclaration */) { + } else if (current.kind === 172 /* MethodDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } @@ -160247,7 +160312,7 @@ /*includeClassComputedPropertyName*/ false ); - if (container.kind === 259 /* FunctionDeclaration */ || container.kind === 171 /* MethodDeclaration */ && container.parent.kind === 207 /* ObjectLiteralExpression */ || container.kind === 215 /* FunctionExpression */) { + if (container.kind === 260 /* FunctionDeclaration */ || container.kind === 172 /* MethodDeclaration */ && container.parent.kind === 208 /* ObjectLiteralExpression */ || container.kind === 216 /* FunctionExpression */) { rangeFacts |= 16 /* UsesThisInFunction */; } } @@ -160257,21 +160322,21 @@ return true; } if (isDeclaration(node2)) { - const declaringNode = node2.kind === 257 /* VariableDeclaration */ ? node2.parent.parent : node2; + const declaringNode = node2.kind === 258 /* VariableDeclaration */ ? node2.parent.parent : node2; if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } } switch (node2.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); return true; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; - case 106 /* SuperKeyword */: - if (node2.parent.kind === 210 /* CallExpression */) { + case 107 /* SuperKeyword */: + if (node2.parent.kind === 211 /* CallExpression */) { const containingClass2 = getContainingClass(node2); if (containingClass2 === void 0 || containingClass2.pos < span.start || containingClass2.end >= span.start + span.length) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractSuper)); @@ -160282,7 +160347,7 @@ thisNode = node2; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: forEachChild(node2, function check(n) { if (isThis(n)) { rangeFacts |= 8 /* UsesThis */; @@ -160293,34 +160358,34 @@ forEachChild(n, check); } }); - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); } - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return false; } const savedPermittedJumps = permittedJumps; switch (node2.kind) { - case 242 /* IfStatement */: + case 243 /* IfStatement */: permittedJumps &= ~4 /* Return */; break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: permittedJumps = 0 /* None */; break; - case 238 /* Block */: - if (node2.parent && node2.parent.kind === 255 /* TryStatement */ && node2.parent.finallyBlock === node2) { + case 239 /* Block */: + if (node2.parent && node2.parent.kind === 256 /* TryStatement */ && node2.parent.finallyBlock === node2) { permittedJumps = 4 /* Return */; } break; - case 293 /* DefaultClause */: - case 292 /* CaseClause */: + case 294 /* DefaultClause */: + case 293 /* CaseClause */: permittedJumps |= 1 /* Break */; break; default: @@ -160334,39 +160399,39 @@ break; } switch (node2.kind) { - case 194 /* ThisType */: - case 108 /* ThisKeyword */: + case 195 /* ThisType */: + case 109 /* ThisKeyword */: rangeFacts |= 8 /* UsesThis */; thisNode = node2; break; - case 253 /* LabeledStatement */: { + case 254 /* LabeledStatement */: { const label = node2.label; (seenLabels || (seenLabels = [])).push(label.escapedText); forEachChild(node2, visit); seenLabels.pop(); break; } - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: { + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: { const label = node2.label; if (label) { if (!contains(seenLabels, label.escapedText)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { - if (!(permittedJumps & (node2.kind === 249 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { + if (!(permittedJumps & (node2.kind === 250 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; } - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: rangeFacts |= 4 /* IsAsyncFunction */; break; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: rangeFacts |= 2 /* IsGenerator */; break; - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: if (permittedJumps & 4 /* Return */) { rangeFacts |= 1 /* HasReturn */; } else { @@ -160416,12 +160481,12 @@ const scopes = []; while (true) { current = current.parent; - if (current.kind === 166 /* Parameter */) { + if (current.kind === 167 /* Parameter */) { current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; } if (isScope(current)) { scopes.push(current); - if (current.kind === 308 /* SourceFile */) { + if (current.kind === 309 /* SourceFile */) { return scopes; } } @@ -160497,28 +160562,28 @@ } function getDescriptionForFunctionLikeDeclaration(scope) { switch (scope.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return "constructor"; - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return "arrow function"; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return `method '${scope.name.getText()}'`; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return `'get ${scope.name.getText()}'`; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return `'set ${scope.name.getText()}'`; default: throw Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); } } function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 260 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; + return scope.kind === 261 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; } function getDescriptionForModuleLikeDeclaration(scope) { - return scope.kind === 265 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; + return scope.kind === 266 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; } function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParameterUsages, substitutions }, exposedVariableDeclarations, range, context) { const checker = context.program.getTypeChecker(); @@ -160573,12 +160638,12 @@ let newFunction; const callThis = !!(range.facts & 16 /* UsesThisInFunction */); if (isClassLike(scope)) { - const modifiers = isJS ? [] : [factory.createModifier(121 /* PrivateKeyword */)]; + const modifiers = isJS ? [] : [factory.createModifier(122 /* PrivateKeyword */)]; if (range.facts & 32 /* InStaticRegion */) { - modifiers.push(factory.createModifier(124 /* StaticKeyword */)); + modifiers.push(factory.createModifier(125 /* StaticKeyword */)); } if (range.facts & 4 /* IsAsyncFunction */) { - modifiers.push(factory.createModifier(132 /* AsyncKeyword */)); + modifiers.push(factory.createModifier(133 /* AsyncKeyword */)); } newFunction = factory.createMethodDeclaration( modifiers.length ? modifiers : void 0, @@ -160614,7 +160679,7 @@ ); } newFunction = factory.createFunctionDeclaration( - range.facts & 4 /* IsAsyncFunction */ ? [factory.createToken(132 /* AsyncKeyword */)] : void 0, + range.facts & 4 /* IsAsyncFunction */ ? [factory.createToken(133 /* AsyncKeyword */)] : void 0, range.facts & 2 /* IsGenerator */ ? factory.createToken(41 /* AsteriskToken */) : void 0, functionName, typeParameters, @@ -160826,7 +160891,7 @@ while (isParenthesizedTypeNode(withoutParens)) { withoutParens = withoutParens.type; } - return isUnionTypeNode(withoutParens) && find(withoutParens.types, (t) => t.kind === 155 /* UndefinedKeyword */) ? clone2 : factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]); + return isUnionTypeNode(withoutParens) && find(withoutParens.types, (t) => t.kind === 156 /* UndefinedKeyword */) ? clone2 : factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(156 /* UndefinedKeyword */)]); } } function extractConstantInScope(node, scope, { substitutions }, rangeFacts, context) { @@ -160848,11 +160913,11 @@ if (isClassLike(scope)) { Debug.assert(!isJS, "Cannot extract to a JS class"); const modifiers = []; - modifiers.push(factory.createModifier(121 /* PrivateKeyword */)); + modifiers.push(factory.createModifier(122 /* PrivateKeyword */)); if (rangeFacts & 32 /* InStaticRegion */) { - modifiers.push(factory.createModifier(124 /* StaticKeyword */)); + modifiers.push(factory.createModifier(125 /* StaticKeyword */)); } - modifiers.push(factory.createModifier(146 /* ReadonlyKeyword */)); + modifiers.push(factory.createModifier(147 /* ReadonlyKeyword */)); const newVariable = factory.createPropertyDeclaration( modifiers, localNameText, @@ -160895,7 +160960,7 @@ changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); const localReference = factory.createIdentifier(localNameText); changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 241 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { + } else if (node.parent.kind === 242 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { const newVariableStatement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -160925,7 +160990,7 @@ false ); } - if (node.parent.kind === 241 /* ExpressionStatement */) { + if (node.parent.kind === 242 /* ExpressionStatement */) { changeTracker.delete(context.file, node.parent); } else { let localReference = factory.createIdentifier(localNameText); @@ -161477,27 +161542,27 @@ function isExtractableExpression(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 302 /* EnumMember */: + case 303 /* EnumMember */: return false; } switch (node.kind) { case 10 /* StringLiteral */: - return parent2.kind !== 269 /* ImportDeclaration */ && parent2.kind !== 273 /* ImportSpecifier */; - case 227 /* SpreadElement */: - case 203 /* ObjectBindingPattern */: - case 205 /* BindingElement */: + return parent2.kind !== 270 /* ImportDeclaration */ && parent2.kind !== 274 /* ImportSpecifier */; + case 228 /* SpreadElement */: + case 204 /* ObjectBindingPattern */: + case 206 /* BindingElement */: return false; case 79 /* Identifier */: - return parent2.kind !== 205 /* BindingElement */ && parent2.kind !== 273 /* ImportSpecifier */ && parent2.kind !== 278 /* ExportSpecifier */; + return parent2.kind !== 206 /* BindingElement */ && parent2.kind !== 274 /* ImportSpecifier */ && parent2.kind !== 279 /* ExportSpecifier */; } return true; } function isBlockLike(node) { switch (node.kind) { - case 238 /* Block */: - case 308 /* SourceFile */: - case 265 /* ModuleBlock */: - case 292 /* CaseClause */: + case 239 /* Block */: + case 309 /* SourceFile */: + case 266 /* ModuleBlock */: + case 293 /* CaseClause */: return true; default: return false; @@ -161723,10 +161788,10 @@ } function isConvertibleDeclaration(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return true; default: return false; @@ -161854,7 +161919,7 @@ return getRenameInfoError(wouldRenameNodeModules); } const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 164 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; + const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 165 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; const displayName = specifierName || typeChecker.symbolToString(symbol); const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol); return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), node, sourceFile); @@ -161954,7 +162019,7 @@ case 80 /* PrivateIdentifier */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return true; case 8 /* NumericLiteral */: return isLiteralNameOfPropertyDeclarationOrIndexAccess(node); @@ -162140,10 +162205,10 @@ ); } return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 212 /* TaggedTemplateExpression */) { + } else if (isTemplateHead(node) && parent2.parent.kind === 213 /* TaggedTemplateExpression */) { const templateExpression = parent2; const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 225 /* TemplateExpression */); + Debug.assert(templateExpression.kind === 226 /* TemplateExpression */); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { @@ -162210,17 +162275,17 @@ return void 0; const { parent: parent2 } = startingToken; switch (parent2.kind) { - case 214 /* ParenthesizedExpression */: - case 171 /* MethodDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 215 /* ParenthesizedExpression */: + case 172 /* MethodDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: const info = getArgumentOrParameterListInfo(startingToken, position, sourceFile); if (!info) return void 0; const { argumentIndex, argumentCount, argumentsSpan } = info; const contextualType = isMethodDeclaration(parent2) ? checker.getContextualTypeForObjectLiteralElement(parent2) : checker.getContextualType(parent2); return contextualType && { contextualType, argumentIndex, argumentCount, argumentsSpan }; - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const highestBinary = getHighestBinary(parent2); const contextualType2 = checker.getContextualType(highestBinary); const argumentIndex2 = startingToken.kind === 20 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; @@ -162294,7 +162359,7 @@ const template = taggedTemplate.template; const applicableSpanStart = template.getStart(); let applicableSpanEnd = template.getEnd(); - if (template.kind === 225 /* TemplateExpression */) { + if (template.kind === 226 /* TemplateExpression */) { const lastSpan = last(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia( @@ -162604,10 +162669,10 @@ const closeBraceToken = Debug.checkDefined(children.pop()); Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */); Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */); - const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 146 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 57 /* QuestionToken */); + const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 147 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 57 /* QuestionToken */); const groupedWithBrackets = groupChildren( groupedWithPlusMinusTokens, - ({ kind }) => kind === 22 /* OpenBracketToken */ || kind === 165 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ + ({ kind }) => kind === 22 /* OpenBracketToken */ || kind === 166 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ ); return [ openBraceToken, @@ -162618,7 +162683,7 @@ } if (isPropertySignature(node)) { const children = groupChildren(node.getChildren(), (child) => child === node.name || contains(node.modifiers, child)); - const firstJSDocChild = ((_a2 = children[0]) == null ? void 0 : _a2.kind) === 323 /* JSDoc */ ? children[0] : void 0; + const firstJSDocChild = ((_a2 = children[0]) == null ? void 0 : _a2.kind) === 324 /* JSDoc */ ? children[0] : void 0; const withJSDocSeparated = firstJSDocChild ? children.slice(1) : children; const splittedChildren = splitChildren(withJSDocSeparated, ({ kind }) => kind === 58 /* ColonToken */); return firstJSDocChild ? [firstJSDocChild, createSyntaxList2(splittedChildren)] : splittedChildren; @@ -162679,19 +162744,19 @@ } function isListOpener(token) { const kind = token && token.kind; - return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 283 /* JsxOpeningElement */; + return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 284 /* JsxOpeningElement */; } function isListCloser(token) { const kind = token && token.kind; - return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 284 /* JsxClosingElement */; + return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 285 /* JsxClosingElement */; } function getEndPos(sourceFile, node) { switch (node.kind) { - case 344 /* JSDocParameterTag */: - case 341 /* JSDocCallbackTag */: - case 351 /* JSDocPropertyTag */: - case 349 /* JSDocTypedefTag */: - case 346 /* JSDocThisTag */: + case 345 /* JSDocParameterTag */: + case 342 /* JSDocCallbackTag */: + case 352 /* JSDocPropertyTag */: + case 350 /* JSDocTypedefTag */: + case 347 /* JSDocThisTag */: return sourceFile.getLineEndOfPosition(node.getStart()); default: return node.getEnd(); @@ -162726,7 +162791,7 @@ } const flags = getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 228 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; + return getDeclarationOfKind(symbol, 229 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; } if (flags & 384 /* Enum */) return "enum" /* enumElement */; @@ -162755,7 +162820,7 @@ if (typeChecker.isArgumentsSymbol(symbol)) { return "local var" /* localVariableElement */; } - if (location.kind === 108 /* ThisKeyword */ && isExpression(location) || isThisInTypeQuery(location)) { + if (location.kind === 109 /* ThisKeyword */ && isExpression(location) || isThisInTypeQuery(location)) { return "parameter" /* parameterElement */; } const flags = getCombinedLocalAndExportSymbolFlags(symbol); @@ -162839,26 +162904,26 @@ const symbolFlags = getCombinedLocalAndExportSymbolFlags(symbol); let symbolKind = semanticMeaning & 1 /* Value */ ? getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) : "" /* unknown */; let hasAddedSymbolInfo = false; - const isThisExpression = location.kind === 108 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location); + const isThisExpression = location.kind === 109 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location); let type; let documentationFromAlias; let tagsFromAlias; let hasMultipleSignatures = false; - if (location.kind === 108 /* ThisKeyword */ && !isThisExpression) { - return { displayParts: [keywordPart(108 /* ThisKeyword */)], documentation: [], symbolKind: "primitive type" /* primitiveType */, tags: void 0 }; + if (location.kind === 109 /* ThisKeyword */ && !isThisExpression) { + return { displayParts: [keywordPart(109 /* ThisKeyword */)], documentation: [], symbolKind: "primitive type" /* primitiveType */, tags: void 0 }; } if (symbolKind !== "" /* unknown */ || symbolFlags & 32 /* Class */ || symbolFlags & 2097152 /* Alias */) { if (symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */) { const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location); if (declaration) { switch (declaration.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: symbolKind = "getter" /* memberGetAccessorElement */; break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: symbolKind = "setter" /* memberSetAccessorElement */; break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: symbolKind = "accessor" /* memberAccessorVariableElement */; break; default: @@ -162870,7 +162935,7 @@ } let signature; type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (location.parent && location.parent.kind === 208 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 209 /* PropertyAccessExpression */) { const right = location.parent.name; if (right === location || right && right.getFullWidth() === 0) { location = location.parent; @@ -162886,7 +162951,7 @@ } if (callExpressionLike) { signature = typeChecker.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 211 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 106 /* SuperKeyword */; + const useConstructSignatures = callExpressionLike.kind === 212 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 107 /* SuperKeyword */; const allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (signature && !contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : void 0; @@ -162901,10 +162966,10 @@ displayParts.push(spacePart()); if (useConstructSignatures) { if (signature.flags & 4 /* Abstract */) { - displayParts.push(keywordPart(126 /* AbstractKeyword */)); + displayParts.push(keywordPart(127 /* AbstractKeyword */)); displayParts.push(spacePart()); } - displayParts.push(keywordPart(103 /* NewKeyword */)); + displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); } addFullSymbolName(symbol); @@ -162934,10 +162999,10 @@ } if (useConstructSignatures) { if (signature.flags & 4 /* Abstract */) { - displayParts.push(keywordPart(126 /* AbstractKeyword */)); + displayParts.push(keywordPart(127 /* AbstractKeyword */)); displayParts.push(spacePart()); } - displayParts.push(keywordPart(103 /* NewKeyword */)); + displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); } addSignatureDisplayParts(signature, allSignatures, 262144 /* WriteArrowStyleSignature */); @@ -162949,21 +163014,21 @@ hasMultipleSignatures = allSignatures.length > 1; } } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || // name of function declaration - location.kind === 135 /* ConstructorKeyword */ && location.parent.kind === 173 /* Constructor */) { + location.kind === 136 /* ConstructorKeyword */ && location.parent.kind === 174 /* Constructor */) { const functionDeclaration = location.parent; - const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 135 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); + const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 136 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 173 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + const allSignatures = functionDeclaration.kind === 174 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 173 /* Constructor */) { + if (functionDeclaration.kind === 174 /* Constructor */) { symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 176 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 177 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -162975,10 +163040,10 @@ } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 228 /* ClassExpression */)) { + if (getDeclarationOfKind(symbol, 229 /* ClassExpression */)) { pushSymbolKind("local class" /* localClassElement */); } else { - displayParts.push(keywordPart(84 /* ClassKeyword */)); + displayParts.push(keywordPart(85 /* ClassKeyword */)); } displayParts.push(spacePart()); addFullSymbolName(symbol); @@ -162986,14 +163051,14 @@ } if (symbolFlags & 64 /* Interface */ && semanticMeaning & 2 /* Type */) { prefixNextMeaning(); - displayParts.push(keywordPart(118 /* InterfaceKeyword */)); + displayParts.push(keywordPart(119 /* InterfaceKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 524288 /* TypeAlias */ && semanticMeaning & 2 /* Type */) { prefixNextMeaning(); - displayParts.push(keywordPart(154 /* TypeKeyword */)); + displayParts.push(keywordPart(155 /* TypeKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); @@ -163005,18 +163070,18 @@ if (symbolFlags & 384 /* Enum */) { prefixNextMeaning(); if (some(symbol.declarations, (d) => isEnumDeclaration(d) && isEnumConst(d))) { - displayParts.push(keywordPart(85 /* ConstKeyword */)); + displayParts.push(keywordPart(86 /* ConstKeyword */)); displayParts.push(spacePart()); } - displayParts.push(keywordPart(92 /* EnumKeyword */)); + displayParts.push(keywordPart(93 /* EnumKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); } if (symbolFlags & 1536 /* Module */ && !isThisExpression) { prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 264 /* ModuleDeclaration */); + const declaration = getDeclarationOfKind(symbol, 265 /* ModuleDeclaration */); const isNamespace = declaration && declaration.name && declaration.name.kind === 79 /* Identifier */; - displayParts.push(keywordPart(isNamespace ? 143 /* NamespaceKeyword */ : 142 /* ModuleKeyword */)); + displayParts.push(keywordPart(isNamespace ? 144 /* NamespaceKeyword */ : 143 /* ModuleKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); } @@ -163032,7 +163097,7 @@ addFullSymbolName(symbol.parent, enclosingDeclaration); writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - const decl = getDeclarationOfKind(symbol, 165 /* TypeParameter */); + const decl = getDeclarationOfKind(symbol, 166 /* TypeParameter */); if (decl === void 0) return Debug.fail(); const declaration = decl.parent; @@ -163040,16 +163105,16 @@ if (isFunctionLike(declaration)) { addInPrefix(); const signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 177 /* ConstructSignature */) { - displayParts.push(keywordPart(103 /* NewKeyword */)); + if (declaration.kind === 178 /* ConstructSignature */) { + displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); - } else if (declaration.kind !== 176 /* CallSignature */ && declaration.name) { + } else if (declaration.kind !== 177 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); } else if (isTypeAliasDeclaration(declaration)) { addInPrefix(); - displayParts.push(keywordPart(154 /* TypeKeyword */)); + displayParts.push(keywordPart(155 /* TypeKeyword */)); displayParts.push(spacePart()); addFullSymbolName(declaration.symbol); writeTypeParametersOfSymbol(declaration.symbol, sourceFile); @@ -163061,7 +163126,7 @@ symbolKind = "enum member" /* enumMemberElement */; addPrefixForAnyFunctionOrVar(symbol, "enum member"); const declaration = (_a2 = symbol.declarations) == null ? void 0 : _a2[0]; - if ((declaration == null ? void 0 : declaration.kind) === 302 /* EnumMember */) { + if ((declaration == null ? void 0 : declaration.kind) === 303 /* EnumMember */) { const constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== void 0) { displayParts.push(spacePart()); @@ -163105,33 +163170,33 @@ } if (symbol.declarations) { switch (symbol.declarations[0].kind) { - case 267 /* NamespaceExportDeclaration */: - displayParts.push(keywordPart(93 /* ExportKeyword */)); + case 268 /* NamespaceExportDeclaration */: + displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); - displayParts.push(keywordPart(143 /* NamespaceKeyword */)); + displayParts.push(keywordPart(144 /* NamespaceKeyword */)); break; - case 274 /* ExportAssignment */: - displayParts.push(keywordPart(93 /* ExportKeyword */)); + case 275 /* ExportAssignment */: + displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); - displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 63 /* EqualsToken */ : 88 /* DefaultKeyword */)); + displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 63 /* EqualsToken */ : 89 /* DefaultKeyword */)); break; - case 278 /* ExportSpecifier */: - displayParts.push(keywordPart(93 /* ExportKeyword */)); + case 279 /* ExportSpecifier */: + displayParts.push(keywordPart(94 /* ExportKeyword */)); break; default: - displayParts.push(keywordPart(100 /* ImportKeyword */)); + displayParts.push(keywordPart(101 /* ImportKeyword */)); } } displayParts.push(spacePart()); addFullSymbolName(symbol); forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 268 /* ImportEqualsDeclaration */) { + if (declaration.kind === 269 /* ImportEqualsDeclaration */) { const importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); displayParts.push(operatorPart(63 /* EqualsToken */)); displayParts.push(spacePart()); - displayParts.push(keywordPart(147 /* RequireKeyword */)); + displayParts.push(keywordPart(148 /* RequireKeyword */)); displayParts.push(punctuationPart(20 /* OpenParenToken */)); displayParts.push(displayPart(getTextOfNode(getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), 8 /* stringLiteral */)); displayParts.push(punctuationPart(21 /* CloseParenToken */)); @@ -163153,7 +163218,7 @@ if (type) { if (isThisExpression) { prefixNextMeaning(); - displayParts.push(keywordPart(108 /* ThisKeyword */)); + displayParts.push(keywordPart(109 /* ThisKeyword */)); } else { addPrefixForAnyFunctionOrVar(symbol, symbolKind); } @@ -163193,9 +163258,9 @@ documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker); } if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 308 /* SourceFile */)) { + if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 309 /* SourceFile */)) { for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 223 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 224 /* BinaryExpression */) { continue; } const rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -163249,7 +163314,7 @@ } function addInPrefix() { displayParts.push(spacePart()); - displayParts.push(keywordPart(101 /* InKeyword */)); + displayParts.push(keywordPart(102 /* InKeyword */)); displayParts.push(spacePart()); } function addFullSymbolName(symbolToDisplay, enclosingDeclaration2) { @@ -163347,14 +163412,14 @@ return false; } return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 215 /* FunctionExpression */) { + if (declaration.kind === 216 /* FunctionExpression */) { return true; } - if (declaration.kind !== 257 /* VariableDeclaration */ && declaration.kind !== 259 /* FunctionDeclaration */) { + if (declaration.kind !== 258 /* VariableDeclaration */ && declaration.kind !== 260 /* FunctionDeclaration */) { return false; } for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 308 /* SourceFile */ || parent2.kind === 265 /* ModuleBlock */) { + if (parent2.kind === 309 /* SourceFile */ || parent2.kind === 266 /* ModuleBlock */) { return false; } } @@ -163528,16 +163593,16 @@ return newEnd !== end && (trailingTriviaOption === 2 /* Include */ || isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))) ? newEnd : end; } function isSeparator(node, candidate) { - return !!candidate && !!node.parent && (candidate.kind === 27 /* CommaToken */ || candidate.kind === 26 /* SemicolonToken */ && node.parent.kind === 207 /* ObjectLiteralExpression */); + return !!candidate && !!node.parent && (candidate.kind === 27 /* CommaToken */ || candidate.kind === 26 /* SemicolonToken */ && node.parent.kind === 208 /* ObjectLiteralExpression */); } function isThisTypeAnnotatable(containingFunction) { return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); } function updateJSDocHost(parent2) { - if (parent2.kind !== 216 /* ArrowFunction */) { + if (parent2.kind !== 217 /* ArrowFunction */) { return parent2; } - const jsDocNode = parent2.parent.kind === 169 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; + const jsDocNode = parent2.parent.kind === 170 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; jsDocNode.jsDoc = parent2.jsDoc; return jsDocNode; } @@ -163546,7 +163611,7 @@ return void 0; } switch (oldTag.kind) { - case 344 /* JSDocParameterTag */: { + case 345 /* JSDocParameterTag */: { const oldParam = oldTag; const newParam = newTag; return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag( @@ -163560,14 +163625,14 @@ oldParam.comment ) : void 0; } - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: return factory.createJSDocReturnTag( /*tagName*/ void 0, newTag.typeExpression, oldTag.comment ); - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return factory.createJSDocTypeTag( /*tagName*/ void 0, @@ -163938,7 +164003,7 @@ return !isInComment(sourceFile, position) && !isInString(sourceFile, position) && !isInTemplateString(sourceFile, position) && !isInJSXText(sourceFile, position); } function needSemicolonBetween(a, b) { - return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 164 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 165 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } function deleteNode(changes, sourceFile, node, options = { leadingTriviaOption: 1 /* IncludeAll */ }) { const startPosition = getAdjustedStartPosition(sourceFile, node, options); @@ -164188,7 +164253,7 @@ endNode2 = first(node.parameters); } } else { - endNode2 = (_a2 = node.kind === 257 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; + endNode2 = (_a2 = node.kind === 258 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; } this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); return true; @@ -164338,18 +164403,18 @@ } getInsertNodeAfterOptionsWorker(node) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: case 10 /* StringLiteral */: case 79 /* Identifier */: return { prefix: ", " }; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return { suffix: "," + this.newLineCharacter }; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return { prefix: " " }; - case 166 /* Parameter */: + case 167 /* Parameter */: return {}; default: Debug.assert(isStatement(node) || isClassOrTypeElement(node)); @@ -164358,22 +164423,22 @@ } insertName(sourceFile, node, name) { Debug.assert(!node.name); - if (node.kind === 216 /* ArrowFunction */) { + if (node.kind === 217 /* ArrowFunction */) { const arrow = findChildOfKind(node, 38 /* EqualsGreaterThanToken */, sourceFile); const lparen = findChildOfKind(node, 20 /* OpenParenToken */, sourceFile); if (lparen) { - this.insertNodesAt(sourceFile, lparen.getStart(sourceFile), [factory.createToken(98 /* FunctionKeyword */), factory.createIdentifier(name)], { joiner: " " }); + this.insertNodesAt(sourceFile, lparen.getStart(sourceFile), [factory.createToken(99 /* FunctionKeyword */), factory.createIdentifier(name)], { joiner: " " }); deleteNode(this, sourceFile, arrow); } else { this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); this.replaceRange(sourceFile, arrow, factory.createToken(21 /* CloseParenToken */)); } - if (node.body.kind !== 238 /* Block */) { - this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(18 /* OpenBraceToken */), factory.createToken(105 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); + if (node.body.kind !== 239 /* Block */) { + this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(18 /* OpenBraceToken */), factory.createToken(106 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); this.insertNodesAt(sourceFile, node.body.end, [factory.createToken(26 /* SemicolonToken */), factory.createToken(19 /* CloseBraceToken */)], { joiner: " " }); } } else { - const pos = findChildOfKind(node, node.kind === 215 /* FunctionExpression */ ? 98 /* FunctionKeyword */ : 84 /* ClassKeyword */, sourceFile).end; + const pos = findChildOfKind(node, node.kind === 216 /* FunctionExpression */ ? 99 /* FunctionKeyword */ : 85 /* ClassKeyword */, sourceFile).end; this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); } } @@ -164605,7 +164670,7 @@ ((_deleteDeclaration) => { function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { switch (node.kind) { - case 166 /* Parameter */: { + case 167 /* Parameter */: { const oldFunction = node.parent; if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 20 /* OpenParenToken */, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); @@ -164614,29 +164679,29 @@ } break; } - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: const isFirstImport = sourceFile.imports.length && node === first(sourceFile.imports).parent || node === find(sourceFile.statements, isAnyImportSyntax); deleteNode(changes, sourceFile, node, { leadingTriviaOption: isFirstImport ? 0 /* Exclude */ : hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: const pattern = node.parent; - const preserveComma = pattern.kind === 204 /* ArrayBindingPattern */ && node !== last(pattern.elements); + const preserveComma = pattern.kind === 205 /* ArrayBindingPattern */ && node !== last(pattern.elements); if (preserveComma) { deleteNode(changes, sourceFile, node); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); break; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: const namedImports = node.parent; if (namedImports.elements.length === 1) { deleteImportBinding(changes, sourceFile, namedImports); @@ -164644,17 +164709,17 @@ deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: deleteImportBinding(changes, sourceFile, node); break; case 26 /* SemicolonToken */: deleteNode(changes, sourceFile, node, { trailingTriviaOption: 0 /* Exclude */ }); break; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); break; - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -164696,13 +164761,13 @@ const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { - const importDecl = getAncestor(node, 269 /* ImportDeclaration */); + const importDecl = getAncestor(node, 270 /* ImportDeclaration */); deleteNode(changes, sourceFile, importDecl); } } function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { const { parent: parent2 } = node; - if (parent2.kind === 295 /* CatchClause */) { + if (parent2.kind === 296 /* CatchClause */) { changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 20 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 21 /* CloseParenToken */, sourceFile)); return; } @@ -164712,14 +164777,14 @@ } const gp = parent2.parent; switch (gp.kind) { - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); break; - case 245 /* ForStatement */: + case 246 /* ForStatement */: deleteNode(changes, sourceFile, parent2); break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -164839,7 +164904,7 @@ function getFormattingScanner(text, languageVariant, startPos, endPos, cb) { const scanner2 = languageVariant === 1 /* JSX */ ? jsxScanner : standardScanner; scanner2.setText(text); - scanner2.setTextPos(startPos); + scanner2.resetTokenState(startPos); let wasNewLine = true; let leadingTrivia; let trailingTrivia; @@ -164856,9 +164921,13 @@ lastTrailingTriviaWasNewLine: () => wasNewLine, skipToEndOf, skipToStartOf, + getTokenFullStart: () => { + var _a2; + return (_a2 = lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) != null ? _a2 : scanner2.getTokenStart(); + }, getStartPos: () => { var _a2; - return (_a2 = lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) != null ? _a2 : scanner2.getTokenPos(); + return (_a2 = lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) != null ? _a2 : scanner2.getTokenStart(); } }); lastTokenInfo = void 0; @@ -164866,7 +164935,7 @@ return res; function advance() { lastTokenInfo = void 0; - const isStarted = scanner2.getStartPos() !== startPos; + const isStarted = scanner2.getTokenFullStart() !== startPos; if (isStarted) { wasNewLine = !!trailingTrivia && last(trailingTrivia).kind === 4 /* NewLineTrivia */; } else { @@ -164874,7 +164943,7 @@ } leadingTrivia = void 0; trailingTrivia = void 0; - let pos = scanner2.getStartPos(); + let pos = scanner2.getTokenFullStart(); while (pos < endPos) { const t = scanner2.getToken(); if (!isTrivia(t)) { @@ -164883,13 +164952,13 @@ scanner2.scan(); const item = { pos, - end: scanner2.getStartPos(), + end: scanner2.getTokenFullStart(), kind: t }; - pos = scanner2.getStartPos(); + pos = scanner2.getTokenFullStart(); leadingTrivia = append(leadingTrivia, item); } - savedPos = scanner2.getStartPos(); + savedPos = scanner2.getTokenFullStart(); } function shouldRescanGreaterThanToken(node) { switch (node.kind) { @@ -164905,10 +164974,10 @@ function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 288 /* JsxAttribute */: - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: - case 282 /* JsxSelfClosingElement */: + case 289 /* JsxAttribute */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: + case 283 /* JsxSelfClosingElement */: return isKeyword(node.kind) || node.kind === 79 /* Identifier */; } } @@ -164935,28 +165004,28 @@ if (lastTokenInfo && expectedScanAction === lastScanAction) { return fixTokenKind(lastTokenInfo, n); } - if (scanner2.getStartPos() !== savedPos) { + if (scanner2.getTokenFullStart() !== savedPos) { Debug.assert(lastTokenInfo !== void 0); - scanner2.setTextPos(savedPos); + scanner2.resetTokenState(savedPos); scanner2.scan(); } let currentToken = getNextToken(n, expectedScanAction); const token = createTextRangeWithKind( - scanner2.getStartPos(), - scanner2.getTextPos(), + scanner2.getTokenFullStart(), + scanner2.getTokenEnd(), currentToken ); if (trailingTrivia) { trailingTrivia = void 0; } - while (scanner2.getStartPos() < endPos) { + while (scanner2.getTokenFullStart() < endPos) { currentToken = scanner2.scan(); if (!isTrivia(currentToken)) { break; } const trivia = createTextRangeWithKind( - scanner2.getStartPos(), - scanner2.getTextPos(), + scanner2.getTokenFullStart(), + scanner2.getTokenEnd(), currentToken ); if (!trailingTrivia) { @@ -165021,7 +165090,7 @@ } function readEOFTokenRange() { Debug.assert(isOnEOF()); - return createTextRangeWithKind(scanner2.getStartPos(), scanner2.getTextPos(), 1 /* EndOfFileToken */); + return createTextRangeWithKind(scanner2.getTokenFullStart(), scanner2.getTokenEnd(), 1 /* EndOfFileToken */); } function isOnToken() { const current = lastTokenInfo ? lastTokenInfo.token.kind : scanner2.getToken(); @@ -165038,8 +165107,8 @@ return tokenInfo; } function skipToEndOf(node) { - scanner2.setTextPos(node.end); - savedPos = scanner2.getStartPos(); + scanner2.resetTokenState(node.end); + savedPos = scanner2.getTokenFullStart(); lastScanAction = void 0; lastTokenInfo = void 0; wasNewLine = false; @@ -165047,8 +165116,8 @@ trailingTrivia = void 0; } function skipToStartOf(node) { - scanner2.setTextPos(node.pos); - savedPos = scanner2.getStartPos(); + scanner2.resetTokenState(node.pos); + savedPos = scanner2.getTokenFullStart(); lastScanAction = void 0; lastTokenInfo = void 0; wasNewLine = false; @@ -165109,7 +165178,7 @@ // src/services/formatting/rules.ts function getAllRules() { const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 162 /* LastToken */; token++) { + for (let token = 0 /* FirstToken */; token <= 163 /* LastToken */; token++) { if (token !== 1 /* EndOfFileToken */) { allTokens.push(token); } @@ -165120,15 +165189,15 @@ const anyToken = { tokens: allTokens, isSpecific: false }; const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(81 /* FirstKeyword */, 162 /* LastKeyword */); + const keywords = tokenRangeFromRange(82 /* FirstKeyword */, 163 /* LastKeyword */); const binaryOperators = tokenRangeFromRange(29 /* FirstBinaryOperator */, 78 /* LastBinaryOperator */); const binaryKeywordOperators = [ - 101 /* InKeyword */, - 102 /* InstanceOfKeyword */, - 162 /* OfKeyword */, - 128 /* AsKeyword */, - 140 /* IsKeyword */, - 150 /* SatisfiesKeyword */ + 102 /* InKeyword */, + 103 /* InstanceOfKeyword */, + 163 /* OfKeyword */, + 129 /* AsKeyword */, + 141 /* IsKeyword */, + 151 /* SatisfiesKeyword */ ]; const unaryPrefixOperators = [45 /* PlusPlusToken */, 46 /* MinusMinusToken */, 54 /* TildeToken */, 53 /* ExclamationToken */]; const unaryPrefixExpressions = [ @@ -165138,18 +165207,18 @@ 20 /* OpenParenToken */, 22 /* OpenBracketToken */, 18 /* OpenBraceToken */, - 108 /* ThisKeyword */, - 103 /* NewKeyword */ + 109 /* ThisKeyword */, + 104 /* NewKeyword */ ]; - const unaryPreincrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 108 /* ThisKeyword */, 103 /* NewKeyword */]; - const unaryPostincrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 103 /* NewKeyword */]; - const unaryPredecrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 108 /* ThisKeyword */, 103 /* NewKeyword */]; - const unaryPostdecrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 103 /* NewKeyword */]; + const unaryPreincrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 109 /* ThisKeyword */, 104 /* NewKeyword */]; + const unaryPostincrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 104 /* NewKeyword */]; + const unaryPredecrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 109 /* ThisKeyword */, 104 /* NewKeyword */]; + const unaryPostdecrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 104 /* NewKeyword */]; const comments = [2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]; const typeNames = [79 /* Identifier */, ...typeKeywords]; const functionOpenBraceLeftTokenRange = anyTokenIncludingMultilineComments; - const typeScriptOpenBraceLeftTokenRange = tokenRangeFrom([79 /* Identifier */, 3 /* MultiLineCommentTrivia */, 84 /* ClassKeyword */, 93 /* ExportKeyword */, 100 /* ImportKeyword */]); - const controlOpenBraceLeftTokenRange = tokenRangeFrom([21 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 90 /* DoKeyword */, 111 /* TryKeyword */, 96 /* FinallyKeyword */, 91 /* ElseKeyword */]); + const typeScriptOpenBraceLeftTokenRange = tokenRangeFrom([79 /* Identifier */, 3 /* MultiLineCommentTrivia */, 85 /* ClassKeyword */, 94 /* ExportKeyword */, 101 /* ImportKeyword */]); + const controlOpenBraceLeftTokenRange = tokenRangeFrom([21 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 91 /* DoKeyword */, 112 /* TryKeyword */, 97 /* FinallyKeyword */, 92 /* ElseKeyword */]); const highPriorityCommonRules = [ // Leave comments alone rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */), @@ -165163,7 +165232,7 @@ rule("NoSpaceAfterQuestionMark", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBeforeDot", anyToken, [24 /* DotToken */, 28 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */), rule("NoSpaceAfterDot", [24 /* DotToken */, 28 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBetweenImportParenInImportType", 100 /* ImportKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), + rule("NoSpaceBetweenImportParenInImportType", 101 /* ImportKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), // Special handling of unary operators. // Prefix operators generally shouldn't have a space between // them and their target unary expression. @@ -165190,34 +165259,34 @@ rule("SpaceAfterCloseBrace", 19 /* CloseBraceToken */, anyTokenExcept(21 /* CloseParenToken */), [isNonJsxSameLineTokenContext, isAfterCodeBlockContext], 4 /* InsertSpace */), // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied // Also should not apply to }) - rule("SpaceBetweenCloseBraceAndElse", 19 /* CloseBraceToken */, 91 /* ElseKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBetweenCloseBraceAndWhile", 19 /* CloseBraceToken */, 115 /* WhileKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenCloseBraceAndElse", 19 /* CloseBraceToken */, 92 /* ElseKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenCloseBraceAndWhile", 19 /* CloseBraceToken */, 116 /* WhileKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), rule("NoSpaceBetweenEmptyBraceBrackets", 18 /* OpenBraceToken */, 19 /* CloseBraceToken */, [isNonJsxSameLineTokenContext, isObjectContext], 16 /* DeleteSpace */), // Add a space after control dec context if the next character is an open bracket ex: 'if (false)[a, b] = [1, 2];' -> 'if (false) [a, b] = [1, 2];' rule("SpaceAfterConditionalClosingParen", 21 /* CloseParenToken */, 22 /* OpenBracketToken */, [isControlDeclContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenFunctionKeywordAndStar", 98 /* FunctionKeyword */, 41 /* AsteriskToken */, [isFunctionDeclarationOrFunctionExpressionContext], 16 /* DeleteSpace */), + rule("NoSpaceBetweenFunctionKeywordAndStar", 99 /* FunctionKeyword */, 41 /* AsteriskToken */, [isFunctionDeclarationOrFunctionExpressionContext], 16 /* DeleteSpace */), rule("SpaceAfterStarInGeneratorDeclaration", 41 /* AsteriskToken */, 79 /* Identifier */, [isFunctionDeclarationOrFunctionExpressionContext], 4 /* InsertSpace */), - rule("SpaceAfterFunctionInFuncDecl", 98 /* FunctionKeyword */, anyToken, [isFunctionDeclContext], 4 /* InsertSpace */), + rule("SpaceAfterFunctionInFuncDecl", 99 /* FunctionKeyword */, anyToken, [isFunctionDeclContext], 4 /* InsertSpace */), // Insert new line after { and before } in multi-line contexts. rule("NewLineAfterOpenBraceInBlockContext", 18 /* OpenBraceToken */, anyToken, [isMultilineBlockContext], 8 /* InsertNewLine */), // For get/set members, we check for (identifier,identifier) since get/set don't have tokens and they are represented as just an identifier token. // Though, we do extra check on the context to make sure we are dealing with get/set node. Example: // get x() {} // set x(val) {} - rule("SpaceAfterGetSetInMember", [137 /* GetKeyword */, 151 /* SetKeyword */], 79 /* Identifier */, [isFunctionDeclContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenYieldKeywordAndStar", 125 /* YieldKeyword */, 41 /* AsteriskToken */, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 16 /* DeleteSpace */), - rule("SpaceBetweenYieldOrYieldStarAndOperand", [125 /* YieldKeyword */, 41 /* AsteriskToken */], anyToken, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 4 /* InsertSpace */), - rule("NoSpaceBetweenReturnAndSemicolon", 105 /* ReturnKeyword */, 26 /* SemicolonToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("SpaceAfterCertainKeywords", [113 /* VarKeyword */, 109 /* ThrowKeyword */, 103 /* NewKeyword */, 89 /* DeleteKeyword */, 105 /* ReturnKeyword */, 112 /* TypeOfKeyword */, 133 /* AwaitKeyword */], anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceAfterLetConstInVariableDeclaration", [119 /* LetKeyword */, 85 /* ConstKeyword */], anyToken, [isNonJsxSameLineTokenContext, isStartOfVariableDeclarationList], 4 /* InsertSpace */), + rule("SpaceAfterGetSetInMember", [138 /* GetKeyword */, 152 /* SetKeyword */], 79 /* Identifier */, [isFunctionDeclContext], 4 /* InsertSpace */), + rule("NoSpaceBetweenYieldKeywordAndStar", 126 /* YieldKeyword */, 41 /* AsteriskToken */, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 16 /* DeleteSpace */), + rule("SpaceBetweenYieldOrYieldStarAndOperand", [126 /* YieldKeyword */, 41 /* AsteriskToken */], anyToken, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 4 /* InsertSpace */), + rule("NoSpaceBetweenReturnAndSemicolon", 106 /* ReturnKeyword */, 26 /* SemicolonToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("SpaceAfterCertainKeywords", [114 /* VarKeyword */, 110 /* ThrowKeyword */, 104 /* NewKeyword */, 90 /* DeleteKeyword */, 106 /* ReturnKeyword */, 113 /* TypeOfKeyword */, 134 /* AwaitKeyword */], anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceAfterLetConstInVariableDeclaration", [120 /* LetKeyword */, 86 /* ConstKeyword */], anyToken, [isNonJsxSameLineTokenContext, isStartOfVariableDeclarationList], 4 /* InsertSpace */), rule("NoSpaceBeforeOpenParenInFuncCall", anyToken, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isFunctionCallOrNewContext, isPreviousTokenNotComma], 16 /* DeleteSpace */), // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. rule("SpaceBeforeBinaryKeywordOperator", anyToken, binaryKeywordOperators, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), rule("SpaceAfterBinaryKeywordOperator", binaryKeywordOperators, anyToken, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterVoidOperator", 114 /* VoidKeyword */, anyToken, [isNonJsxSameLineTokenContext, isVoidOpContext], 4 /* InsertSpace */), + rule("SpaceAfterVoidOperator", 115 /* VoidKeyword */, anyToken, [isNonJsxSameLineTokenContext, isVoidOpContext], 4 /* InsertSpace */), // Async-await - rule("SpaceBetweenAsyncAndOpenParen", 132 /* AsyncKeyword */, 20 /* OpenParenToken */, [isArrowFunctionContext, isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBetweenAsyncAndFunctionKeyword", 132 /* AsyncKeyword */, [98 /* FunctionKeyword */, 79 /* Identifier */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenAsyncAndOpenParen", 133 /* AsyncKeyword */, 20 /* OpenParenToken */, [isArrowFunctionContext, isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenAsyncAndFunctionKeyword", 133 /* AsyncKeyword */, [99 /* FunctionKeyword */, 79 /* Identifier */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), // Template string rule("NoSpaceBetweenTagAndTemplateString", [79 /* Identifier */, 21 /* CloseParenToken */], [14 /* NoSubstitutionTemplateLiteral */, 15 /* TemplateHead */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // JSX opening elements @@ -165228,35 +165297,35 @@ rule("NoSpaceAfterEqualInJsxAttribute", 63 /* EqualsToken */, anyToken, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // TypeScript-specific rules // Use of module as a function call. e.g.: import m2 = module("m2"); - rule("NoSpaceAfterModuleImport", [142 /* ModuleKeyword */, 147 /* RequireKeyword */], 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterModuleImport", [143 /* ModuleKeyword */, 148 /* RequireKeyword */], 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // Add a space around certain TypeScript keywords rule( "SpaceAfterCertainTypeScriptKeywords", [ - 126 /* AbstractKeyword */, - 127 /* AccessorKeyword */, - 84 /* ClassKeyword */, - 136 /* DeclareKeyword */, - 88 /* DefaultKeyword */, - 92 /* EnumKeyword */, - 93 /* ExportKeyword */, - 94 /* ExtendsKeyword */, - 137 /* GetKeyword */, - 117 /* ImplementsKeyword */, - 100 /* ImportKeyword */, - 118 /* InterfaceKeyword */, - 142 /* ModuleKeyword */, - 143 /* NamespaceKeyword */, - 121 /* PrivateKeyword */, - 123 /* PublicKeyword */, - 122 /* ProtectedKeyword */, - 146 /* ReadonlyKeyword */, - 151 /* SetKeyword */, - 124 /* StaticKeyword */, - 154 /* TypeKeyword */, - 158 /* FromKeyword */, - 141 /* KeyOfKeyword */, - 138 /* InferKeyword */ + 127 /* AbstractKeyword */, + 128 /* AccessorKeyword */, + 85 /* ClassKeyword */, + 137 /* DeclareKeyword */, + 89 /* DefaultKeyword */, + 93 /* EnumKeyword */, + 94 /* ExportKeyword */, + 95 /* ExtendsKeyword */, + 138 /* GetKeyword */, + 118 /* ImplementsKeyword */, + 101 /* ImportKeyword */, + 119 /* InterfaceKeyword */, + 143 /* ModuleKeyword */, + 144 /* NamespaceKeyword */, + 122 /* PrivateKeyword */, + 124 /* PublicKeyword */, + 123 /* ProtectedKeyword */, + 147 /* ReadonlyKeyword */, + 152 /* SetKeyword */, + 125 /* StaticKeyword */, + 155 /* TypeKeyword */, + 159 /* FromKeyword */, + 142 /* KeyOfKeyword */, + 139 /* InferKeyword */ ], anyToken, [isNonJsxSameLineTokenContext], @@ -165265,7 +165334,7 @@ rule( "SpaceBeforeCertainTypeScriptKeywords", anyToken, - [94 /* ExtendsKeyword */, 117 /* ImplementsKeyword */, 158 /* FromKeyword */], + [95 /* ExtendsKeyword */, 118 /* ImplementsKeyword */, 159 /* FromKeyword */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */ ), @@ -165298,17 +165367,17 @@ "SpaceAfterDecorator", anyToken, [ - 126 /* AbstractKeyword */, + 127 /* AbstractKeyword */, 79 /* Identifier */, - 93 /* ExportKeyword */, - 88 /* DefaultKeyword */, - 84 /* ClassKeyword */, - 124 /* StaticKeyword */, - 123 /* PublicKeyword */, - 121 /* PrivateKeyword */, - 122 /* ProtectedKeyword */, - 137 /* GetKeyword */, - 151 /* SetKeyword */, + 94 /* ExportKeyword */, + 89 /* DefaultKeyword */, + 85 /* ClassKeyword */, + 125 /* StaticKeyword */, + 124 /* PublicKeyword */, + 122 /* PrivateKeyword */, + 123 /* ProtectedKeyword */, + 138 /* GetKeyword */, + 152 /* SetKeyword */, 22 /* OpenBracketToken */, 41 /* AsteriskToken */ ], @@ -165316,18 +165385,18 @@ 4 /* InsertSpace */ ), rule("NoSpaceBeforeNonNullAssertionOperator", anyToken, 53 /* ExclamationToken */, [isNonJsxSameLineTokenContext, isNonNullAssertionContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterNewKeywordOnConstructorSignature", 103 /* NewKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isConstructorSignatureContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterNewKeywordOnConstructorSignature", 104 /* NewKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isConstructorSignatureContext], 16 /* DeleteSpace */), rule("SpaceLessThanAndNonJSXTypeAnnotation", 29 /* LessThanToken */, 29 /* LessThanToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) ]; const userConfigurableRules = [ // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - rule("SpaceAfterConstructor", 135 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("NoSpaceAfterConstructor", 135 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("SpaceAfterConstructor", 136 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("NoSpaceAfterConstructor", 136 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen], 4 /* InsertSpace */), rule("NoSpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext], 16 /* DeleteSpace */), // Insert space after function keyword for anonymous functions - rule("SpaceAfterAnonymousFunctionKeyword", [98 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), - rule("NoSpaceAfterAnonymousFunctionKeyword", [98 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 16 /* DeleteSpace */), + rule("SpaceAfterAnonymousFunctionKeyword", [99 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), + rule("NoSpaceAfterAnonymousFunctionKeyword", [99 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 16 /* DeleteSpace */), // Insert space after keywords in control flow statements rule("SpaceAfterKeywordInControl", keywords, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterKeywordsInControlFlowStatements"), isControlDeclContext], 4 /* InsertSpace */), rule("NoSpaceAfterKeywordInControl", keywords, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterKeywordsInControlFlowStatements"), isControlDeclContext], 16 /* DeleteSpace */), @@ -165395,22 +165464,22 @@ rule("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock", typeScriptOpenBraceLeftTokenRange, 18 /* OpenBraceToken */, [isOptionDisabledOrUndefinedOrTokensOnSameLine("placeOpenBraceOnNewLineForFunctions"), isTypeScriptDeclWithBlockContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */), rule("NoSpaceBeforeComma", anyToken, 27 /* CommaToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // No space before and after indexer `x[]` - rule("NoSpaceBeforeOpenBracket", anyTokenExcept(132 /* AsyncKeyword */, 82 /* CaseKeyword */), 22 /* OpenBracketToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceBeforeOpenBracket", anyTokenExcept(133 /* AsyncKeyword */, 83 /* CaseKeyword */), 22 /* OpenBracketToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceAfterCloseBracket", 23 /* CloseBracketToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBeforeBlockInFunctionDeclarationContext], 16 /* DeleteSpace */), rule("SpaceAfterSemicolon", 26 /* SemicolonToken */, anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), // Remove extra space between for and await - rule("SpaceBetweenForAndAwaitKeyword", 97 /* ForKeyword */, 133 /* AwaitKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenForAndAwaitKeyword", 98 /* ForKeyword */, 134 /* AwaitKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] rule( "SpaceBetweenStatements", - [21 /* CloseParenToken */, 90 /* DoKeyword */, 91 /* ElseKeyword */, 82 /* CaseKeyword */], + [21 /* CloseParenToken */, 91 /* DoKeyword */, 92 /* ElseKeyword */, 83 /* CaseKeyword */], anyToken, [isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNotForContext], 4 /* InsertSpace */ ), // This low-pri rule takes care of "try {", "catch {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - rule("SpaceAfterTryCatchFinally", [111 /* TryKeyword */, 83 /* CatchKeyword */, 96 /* FinallyKeyword */], 18 /* OpenBraceToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) + rule("SpaceAfterTryCatchFinally", [112 /* TryKeyword */, 84 /* CatchKeyword */, 97 /* FinallyKeyword */], 18 /* OpenBraceToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) ]; return [ ...highPriorityCommonRules, @@ -165455,40 +165524,40 @@ return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; } function isForContext(context) { - return context.contextNode.kind === 245 /* ForStatement */; + return context.contextNode.kind === 246 /* ForStatement */; } function isNotForContext(context) { return !isForContext(context); } function isBinaryOpContext(context) { switch (context.contextNode.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return context.contextNode.operatorToken.kind !== 27 /* CommaToken */; - case 224 /* ConditionalExpression */: - case 191 /* ConditionalType */: - case 231 /* AsExpression */: - case 278 /* ExportSpecifier */: - case 273 /* ImportSpecifier */: - case 179 /* TypePredicate */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 235 /* SatisfiesExpression */: + case 225 /* ConditionalExpression */: + case 192 /* ConditionalType */: + case 232 /* AsExpression */: + case 279 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 180 /* TypePredicate */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 236 /* SatisfiesExpression */: return true; - case 205 /* BindingElement */: - case 262 /* TypeAliasDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 274 /* ExportAssignment */: - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 302 /* EnumMember */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 206 /* BindingElement */: + case 263 /* TypeAliasDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 275 /* ExportAssignment */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 303 /* EnumMember */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 246 /* ForInStatement */: - case 165 /* TypeParameter */: - return context.currentTokenSpan.kind === 101 /* InKeyword */ || context.nextTokenSpan.kind === 101 /* InKeyword */ || context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 247 /* ForOfStatement */: - return context.currentTokenSpan.kind === 162 /* OfKeyword */ || context.nextTokenSpan.kind === 162 /* OfKeyword */; + case 247 /* ForInStatement */: + case 166 /* TypeParameter */: + return context.currentTokenSpan.kind === 102 /* InKeyword */ || context.nextTokenSpan.kind === 102 /* InKeyword */ || context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; + case 248 /* ForOfStatement */: + return context.currentTokenSpan.kind === 163 /* OfKeyword */ || context.nextTokenSpan.kind === 163 /* OfKeyword */; } return false; } @@ -165500,16 +165569,16 @@ } function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; - return contextKind === 169 /* PropertyDeclaration */ || contextKind === 168 /* PropertySignature */ || contextKind === 166 /* Parameter */ || contextKind === 257 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); + return contextKind === 170 /* PropertyDeclaration */ || contextKind === 169 /* PropertySignature */ || contextKind === 167 /* Parameter */ || contextKind === 258 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } function isConditionalOperatorContext(context) { - return context.contextNode.kind === 224 /* ConditionalExpression */ || context.contextNode.kind === 191 /* ConditionalType */; + return context.contextNode.kind === 225 /* ConditionalExpression */ || context.contextNode.kind === 192 /* ConditionalType */; } function isSameLineTokenOrBeforeBlockContext(context) { return context.TokensAreOnSameLine() || isBeforeBlockContext(context); } function isBraceWrappedContext(context) { - return context.contextNode.kind === 203 /* ObjectBindingPattern */ || context.contextNode.kind === 197 /* MappedType */ || isSingleLineBlockContext(context); + return context.contextNode.kind === 204 /* ObjectBindingPattern */ || context.contextNode.kind === 198 /* MappedType */ || isSingleLineBlockContext(context); } function isBeforeMultilineBlockContext(context) { return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -165531,26 +165600,26 @@ return true; } switch (node.kind) { - case 238 /* Block */: - case 266 /* CaseBlock */: - case 207 /* ObjectLiteralExpression */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 208 /* ObjectLiteralExpression */: + case 266 /* ModuleBlock */: return true; } return false; } function isFunctionDeclContext(context) { switch (context.contextNode.kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 176 /* CallSignature */: - case 215 /* FunctionExpression */: - case 173 /* Constructor */: - case 216 /* ArrowFunction */: - case 261 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 177 /* CallSignature */: + case 216 /* FunctionExpression */: + case 174 /* Constructor */: + case 217 /* ArrowFunction */: + case 262 /* InterfaceDeclaration */: return true; } return false; @@ -165559,39 +165628,39 @@ return !isFunctionDeclContext(context); } function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 259 /* FunctionDeclaration */ || context.contextNode.kind === 215 /* FunctionExpression */; + return context.contextNode.kind === 260 /* FunctionDeclaration */ || context.contextNode.kind === 216 /* FunctionExpression */; } function isTypeScriptDeclWithBlockContext(context) { return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); } function nodeIsTypeScriptDeclWithBlockContext(node) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 184 /* TypeLiteral */: - case 264 /* ModuleDeclaration */: - case 275 /* ExportDeclaration */: - case 276 /* NamedExports */: - case 269 /* ImportDeclaration */: - case 272 /* NamedImports */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 185 /* TypeLiteral */: + case 265 /* ModuleDeclaration */: + case 276 /* ExportDeclaration */: + case 277 /* NamedExports */: + case 270 /* ImportDeclaration */: + case 273 /* NamedImports */: return true; } return false; } function isAfterCodeBlockContext(context) { switch (context.currentTokenParent.kind) { - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 295 /* CatchClause */: - case 265 /* ModuleBlock */: - case 252 /* SwitchStatement */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 296 /* CatchClause */: + case 266 /* ModuleBlock */: + case 253 /* SwitchStatement */: return true; - case 238 /* Block */: { + case 239 /* Block */: { const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 216 /* ArrowFunction */ && blockParent.kind !== 215 /* FunctionExpression */) { + if (!blockParent || blockParent.kind !== 217 /* ArrowFunction */ && blockParent.kind !== 216 /* FunctionExpression */) { return true; } } @@ -165600,29 +165669,29 @@ } function isControlDeclContext(context) { switch (context.contextNode.kind) { - case 242 /* IfStatement */: - case 252 /* SwitchStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 244 /* WhileStatement */: - case 255 /* TryStatement */: - case 243 /* DoStatement */: - case 251 /* WithStatement */: - case 295 /* CatchClause */: + case 243 /* IfStatement */: + case 253 /* SwitchStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 245 /* WhileStatement */: + case 256 /* TryStatement */: + case 244 /* DoStatement */: + case 252 /* WithStatement */: + case 296 /* CatchClause */: return true; default: return false; } } function isObjectContext(context) { - return context.contextNode.kind === 207 /* ObjectLiteralExpression */; + return context.contextNode.kind === 208 /* ObjectLiteralExpression */; } function isFunctionCallContext(context) { - return context.contextNode.kind === 210 /* CallExpression */; + return context.contextNode.kind === 211 /* CallExpression */; } function isNewContext(context) { - return context.contextNode.kind === 211 /* NewExpression */; + return context.contextNode.kind === 212 /* NewExpression */; } function isFunctionCallOrNewContext(context) { return isFunctionCallContext(context) || isNewContext(context); @@ -165637,10 +165706,10 @@ return context.nextTokenSpan.kind !== 21 /* CloseParenToken */; } function isArrowFunctionContext(context) { - return context.contextNode.kind === 216 /* ArrowFunction */; + return context.contextNode.kind === 217 /* ArrowFunction */; } function isImportTypeContext(context) { - return context.contextNode.kind === 202 /* ImportType */; + return context.contextNode.kind === 203 /* ImportType */; } function isNonJsxSameLineTokenContext(context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 11 /* JsxText */; @@ -165649,19 +165718,19 @@ return context.contextNode.kind !== 11 /* JsxText */; } function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 281 /* JsxElement */ && context.contextNode.kind !== 285 /* JsxFragment */; + return context.contextNode.kind !== 282 /* JsxElement */ && context.contextNode.kind !== 286 /* JsxFragment */; } function isJsxExpressionContext(context) { - return context.contextNode.kind === 291 /* JsxExpression */ || context.contextNode.kind === 290 /* JsxSpreadAttribute */; + return context.contextNode.kind === 292 /* JsxExpression */ || context.contextNode.kind === 291 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 288 /* JsxAttribute */; + return context.nextTokenParent.kind === 289 /* JsxAttribute */; } function isJsxAttributeContext(context) { - return context.contextNode.kind === 288 /* JsxAttribute */; + return context.contextNode.kind === 289 /* JsxAttribute */; } function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 282 /* JsxSelfClosingElement */; + return context.contextNode.kind === 283 /* JsxSelfClosingElement */; } function isNotBeforeBlockInFunctionDeclarationContext(context) { return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); @@ -165673,44 +165742,44 @@ while (node && isExpression(node)) { node = node.parent; } - return node && node.kind === 167 /* Decorator */; + return node && node.kind === 168 /* Decorator */; } function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 258 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; + return context.currentTokenParent.kind === 259 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; } function isNotFormatOnEnter(context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; } function isModuleDeclContext(context) { - return context.contextNode.kind === 264 /* ModuleDeclaration */; + return context.contextNode.kind === 265 /* ModuleDeclaration */; } function isObjectTypeContext(context) { - return context.contextNode.kind === 184 /* TypeLiteral */; + return context.contextNode.kind === 185 /* TypeLiteral */; } function isConstructorSignatureContext(context) { - return context.contextNode.kind === 177 /* ConstructSignature */; + return context.contextNode.kind === 178 /* ConstructSignature */; } function isTypeArgumentOrParameterOrAssertion(token, parent2) { if (token.kind !== 29 /* LessThanToken */ && token.kind !== 31 /* GreaterThanToken */) { return false; } switch (parent2.kind) { - case 180 /* TypeReference */: - case 213 /* TypeAssertionExpression */: - case 262 /* TypeAliasDeclaration */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 230 /* ExpressionWithTypeArguments */: + case 181 /* TypeReference */: + case 214 /* TypeAssertionExpression */: + case 263 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 231 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -165720,31 +165789,31 @@ return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); } function isTypeAssertionContext(context) { - return context.contextNode.kind === 213 /* TypeAssertionExpression */; + return context.contextNode.kind === 214 /* TypeAssertionExpression */; } function isNonTypeAssertionContext(context) { return !isTypeAssertionContext(context); } function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 114 /* VoidKeyword */ && context.currentTokenParent.kind === 219 /* VoidExpression */; + return context.currentTokenSpan.kind === 115 /* VoidKeyword */ && context.currentTokenParent.kind === 220 /* VoidExpression */; } function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 226 /* YieldExpression */ && context.contextNode.expression !== void 0; + return context.contextNode.kind === 227 /* YieldExpression */ && context.contextNode.expression !== void 0; } function isNonNullAssertionContext(context) { - return context.contextNode.kind === 232 /* NonNullExpression */; + return context.contextNode.kind === 233 /* NonNullExpression */; } function isNotStatementConditionContext(context) { return !isStatementConditionContext(context); } function isStatementConditionContext(context) { switch (context.contextNode.kind) { - case 242 /* IfStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 243 /* IfStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return true; default: return false; @@ -165770,16 +165839,16 @@ if (startLine === endLine) { return nextTokenKind === 19 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; } - if (nextTokenKind === 237 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { + if (nextTokenKind === 238 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { return false; } - if (context.contextNode.kind === 261 /* InterfaceDeclaration */ || context.contextNode.kind === 262 /* TypeAliasDeclaration */) { + if (context.contextNode.kind === 262 /* InterfaceDeclaration */ || context.contextNode.kind === 263 /* TypeAliasDeclaration */) { return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 20 /* OpenParenToken */; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; } - return context.currentTokenParent.kind !== 245 /* ForStatement */ && context.currentTokenParent.kind !== 239 /* EmptyStatement */ && context.currentTokenParent.kind !== 237 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 225 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; + return context.currentTokenParent.kind !== 246 /* ForStatement */ && context.currentTokenParent.kind !== 240 /* EmptyStatement */ && context.currentTokenParent.kind !== 238 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 226 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; } function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); @@ -165860,7 +165929,7 @@ return map2; } function getRuleBucketIndex(row, column) { - Debug.assert(row <= 162 /* LastKeyword */ && column <= 162 /* LastKeyword */, "Must compute formatting context from tokens"); + Debug.assert(row <= 163 /* LastKeyword */ && column <= 163 /* LastKeyword */, "Must compute formatting context from tokens"); return row * mapRowLength + column; } function addRule(rules, rule2, specificTokens, constructionState, rulesBucketIndex) { @@ -165890,7 +165959,7 @@ init_ts_formatting(); maskBitSize = 5; mask = 31; - mapRowLength = 162 /* LastToken */ + 1; + mapRowLength = 163 /* LastToken */ + 1; RulesPosition = ((RulesPosition2) => { RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; @@ -165982,17 +166051,17 @@ } function isListElement(parent2, node) { switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: return rangeContainsRange(parent2.members, node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const body = parent2.body; - return !!body && body.kind === 265 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 308 /* SourceFile */: - case 238 /* Block */: - case 265 /* ModuleBlock */: + return !!body && body.kind === 266 /* ModuleBlock */ && rangeContainsRange(body.statements, node); + case 309 /* SourceFile */: + case 239 /* Block */: + case 266 /* ModuleBlock */: return rangeContainsRange(parent2.statements, node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return rangeContainsRange(parent2.block.statements, node); } return false; @@ -166164,7 +166233,7 @@ } } } - if (previousRange && formattingScanner.getStartPos() >= originalRange.end) { + if (previousRange && formattingScanner.getTokenFullStart() >= originalRange.end) { const tokenInfo = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() : formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token : void 0; if (tokenInfo && tokenInfo.pos === previousRangeTriviaEnd) { const parent2 = ((_a2 = findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)) == null ? void 0 : _a2.parent) || previousParent; @@ -166224,24 +166293,24 @@ return modifier.kind; } switch (node.kind) { - case 260 /* ClassDeclaration */: - return 84 /* ClassKeyword */; - case 261 /* InterfaceDeclaration */: - return 118 /* InterfaceKeyword */; - case 259 /* FunctionDeclaration */: - return 98 /* FunctionKeyword */; - case 263 /* EnumDeclaration */: - return 263 /* EnumDeclaration */; - case 174 /* GetAccessor */: - return 137 /* GetKeyword */; - case 175 /* SetAccessor */: - return 151 /* SetKeyword */; - case 171 /* MethodDeclaration */: + case 261 /* ClassDeclaration */: + return 85 /* ClassKeyword */; + case 262 /* InterfaceDeclaration */: + return 119 /* InterfaceKeyword */; + case 260 /* FunctionDeclaration */: + return 99 /* FunctionKeyword */; + case 264 /* EnumDeclaration */: + return 264 /* EnumDeclaration */; + case 175 /* GetAccessor */: + return 138 /* GetKeyword */; + case 176 /* SetAccessor */: + return 152 /* SetKeyword */; + case 172 /* MethodDeclaration */: if (node.asteriskToken) { return 41 /* AsteriskToken */; } - case 169 /* PropertyDeclaration */: - case 166 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 167 /* Parameter */: const name = getNameOfDeclaration(node); if (name) { return name.kind; @@ -166284,22 +166353,22 @@ case 18 /* OpenBraceToken */: case 19 /* CloseBraceToken */: case 21 /* CloseParenToken */: - case 91 /* ElseKeyword */: - case 115 /* WhileKeyword */: + case 92 /* ElseKeyword */: + case 116 /* WhileKeyword */: case 59 /* AtToken */: return false; case 43 /* SlashToken */: case 31 /* GreaterThanToken */: switch (container.kind) { - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: + case 283 /* JsxSelfClosingElement */: return false; } break; case 22 /* OpenBracketToken */: case 23 /* CloseBracketToken */: - if (container.kind !== 197 /* MappedType */) { + if (container.kind !== 198 /* MappedType */) { return false; } break; @@ -166342,7 +166411,7 @@ processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); } ); - while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { const tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > Math.min(node.end, originalRange.end)) { break; @@ -166376,7 +166445,7 @@ if (child.getFullWidth() === 0) { return inheritedIndentation; } - while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { const tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > originalRange.end) { return inheritedIndentation; @@ -166389,7 +166458,7 @@ } consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node); } - if (!formattingScanner.isOnToken() || formattingScanner.getStartPos() >= originalRange.end) { + if (!formattingScanner.isOnToken() || formattingScanner.getTokenFullStart() >= originalRange.end) { return inheritedIndentation; } if (isToken(child)) { @@ -166400,11 +166469,11 @@ return inheritedIndentation; } } - const effectiveParentStartLine = child.kind === 167 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + const effectiveParentStartLine = child.kind === 168 /* Decorator */ ? childStartLine : undecoratedParentStartLine; const childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent2.kind === 206 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent2.kind === 207 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -166422,7 +166491,7 @@ return; } if (listStartToken !== 0 /* Unknown */) { - while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { const tokenInfo = formattingScanner.readTokenInfo(parent2); if (tokenInfo.token.end > nodes.pos) { break; @@ -166459,7 +166528,7 @@ ); } const listEndToken = getCloseTokenForOpenToken(listStartToken); - if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { let tokenInfo = formattingScanner.readTokenInfo(parent2); if (tokenInfo.token.kind === 27 /* CommaToken */) { consumeTokenAndAdvanceScanner(tokenInfo, parent2, listDynamicIndentation, parent2); @@ -166825,50 +166894,50 @@ } function getOpenTokenForList(node, list) { switch (node.kind) { - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 216 /* ArrowFunction */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 217 /* ArrowFunction */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } else if (node.parameters === list) { return 20 /* OpenParenToken */; } break; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } else if (node.arguments === list) { return 20 /* OpenParenToken */; } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } break; - case 180 /* TypeReference */: - case 212 /* TaggedTemplateExpression */: - case 183 /* TypeQuery */: - case 230 /* ExpressionWithTypeArguments */: - case 202 /* ImportType */: + case 181 /* TypeReference */: + case 213 /* TaggedTemplateExpression */: + case 184 /* TypeQuery */: + case 231 /* ExpressionWithTypeArguments */: + case 203 /* ImportType */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } break; - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return 18 /* OpenBraceToken */; } return 0 /* Unknown */; @@ -166968,11 +167037,11 @@ } const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 207 /* ObjectLiteralExpression */; + const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 208 /* ObjectLiteralExpression */; if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { return getBlockIndent(sourceFile, position, options); } - if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 223 /* BinaryExpression */) { + if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 224 /* BinaryExpression */) { const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { return actualIndentation; @@ -166980,7 +167049,7 @@ } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [215 /* FunctionExpression */, 216 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [216 /* FunctionExpression */, 217 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -167122,7 +167191,7 @@ } } function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 308 /* SourceFile */ || !parentAndChildShareLine); + const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 309 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -167160,8 +167229,8 @@ } SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 242 /* IfStatement */ && parent2.elseStatement === child) { - const elseKeyword = findChildOfKind(parent2, 91 /* ElseKeyword */, sourceFile); + if (parent2.kind === 243 /* IfStatement */ && parent2.elseStatement === child) { + const elseKeyword = findChildOfKind(parent2, 92 /* ElseKeyword */, sourceFile); Debug.assert(elseKeyword !== void 0); const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; @@ -167211,42 +167280,42 @@ } function getListByRange(start, end, node, sourceFile) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return getList(node.typeArguments); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return getList(node.properties); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getList(node.elements); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return getList(node.members); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: return getList(node.typeParameters) || getList(node.parameters); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return getList(node.parameters); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 348 /* JSDocTemplateTag */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 349 /* JSDocTemplateTag */: return getList(node.typeParameters); - case 211 /* NewExpression */: - case 210 /* CallExpression */: + case 212 /* NewExpression */: + case 211 /* CallExpression */: return getList(node.typeArguments) || getList(node.arguments); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return getList(node.declarations); - case 272 /* NamedImports */: - case 276 /* NamedExports */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: return getList(node.elements); - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return getList(node.elements); } function getList(list) { @@ -167269,7 +167338,7 @@ return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); } function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 258 /* VariableDeclarationList */) { + if (node.parent && node.parent.kind === 259 /* VariableDeclarationList */) { return -1 /* Unknown */; } const containingList = getContainingList(node, sourceFile); @@ -167330,95 +167399,95 @@ function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { const childKind = child ? child.kind : 0 /* Unknown */; switch (parent2.kind) { - case 241 /* ExpressionStatement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 206 /* ArrayLiteralExpression */: - case 238 /* Block */: - case 265 /* ModuleBlock */: - case 207 /* ObjectLiteralExpression */: - case 184 /* TypeLiteral */: - case 197 /* MappedType */: - case 186 /* TupleType */: - case 266 /* CaseBlock */: - case 293 /* DefaultClause */: - case 292 /* CaseClause */: - case 214 /* ParenthesizedExpression */: - case 208 /* PropertyAccessExpression */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 240 /* VariableStatement */: - case 274 /* ExportAssignment */: - case 250 /* ReturnStatement */: - case 224 /* ConditionalExpression */: - case 204 /* ArrayBindingPattern */: - case 203 /* ObjectBindingPattern */: - case 283 /* JsxOpeningElement */: - case 286 /* JsxOpeningFragment */: - case 282 /* JsxSelfClosingElement */: - case 291 /* JsxExpression */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 166 /* Parameter */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 193 /* ParenthesizedType */: - case 212 /* TaggedTemplateExpression */: - case 220 /* AwaitExpression */: - case 276 /* NamedExports */: - case 272 /* NamedImports */: - case 278 /* ExportSpecifier */: - case 273 /* ImportSpecifier */: - case 169 /* PropertyDeclaration */: + case 242 /* ExpressionStatement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 207 /* ArrayLiteralExpression */: + case 239 /* Block */: + case 266 /* ModuleBlock */: + case 208 /* ObjectLiteralExpression */: + case 185 /* TypeLiteral */: + case 198 /* MappedType */: + case 187 /* TupleType */: + case 267 /* CaseBlock */: + case 294 /* DefaultClause */: + case 293 /* CaseClause */: + case 215 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 241 /* VariableStatement */: + case 275 /* ExportAssignment */: + case 251 /* ReturnStatement */: + case 225 /* ConditionalExpression */: + case 205 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 284 /* JsxOpeningElement */: + case 287 /* JsxOpeningFragment */: + case 283 /* JsxSelfClosingElement */: + case 292 /* JsxExpression */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 167 /* Parameter */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 194 /* ParenthesizedType */: + case 213 /* TaggedTemplateExpression */: + case 221 /* AwaitExpression */: + case 277 /* NamedExports */: + case 273 /* NamedImports */: + case 279 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 170 /* PropertyDeclaration */: return true; - case 257 /* VariableDeclaration */: - case 299 /* PropertyAssignment */: - case 223 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 207 /* ObjectLiteralExpression */) { + case 258 /* VariableDeclaration */: + case 300 /* PropertyAssignment */: + case 224 /* BinaryExpression */: + if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 208 /* ObjectLiteralExpression */) { return rangeIsOnOneLine(sourceFile, child); } - if (parent2.kind === 223 /* BinaryExpression */ && sourceFile && child && childKind === 281 /* JsxElement */) { + if (parent2.kind === 224 /* BinaryExpression */ && sourceFile && child && childKind === 282 /* JsxElement */) { const parentStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, parent2.pos)).line; const childStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, child.pos)).line; return parentStartLine !== childStartLine; } - if (parent2.kind !== 223 /* BinaryExpression */) { + if (parent2.kind !== 224 /* BinaryExpression */) { return true; } break; - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 242 /* IfStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - return childKind !== 238 /* Block */; - case 216 /* ArrowFunction */: - if (sourceFile && childKind === 214 /* ParenthesizedExpression */) { + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 243 /* IfStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + return childKind !== 239 /* Block */; + case 217 /* ArrowFunction */: + if (sourceFile && childKind === 215 /* ParenthesizedExpression */) { return rangeIsOnOneLine(sourceFile, child); } - return childKind !== 238 /* Block */; - case 275 /* ExportDeclaration */: - return childKind !== 276 /* NamedExports */; - case 269 /* ImportDeclaration */: - return childKind !== 270 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 272 /* NamedImports */; - case 281 /* JsxElement */: - return childKind !== 284 /* JsxClosingElement */; - case 285 /* JsxFragment */: - return childKind !== 287 /* JsxClosingFragment */; - case 190 /* IntersectionType */: - case 189 /* UnionType */: - if (childKind === 184 /* TypeLiteral */ || childKind === 186 /* TupleType */) { + return childKind !== 239 /* Block */; + case 276 /* ExportDeclaration */: + return childKind !== 277 /* NamedExports */; + case 270 /* ImportDeclaration */: + return childKind !== 271 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 273 /* NamedImports */; + case 282 /* JsxElement */: + return childKind !== 285 /* JsxClosingElement */; + case 286 /* JsxFragment */: + return childKind !== 288 /* JsxClosingFragment */; + case 191 /* IntersectionType */: + case 190 /* UnionType */: + if (childKind === 185 /* TypeLiteral */ || childKind === 187 /* TupleType */) { return false; } break; @@ -167428,11 +167497,11 @@ SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; function isControlFlowEndingStatement(kind, parent2) { switch (kind) { - case 250 /* ReturnStatement */: - case 254 /* ThrowStatement */: - case 248 /* ContinueStatement */: - case 249 /* BreakStatement */: - return parent2.kind !== 238 /* Block */; + case 251 /* ReturnStatement */: + case 255 /* ThrowStatement */: + case 249 /* ContinueStatement */: + case 250 /* BreakStatement */: + return parent2.kind !== 239 /* Block */; default: return false; } @@ -176266,7 +176335,7 @@ } const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); const symbol = program.getTypeChecker().getSymbolAtLocation(initialNode); - const importSpecifier = symbol && getDeclarationOfKind(symbol, 273 /* ImportSpecifier */); + const importSpecifier = symbol && getDeclarationOfKind(symbol, 274 /* ImportSpecifier */); if (!importSpecifier) return void 0; const nameToSearch = ((_a3 = importSpecifier.propertyName) == null ? void 0 : _a3.text) || importSpecifier.name.text; @@ -178584,7 +178653,6 @@ ContextFlags: () => ContextFlags, CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, - DeprecationVersion: () => DeprecationVersion, DiagnosticCategory: () => DiagnosticCategory, Diagnostics: () => Diagnostics, DocumentHighlights: () => DocumentHighlights, @@ -180942,7 +181010,6 @@ ContextFlags: () => ContextFlags, CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, - DeprecationVersion: () => DeprecationVersion, DiagnosticCategory: () => DiagnosticCategory, Diagnostics: () => Diagnostics, DocumentHighlights: () => DocumentHighlights, diff --recursive --unified --new-file --exclude test --exclude Makefile 5.1.0-dev.20230307/lib/typescript.d.ts 5.1.0-dev.20230308/lib/typescript.d.ts --- 5.1.0-dev.20230307/lib/typescript.d.ts 1985-10-26 09:15:00 +++ 5.1.0-dev.20230308/lib/typescript.d.ts 1985-10-26 09:15:00 @@ -126,305 +126,305 @@ CaretEqualsToken = 78, Identifier = 79, PrivateIdentifier = 80, - BreakKeyword = 81, - CaseKeyword = 82, - CatchKeyword = 83, - ClassKeyword = 84, - ConstKeyword = 85, - ContinueKeyword = 86, - DebuggerKeyword = 87, - DefaultKeyword = 88, - DeleteKeyword = 89, - DoKeyword = 90, - ElseKeyword = 91, - EnumKeyword = 92, - ExportKeyword = 93, - ExtendsKeyword = 94, - FalseKeyword = 95, - FinallyKeyword = 96, - ForKeyword = 97, - FunctionKeyword = 98, - IfKeyword = 99, - ImportKeyword = 100, - InKeyword = 101, - InstanceOfKeyword = 102, - NewKeyword = 103, - NullKeyword = 104, - ReturnKeyword = 105, - SuperKeyword = 106, - SwitchKeyword = 107, - ThisKeyword = 108, - ThrowKeyword = 109, - TrueKeyword = 110, - TryKeyword = 111, - TypeOfKeyword = 112, - VarKeyword = 113, - VoidKeyword = 114, - WhileKeyword = 115, - WithKeyword = 116, - ImplementsKeyword = 117, - InterfaceKeyword = 118, - LetKeyword = 119, - PackageKeyword = 120, - PrivateKeyword = 121, - ProtectedKeyword = 122, - PublicKeyword = 123, - StaticKeyword = 124, - YieldKeyword = 125, - AbstractKeyword = 126, - AccessorKeyword = 127, - AsKeyword = 128, - AssertsKeyword = 129, - AssertKeyword = 130, - AnyKeyword = 131, - AsyncKeyword = 132, - AwaitKeyword = 133, - BooleanKeyword = 134, - ConstructorKeyword = 135, - DeclareKeyword = 136, - GetKeyword = 137, - InferKeyword = 138, - IntrinsicKeyword = 139, - IsKeyword = 140, - KeyOfKeyword = 141, - ModuleKeyword = 142, - NamespaceKeyword = 143, - NeverKeyword = 144, - OutKeyword = 145, - ReadonlyKeyword = 146, - RequireKeyword = 147, - NumberKeyword = 148, - ObjectKeyword = 149, - SatisfiesKeyword = 150, - SetKeyword = 151, - StringKeyword = 152, - SymbolKeyword = 153, - TypeKeyword = 154, - UndefinedKeyword = 155, - UniqueKeyword = 156, - UnknownKeyword = 157, - FromKeyword = 158, - GlobalKeyword = 159, - BigIntKeyword = 160, - OverrideKeyword = 161, - OfKeyword = 162, - QualifiedName = 163, - ComputedPropertyName = 164, - TypeParameter = 165, - Parameter = 166, - Decorator = 167, - PropertySignature = 168, - PropertyDeclaration = 169, - MethodSignature = 170, - MethodDeclaration = 171, - ClassStaticBlockDeclaration = 172, - Constructor = 173, - GetAccessor = 174, - SetAccessor = 175, - CallSignature = 176, - ConstructSignature = 177, - IndexSignature = 178, - TypePredicate = 179, - TypeReference = 180, - FunctionType = 181, - ConstructorType = 182, - TypeQuery = 183, - TypeLiteral = 184, - ArrayType = 185, - TupleType = 186, - OptionalType = 187, - RestType = 188, - UnionType = 189, - IntersectionType = 190, - ConditionalType = 191, - InferType = 192, - ParenthesizedType = 193, - ThisType = 194, - TypeOperator = 195, - IndexedAccessType = 196, - MappedType = 197, - LiteralType = 198, - NamedTupleMember = 199, - TemplateLiteralType = 200, - TemplateLiteralTypeSpan = 201, - ImportType = 202, - ObjectBindingPattern = 203, - ArrayBindingPattern = 204, - BindingElement = 205, - ArrayLiteralExpression = 206, - ObjectLiteralExpression = 207, - PropertyAccessExpression = 208, - ElementAccessExpression = 209, - CallExpression = 210, - NewExpression = 211, - TaggedTemplateExpression = 212, - TypeAssertionExpression = 213, - ParenthesizedExpression = 214, - FunctionExpression = 215, - ArrowFunction = 216, - DeleteExpression = 217, - TypeOfExpression = 218, - VoidExpression = 219, - AwaitExpression = 220, - PrefixUnaryExpression = 221, - PostfixUnaryExpression = 222, - BinaryExpression = 223, - ConditionalExpression = 224, - TemplateExpression = 225, - YieldExpression = 226, - SpreadElement = 227, - ClassExpression = 228, - OmittedExpression = 229, - ExpressionWithTypeArguments = 230, - AsExpression = 231, - NonNullExpression = 232, - MetaProperty = 233, - SyntheticExpression = 234, - SatisfiesExpression = 235, - TemplateSpan = 236, - SemicolonClassElement = 237, - Block = 238, - EmptyStatement = 239, - VariableStatement = 240, - ExpressionStatement = 241, - IfStatement = 242, - DoStatement = 243, - WhileStatement = 244, - ForStatement = 245, - ForInStatement = 246, - ForOfStatement = 247, - ContinueStatement = 248, - BreakStatement = 249, - ReturnStatement = 250, - WithStatement = 251, - SwitchStatement = 252, - LabeledStatement = 253, - ThrowStatement = 254, - TryStatement = 255, - DebuggerStatement = 256, - VariableDeclaration = 257, - VariableDeclarationList = 258, - FunctionDeclaration = 259, - ClassDeclaration = 260, - InterfaceDeclaration = 261, - TypeAliasDeclaration = 262, - EnumDeclaration = 263, - ModuleDeclaration = 264, - ModuleBlock = 265, - CaseBlock = 266, - NamespaceExportDeclaration = 267, - ImportEqualsDeclaration = 268, - ImportDeclaration = 269, - ImportClause = 270, - NamespaceImport = 271, - NamedImports = 272, - ImportSpecifier = 273, - ExportAssignment = 274, - ExportDeclaration = 275, - NamedExports = 276, - NamespaceExport = 277, - ExportSpecifier = 278, - MissingDeclaration = 279, - ExternalModuleReference = 280, - JsxElement = 281, - JsxSelfClosingElement = 282, - JsxOpeningElement = 283, - JsxClosingElement = 284, - JsxFragment = 285, - JsxOpeningFragment = 286, - JsxClosingFragment = 287, - JsxAttribute = 288, - JsxAttributes = 289, - JsxSpreadAttribute = 290, - JsxExpression = 291, - CaseClause = 292, - DefaultClause = 293, - HeritageClause = 294, - CatchClause = 295, - AssertClause = 296, - AssertEntry = 297, - ImportTypeAssertionContainer = 298, - PropertyAssignment = 299, - ShorthandPropertyAssignment = 300, - SpreadAssignment = 301, - EnumMember = 302, - /** @deprecated */ UnparsedPrologue = 303, - /** @deprecated */ UnparsedPrepend = 304, - /** @deprecated */ UnparsedText = 305, - /** @deprecated */ UnparsedInternalText = 306, - /** @deprecated */ UnparsedSyntheticReference = 307, - SourceFile = 308, - Bundle = 309, - /** @deprecated */ UnparsedSource = 310, - /** @deprecated */ InputFiles = 311, - JSDocTypeExpression = 312, - JSDocNameReference = 313, - JSDocMemberName = 314, - JSDocAllType = 315, - JSDocUnknownType = 316, - JSDocNullableType = 317, - JSDocNonNullableType = 318, - JSDocOptionalType = 319, - JSDocFunctionType = 320, - JSDocVariadicType = 321, - JSDocNamepathType = 322, - JSDoc = 323, + BreakKeyword = 82, + CaseKeyword = 83, + CatchKeyword = 84, + ClassKeyword = 85, + ConstKeyword = 86, + ContinueKeyword = 87, + DebuggerKeyword = 88, + DefaultKeyword = 89, + DeleteKeyword = 90, + DoKeyword = 91, + ElseKeyword = 92, + EnumKeyword = 93, + ExportKeyword = 94, + ExtendsKeyword = 95, + FalseKeyword = 96, + FinallyKeyword = 97, + ForKeyword = 98, + FunctionKeyword = 99, + IfKeyword = 100, + ImportKeyword = 101, + InKeyword = 102, + InstanceOfKeyword = 103, + NewKeyword = 104, + NullKeyword = 105, + ReturnKeyword = 106, + SuperKeyword = 107, + SwitchKeyword = 108, + ThisKeyword = 109, + ThrowKeyword = 110, + TrueKeyword = 111, + TryKeyword = 112, + TypeOfKeyword = 113, + VarKeyword = 114, + VoidKeyword = 115, + WhileKeyword = 116, + WithKeyword = 117, + ImplementsKeyword = 118, + InterfaceKeyword = 119, + LetKeyword = 120, + PackageKeyword = 121, + PrivateKeyword = 122, + ProtectedKeyword = 123, + PublicKeyword = 124, + StaticKeyword = 125, + YieldKeyword = 126, + AbstractKeyword = 127, + AccessorKeyword = 128, + AsKeyword = 129, + AssertsKeyword = 130, + AssertKeyword = 131, + AnyKeyword = 132, + AsyncKeyword = 133, + AwaitKeyword = 134, + BooleanKeyword = 135, + ConstructorKeyword = 136, + DeclareKeyword = 137, + GetKeyword = 138, + InferKeyword = 139, + IntrinsicKeyword = 140, + IsKeyword = 141, + KeyOfKeyword = 142, + ModuleKeyword = 143, + NamespaceKeyword = 144, + NeverKeyword = 145, + OutKeyword = 146, + ReadonlyKeyword = 147, + RequireKeyword = 148, + NumberKeyword = 149, + ObjectKeyword = 150, + SatisfiesKeyword = 151, + SetKeyword = 152, + StringKeyword = 153, + SymbolKeyword = 154, + TypeKeyword = 155, + UndefinedKeyword = 156, + UniqueKeyword = 157, + UnknownKeyword = 158, + FromKeyword = 159, + GlobalKeyword = 160, + BigIntKeyword = 161, + OverrideKeyword = 162, + OfKeyword = 163, + QualifiedName = 164, + ComputedPropertyName = 165, + TypeParameter = 166, + Parameter = 167, + Decorator = 168, + PropertySignature = 169, + PropertyDeclaration = 170, + MethodSignature = 171, + MethodDeclaration = 172, + ClassStaticBlockDeclaration = 173, + Constructor = 174, + GetAccessor = 175, + SetAccessor = 176, + CallSignature = 177, + ConstructSignature = 178, + IndexSignature = 179, + TypePredicate = 180, + TypeReference = 181, + FunctionType = 182, + ConstructorType = 183, + TypeQuery = 184, + TypeLiteral = 185, + ArrayType = 186, + TupleType = 187, + OptionalType = 188, + RestType = 189, + UnionType = 190, + IntersectionType = 191, + ConditionalType = 192, + InferType = 193, + ParenthesizedType = 194, + ThisType = 195, + TypeOperator = 196, + IndexedAccessType = 197, + MappedType = 198, + LiteralType = 199, + NamedTupleMember = 200, + TemplateLiteralType = 201, + TemplateLiteralTypeSpan = 202, + ImportType = 203, + ObjectBindingPattern = 204, + ArrayBindingPattern = 205, + BindingElement = 206, + ArrayLiteralExpression = 207, + ObjectLiteralExpression = 208, + PropertyAccessExpression = 209, + ElementAccessExpression = 210, + CallExpression = 211, + NewExpression = 212, + TaggedTemplateExpression = 213, + TypeAssertionExpression = 214, + ParenthesizedExpression = 215, + FunctionExpression = 216, + ArrowFunction = 217, + DeleteExpression = 218, + TypeOfExpression = 219, + VoidExpression = 220, + AwaitExpression = 221, + PrefixUnaryExpression = 222, + PostfixUnaryExpression = 223, + BinaryExpression = 224, + ConditionalExpression = 225, + TemplateExpression = 226, + YieldExpression = 227, + SpreadElement = 228, + ClassExpression = 229, + OmittedExpression = 230, + ExpressionWithTypeArguments = 231, + AsExpression = 232, + NonNullExpression = 233, + MetaProperty = 234, + SyntheticExpression = 235, + SatisfiesExpression = 236, + TemplateSpan = 237, + SemicolonClassElement = 238, + Block = 239, + EmptyStatement = 240, + VariableStatement = 241, + ExpressionStatement = 242, + IfStatement = 243, + DoStatement = 244, + WhileStatement = 245, + ForStatement = 246, + ForInStatement = 247, + ForOfStatement = 248, + ContinueStatement = 249, + BreakStatement = 250, + ReturnStatement = 251, + WithStatement = 252, + SwitchStatement = 253, + LabeledStatement = 254, + ThrowStatement = 255, + TryStatement = 256, + DebuggerStatement = 257, + VariableDeclaration = 258, + VariableDeclarationList = 259, + FunctionDeclaration = 260, + ClassDeclaration = 261, + InterfaceDeclaration = 262, + TypeAliasDeclaration = 263, + EnumDeclaration = 264, + ModuleDeclaration = 265, + ModuleBlock = 266, + CaseBlock = 267, + NamespaceExportDeclaration = 268, + ImportEqualsDeclaration = 269, + ImportDeclaration = 270, + ImportClause = 271, + NamespaceImport = 272, + NamedImports = 273, + ImportSpecifier = 274, + ExportAssignment = 275, + ExportDeclaration = 276, + NamedExports = 277, + NamespaceExport = 278, + ExportSpecifier = 279, + MissingDeclaration = 280, + ExternalModuleReference = 281, + JsxElement = 282, + JsxSelfClosingElement = 283, + JsxOpeningElement = 284, + JsxClosingElement = 285, + JsxFragment = 286, + JsxOpeningFragment = 287, + JsxClosingFragment = 288, + JsxAttribute = 289, + JsxAttributes = 290, + JsxSpreadAttribute = 291, + JsxExpression = 292, + CaseClause = 293, + DefaultClause = 294, + HeritageClause = 295, + CatchClause = 296, + AssertClause = 297, + AssertEntry = 298, + ImportTypeAssertionContainer = 299, + PropertyAssignment = 300, + ShorthandPropertyAssignment = 301, + SpreadAssignment = 302, + EnumMember = 303, + /** @deprecated */ UnparsedPrologue = 304, + /** @deprecated */ UnparsedPrepend = 305, + /** @deprecated */ UnparsedText = 306, + /** @deprecated */ UnparsedInternalText = 307, + /** @deprecated */ UnparsedSyntheticReference = 308, + SourceFile = 309, + Bundle = 310, + /** @deprecated */ UnparsedSource = 311, + /** @deprecated */ InputFiles = 312, + JSDocTypeExpression = 313, + JSDocNameReference = 314, + JSDocMemberName = 315, + JSDocAllType = 316, + JSDocUnknownType = 317, + JSDocNullableType = 318, + JSDocNonNullableType = 319, + JSDocOptionalType = 320, + JSDocFunctionType = 321, + JSDocVariadicType = 322, + JSDocNamepathType = 323, + JSDoc = 324, /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 323, - JSDocText = 324, - JSDocTypeLiteral = 325, - JSDocSignature = 326, - JSDocLink = 327, - JSDocLinkCode = 328, - JSDocLinkPlain = 329, - JSDocTag = 330, - JSDocAugmentsTag = 331, - JSDocImplementsTag = 332, - JSDocAuthorTag = 333, - JSDocDeprecatedTag = 334, - JSDocClassTag = 335, - JSDocPublicTag = 336, - JSDocPrivateTag = 337, - JSDocProtectedTag = 338, - JSDocReadonlyTag = 339, - JSDocOverrideTag = 340, - JSDocCallbackTag = 341, - JSDocOverloadTag = 342, - JSDocEnumTag = 343, - JSDocParameterTag = 344, - JSDocReturnTag = 345, - JSDocThisTag = 346, - JSDocTypeTag = 347, - JSDocTemplateTag = 348, - JSDocTypedefTag = 349, - JSDocSeeTag = 350, - JSDocPropertyTag = 351, - JSDocThrowsTag = 352, - JSDocSatisfiesTag = 353, - SyntaxList = 354, - NotEmittedStatement = 355, - PartiallyEmittedExpression = 356, - CommaListExpression = 357, - MergeDeclarationMarker = 358, - EndOfDeclarationMarker = 359, - SyntheticReferenceExpression = 360, - Count = 361, + JSDocComment = 324, + JSDocText = 325, + JSDocTypeLiteral = 326, + JSDocSignature = 327, + JSDocLink = 328, + JSDocLinkCode = 329, + JSDocLinkPlain = 330, + JSDocTag = 331, + JSDocAugmentsTag = 332, + JSDocImplementsTag = 333, + JSDocAuthorTag = 334, + JSDocDeprecatedTag = 335, + JSDocClassTag = 336, + JSDocPublicTag = 337, + JSDocPrivateTag = 338, + JSDocProtectedTag = 339, + JSDocReadonlyTag = 340, + JSDocOverrideTag = 341, + JSDocCallbackTag = 342, + JSDocOverloadTag = 343, + JSDocEnumTag = 344, + JSDocParameterTag = 345, + JSDocReturnTag = 346, + JSDocThisTag = 347, + JSDocTypeTag = 348, + JSDocTemplateTag = 349, + JSDocTypedefTag = 350, + JSDocSeeTag = 351, + JSDocPropertyTag = 352, + JSDocThrowsTag = 353, + JSDocSatisfiesTag = 354, + SyntaxList = 355, + NotEmittedStatement = 356, + PartiallyEmittedExpression = 357, + CommaListExpression = 358, + MergeDeclarationMarker = 359, + EndOfDeclarationMarker = 360, + SyntheticReferenceExpression = 361, + Count = 362, FirstAssignment = 63, LastAssignment = 78, FirstCompoundAssignment = 64, LastCompoundAssignment = 78, - FirstReservedWord = 81, - LastReservedWord = 116, - FirstKeyword = 81, - LastKeyword = 162, - FirstFutureReservedWord = 117, - LastFutureReservedWord = 125, - FirstTypeNode = 179, - LastTypeNode = 202, + FirstReservedWord = 82, + LastReservedWord = 117, + FirstKeyword = 82, + LastKeyword = 163, + FirstFutureReservedWord = 118, + LastFutureReservedWord = 126, + FirstTypeNode = 180, + LastTypeNode = 203, FirstPunctuation = 18, LastPunctuation = 78, FirstToken = 0, - LastToken = 162, + LastToken = 163, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -433,13 +433,13 @@ LastTemplateToken = 17, FirstBinaryOperator = 29, LastBinaryOperator = 78, - FirstStatement = 240, - LastStatement = 256, - FirstNode = 163, - FirstJSDocNode = 312, - LastJSDocNode = 353, - FirstJSDocTagNode = 330, - LastJSDocTagNode = 353 + FirstStatement = 241, + LastStatement = 257, + FirstNode = 164, + FirstJSDocNode = 313, + LastJSDocNode = 354, + FirstJSDocTagNode = 331, + LastJSDocTagNode = 354 } type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; @@ -2427,6 +2427,40 @@ getBaseConstraintOfType(type: Type): Type | undefined; getDefaultFromTypeParameter(type: Type): Type | undefined; /** + * Gets the intrinsic `any` type. There are multiple types that act as `any` used internally in the compiler, + * so the type returned by this function should not be used in equality checks to determine if another type + * is `any`. Instead, use `type.flags & TypeFlags.Any`. + */ + getAnyType(): Type; + getStringType(): Type; + getStringLiteralType(value: string): StringLiteralType; + getNumberType(): Type; + getNumberLiteralType(value: number): NumberLiteralType; + getBigIntType(): Type; + getBooleanType(): Type; + getFalseType(): Type; + getTrueType(): Type; + getVoidType(): Type; + /** + * Gets the intrinsic `undefined` type. There are multiple types that act as `undefined` used internally in the compiler + * depending on compiler options, so the type returned by this function should not be used in equality checks to determine + * if another type is `undefined`. Instead, use `type.flags & TypeFlags.Undefined`. + */ + getUndefinedType(): Type; + /** + * Gets the intrinsic `null` type. There are multiple types that act as `null` used internally in the compiler, + * so the type returned by this function should not be used in equality checks to determine if another type + * is `null`. Instead, use `type.flags & TypeFlags.Null`. + */ + getNullType(): Type; + getESSymbolType(): Type; + /** + * Gets the intrinsic `never` type. There are multiple types that act as `never` used internally in the compiler, + * so the type returned by this function should not be used in equality checks to determine if another type + * is `never`. Instead, use `type.flags & TypeFlags.Never`. + */ + getNeverType(): Type; + /** * True if this type is the `Array` or `ReadonlyArray` type from lib.d.ts. * This function will _not_ return true if passed a type which * extends `Array` (for example, the TypeScript AST's `NodeArray` type). @@ -3014,6 +3048,12 @@ } enum ModuleResolutionKind { Classic = 1, + /** + * @deprecated + * `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets. + * Use the new name or consider switching to a modern module resolution target. + */ + NodeJs = 2, Node10 = 2, Node16 = 3, NodeNext = 99, @@ -4380,9 +4420,15 @@ function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner; type ErrorCallback = (message: DiagnosticMessage, length: number) => void; interface Scanner { + /** @deprecated use {@link getTokenFullStart} */ getStartPos(): number; getToken(): SyntaxKind; + getTokenFullStart(): number; + getTokenStart(): number; + getTokenEnd(): number; + /** @deprecated use {@link getTokenEnd} */ getTextPos(): number; + /** @deprecated use {@link getTokenStart} */ getTokenPos(): number; getTokenText(): string; getTokenValue(): string; @@ -4413,7 +4459,9 @@ setOnError(onError: ErrorCallback | undefined): void; setScriptTarget(scriptTarget: ScriptTarget): void; setLanguageVariant(variant: LanguageVariant): void; + /** @deprecated use {@link resetTokenState} */ setTextPos(textPos: number): void; + resetTokenState(pos: number): void; lookAhead(callback: () => T): T; scanRange(start: number, length: number, callback: () => T): T; tryScan(callback: () => T): T; diff --recursive --unified --new-file --exclude test --exclude Makefile 5.1.0-dev.20230307/lib/typescript.js 5.1.0-dev.20230308/lib/typescript.js --- 5.1.0-dev.20230307/lib/typescript.js 1985-10-26 09:15:00 +++ 5.1.0-dev.20230308/lib/typescript.js 1985-10-26 09:15:00 @@ -35,7 +35,7 @@ "src/compiler/corePublic.ts"() { "use strict"; versionMajorMinor = "5.1"; - version = `${versionMajorMinor}.0-dev.20230307`; + version = `${versionMajorMinor}.0-dev.20230308`; Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -3545,7 +3545,7 @@ const name = DiagnosticCategory[d.category]; return lowerCase ? name.toLowerCase() : name; } - var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas, DeprecationVersion; + var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas; var init_types = __esm({ "src/compiler/types.ts"() { "use strict"; @@ -3631,304 +3631,305 @@ SyntaxKind5[SyntaxKind5["CaretEqualsToken"] = 78] = "CaretEqualsToken"; SyntaxKind5[SyntaxKind5["Identifier"] = 79] = "Identifier"; SyntaxKind5[SyntaxKind5["PrivateIdentifier"] = 80] = "PrivateIdentifier"; - SyntaxKind5[SyntaxKind5["BreakKeyword"] = 81] = "BreakKeyword"; - SyntaxKind5[SyntaxKind5["CaseKeyword"] = 82] = "CaseKeyword"; - SyntaxKind5[SyntaxKind5["CatchKeyword"] = 83] = "CatchKeyword"; - SyntaxKind5[SyntaxKind5["ClassKeyword"] = 84] = "ClassKeyword"; - SyntaxKind5[SyntaxKind5["ConstKeyword"] = 85] = "ConstKeyword"; - SyntaxKind5[SyntaxKind5["ContinueKeyword"] = 86] = "ContinueKeyword"; - SyntaxKind5[SyntaxKind5["DebuggerKeyword"] = 87] = "DebuggerKeyword"; - SyntaxKind5[SyntaxKind5["DefaultKeyword"] = 88] = "DefaultKeyword"; - SyntaxKind5[SyntaxKind5["DeleteKeyword"] = 89] = "DeleteKeyword"; - SyntaxKind5[SyntaxKind5["DoKeyword"] = 90] = "DoKeyword"; - SyntaxKind5[SyntaxKind5["ElseKeyword"] = 91] = "ElseKeyword"; - SyntaxKind5[SyntaxKind5["EnumKeyword"] = 92] = "EnumKeyword"; - SyntaxKind5[SyntaxKind5["ExportKeyword"] = 93] = "ExportKeyword"; - SyntaxKind5[SyntaxKind5["ExtendsKeyword"] = 94] = "ExtendsKeyword"; - SyntaxKind5[SyntaxKind5["FalseKeyword"] = 95] = "FalseKeyword"; - SyntaxKind5[SyntaxKind5["FinallyKeyword"] = 96] = "FinallyKeyword"; - SyntaxKind5[SyntaxKind5["ForKeyword"] = 97] = "ForKeyword"; - SyntaxKind5[SyntaxKind5["FunctionKeyword"] = 98] = "FunctionKeyword"; - SyntaxKind5[SyntaxKind5["IfKeyword"] = 99] = "IfKeyword"; - SyntaxKind5[SyntaxKind5["ImportKeyword"] = 100] = "ImportKeyword"; - SyntaxKind5[SyntaxKind5["InKeyword"] = 101] = "InKeyword"; - SyntaxKind5[SyntaxKind5["InstanceOfKeyword"] = 102] = "InstanceOfKeyword"; - SyntaxKind5[SyntaxKind5["NewKeyword"] = 103] = "NewKeyword"; - SyntaxKind5[SyntaxKind5["NullKeyword"] = 104] = "NullKeyword"; - SyntaxKind5[SyntaxKind5["ReturnKeyword"] = 105] = "ReturnKeyword"; - SyntaxKind5[SyntaxKind5["SuperKeyword"] = 106] = "SuperKeyword"; - SyntaxKind5[SyntaxKind5["SwitchKeyword"] = 107] = "SwitchKeyword"; - SyntaxKind5[SyntaxKind5["ThisKeyword"] = 108] = "ThisKeyword"; - SyntaxKind5[SyntaxKind5["ThrowKeyword"] = 109] = "ThrowKeyword"; - SyntaxKind5[SyntaxKind5["TrueKeyword"] = 110] = "TrueKeyword"; - SyntaxKind5[SyntaxKind5["TryKeyword"] = 111] = "TryKeyword"; - SyntaxKind5[SyntaxKind5["TypeOfKeyword"] = 112] = "TypeOfKeyword"; - SyntaxKind5[SyntaxKind5["VarKeyword"] = 113] = "VarKeyword"; - SyntaxKind5[SyntaxKind5["VoidKeyword"] = 114] = "VoidKeyword"; - SyntaxKind5[SyntaxKind5["WhileKeyword"] = 115] = "WhileKeyword"; - SyntaxKind5[SyntaxKind5["WithKeyword"] = 116] = "WithKeyword"; - SyntaxKind5[SyntaxKind5["ImplementsKeyword"] = 117] = "ImplementsKeyword"; - SyntaxKind5[SyntaxKind5["InterfaceKeyword"] = 118] = "InterfaceKeyword"; - SyntaxKind5[SyntaxKind5["LetKeyword"] = 119] = "LetKeyword"; - SyntaxKind5[SyntaxKind5["PackageKeyword"] = 120] = "PackageKeyword"; - SyntaxKind5[SyntaxKind5["PrivateKeyword"] = 121] = "PrivateKeyword"; - SyntaxKind5[SyntaxKind5["ProtectedKeyword"] = 122] = "ProtectedKeyword"; - SyntaxKind5[SyntaxKind5["PublicKeyword"] = 123] = "PublicKeyword"; - SyntaxKind5[SyntaxKind5["StaticKeyword"] = 124] = "StaticKeyword"; - SyntaxKind5[SyntaxKind5["YieldKeyword"] = 125] = "YieldKeyword"; - SyntaxKind5[SyntaxKind5["AbstractKeyword"] = 126] = "AbstractKeyword"; - SyntaxKind5[SyntaxKind5["AccessorKeyword"] = 127] = "AccessorKeyword"; - SyntaxKind5[SyntaxKind5["AsKeyword"] = 128] = "AsKeyword"; - SyntaxKind5[SyntaxKind5["AssertsKeyword"] = 129] = "AssertsKeyword"; - SyntaxKind5[SyntaxKind5["AssertKeyword"] = 130] = "AssertKeyword"; - SyntaxKind5[SyntaxKind5["AnyKeyword"] = 131] = "AnyKeyword"; - SyntaxKind5[SyntaxKind5["AsyncKeyword"] = 132] = "AsyncKeyword"; - SyntaxKind5[SyntaxKind5["AwaitKeyword"] = 133] = "AwaitKeyword"; - SyntaxKind5[SyntaxKind5["BooleanKeyword"] = 134] = "BooleanKeyword"; - SyntaxKind5[SyntaxKind5["ConstructorKeyword"] = 135] = "ConstructorKeyword"; - SyntaxKind5[SyntaxKind5["DeclareKeyword"] = 136] = "DeclareKeyword"; - SyntaxKind5[SyntaxKind5["GetKeyword"] = 137] = "GetKeyword"; - SyntaxKind5[SyntaxKind5["InferKeyword"] = 138] = "InferKeyword"; - SyntaxKind5[SyntaxKind5["IntrinsicKeyword"] = 139] = "IntrinsicKeyword"; - SyntaxKind5[SyntaxKind5["IsKeyword"] = 140] = "IsKeyword"; - SyntaxKind5[SyntaxKind5["KeyOfKeyword"] = 141] = "KeyOfKeyword"; - SyntaxKind5[SyntaxKind5["ModuleKeyword"] = 142] = "ModuleKeyword"; - SyntaxKind5[SyntaxKind5["NamespaceKeyword"] = 143] = "NamespaceKeyword"; - SyntaxKind5[SyntaxKind5["NeverKeyword"] = 144] = "NeverKeyword"; - SyntaxKind5[SyntaxKind5["OutKeyword"] = 145] = "OutKeyword"; - SyntaxKind5[SyntaxKind5["ReadonlyKeyword"] = 146] = "ReadonlyKeyword"; - SyntaxKind5[SyntaxKind5["RequireKeyword"] = 147] = "RequireKeyword"; - SyntaxKind5[SyntaxKind5["NumberKeyword"] = 148] = "NumberKeyword"; - SyntaxKind5[SyntaxKind5["ObjectKeyword"] = 149] = "ObjectKeyword"; - SyntaxKind5[SyntaxKind5["SatisfiesKeyword"] = 150] = "SatisfiesKeyword"; - SyntaxKind5[SyntaxKind5["SetKeyword"] = 151] = "SetKeyword"; - SyntaxKind5[SyntaxKind5["StringKeyword"] = 152] = "StringKeyword"; - SyntaxKind5[SyntaxKind5["SymbolKeyword"] = 153] = "SymbolKeyword"; - SyntaxKind5[SyntaxKind5["TypeKeyword"] = 154] = "TypeKeyword"; - SyntaxKind5[SyntaxKind5["UndefinedKeyword"] = 155] = "UndefinedKeyword"; - SyntaxKind5[SyntaxKind5["UniqueKeyword"] = 156] = "UniqueKeyword"; - SyntaxKind5[SyntaxKind5["UnknownKeyword"] = 157] = "UnknownKeyword"; - SyntaxKind5[SyntaxKind5["FromKeyword"] = 158] = "FromKeyword"; - SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 159] = "GlobalKeyword"; - SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 160] = "BigIntKeyword"; - SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 161] = "OverrideKeyword"; - SyntaxKind5[SyntaxKind5["OfKeyword"] = 162] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 163] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 164] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 165] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 166] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 167] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 168] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 169] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 170] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 171] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 172] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 173] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 174] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 175] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 176] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 177] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 178] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 179] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 180] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 181] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 182] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 183] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 184] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 185] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 186] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 187] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 188] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 189] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 190] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 191] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 192] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 193] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 194] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 195] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 196] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 197] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 198] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 199] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 200] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 201] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 202] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 203] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 204] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 205] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 206] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 207] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 208] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 209] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 210] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 211] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 212] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 213] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 214] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 215] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 216] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 217] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 218] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 219] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 220] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 221] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 222] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 223] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 224] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 225] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 226] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 227] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 228] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 229] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 230] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 231] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 232] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 233] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 234] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 235] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 236] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 237] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 238] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 239] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 240] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 241] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 242] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 243] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 244] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 245] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 246] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 247] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 248] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 249] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 250] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 251] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 252] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 253] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 254] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 255] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 256] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 257] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 258] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 259] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 260] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 261] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 262] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 263] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 264] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 265] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 266] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 267] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 268] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 269] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 270] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 271] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 272] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 273] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 274] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 275] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 276] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 277] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 278] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 279] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 280] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 281] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 282] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 283] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 284] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 285] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 286] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 287] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 288] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 289] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 290] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 291] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 292] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 293] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 294] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 295] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 296] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 297] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 298] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 299] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 300] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 301] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 302] = "EnumMember"; - SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 303] = "UnparsedPrologue"; - SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 304] = "UnparsedPrepend"; - SyntaxKind5[SyntaxKind5["UnparsedText"] = 305] = "UnparsedText"; - SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 306] = "UnparsedInternalText"; - SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 307] = "UnparsedSyntheticReference"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 308] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 309] = "Bundle"; - SyntaxKind5[SyntaxKind5["UnparsedSource"] = 310] = "UnparsedSource"; - SyntaxKind5[SyntaxKind5["InputFiles"] = 311] = "InputFiles"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 312] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 313] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 314] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 315] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 316] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 317] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 318] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 319] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 320] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 321] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 322] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 323] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 323 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 324] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 325] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 326] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 327] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 328] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 329] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 330] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 331] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 332] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 333] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 334] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 335] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 336] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 337] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 338] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 339] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 340] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 341] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 342] = "JSDocOverloadTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 343] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 344] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 345] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 346] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 347] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 348] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 349] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 350] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 351] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 352] = "JSDocThrowsTag"; - SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 354] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 355] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 357] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker"; - SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 361] = "Count"; + SyntaxKind5[SyntaxKind5["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken"; + SyntaxKind5[SyntaxKind5["BreakKeyword"] = 82] = "BreakKeyword"; + SyntaxKind5[SyntaxKind5["CaseKeyword"] = 83] = "CaseKeyword"; + SyntaxKind5[SyntaxKind5["CatchKeyword"] = 84] = "CatchKeyword"; + SyntaxKind5[SyntaxKind5["ClassKeyword"] = 85] = "ClassKeyword"; + SyntaxKind5[SyntaxKind5["ConstKeyword"] = 86] = "ConstKeyword"; + SyntaxKind5[SyntaxKind5["ContinueKeyword"] = 87] = "ContinueKeyword"; + SyntaxKind5[SyntaxKind5["DebuggerKeyword"] = 88] = "DebuggerKeyword"; + SyntaxKind5[SyntaxKind5["DefaultKeyword"] = 89] = "DefaultKeyword"; + SyntaxKind5[SyntaxKind5["DeleteKeyword"] = 90] = "DeleteKeyword"; + SyntaxKind5[SyntaxKind5["DoKeyword"] = 91] = "DoKeyword"; + SyntaxKind5[SyntaxKind5["ElseKeyword"] = 92] = "ElseKeyword"; + SyntaxKind5[SyntaxKind5["EnumKeyword"] = 93] = "EnumKeyword"; + SyntaxKind5[SyntaxKind5["ExportKeyword"] = 94] = "ExportKeyword"; + SyntaxKind5[SyntaxKind5["ExtendsKeyword"] = 95] = "ExtendsKeyword"; + SyntaxKind5[SyntaxKind5["FalseKeyword"] = 96] = "FalseKeyword"; + SyntaxKind5[SyntaxKind5["FinallyKeyword"] = 97] = "FinallyKeyword"; + SyntaxKind5[SyntaxKind5["ForKeyword"] = 98] = "ForKeyword"; + SyntaxKind5[SyntaxKind5["FunctionKeyword"] = 99] = "FunctionKeyword"; + SyntaxKind5[SyntaxKind5["IfKeyword"] = 100] = "IfKeyword"; + SyntaxKind5[SyntaxKind5["ImportKeyword"] = 101] = "ImportKeyword"; + SyntaxKind5[SyntaxKind5["InKeyword"] = 102] = "InKeyword"; + SyntaxKind5[SyntaxKind5["InstanceOfKeyword"] = 103] = "InstanceOfKeyword"; + SyntaxKind5[SyntaxKind5["NewKeyword"] = 104] = "NewKeyword"; + SyntaxKind5[SyntaxKind5["NullKeyword"] = 105] = "NullKeyword"; + SyntaxKind5[SyntaxKind5["ReturnKeyword"] = 106] = "ReturnKeyword"; + SyntaxKind5[SyntaxKind5["SuperKeyword"] = 107] = "SuperKeyword"; + SyntaxKind5[SyntaxKind5["SwitchKeyword"] = 108] = "SwitchKeyword"; + SyntaxKind5[SyntaxKind5["ThisKeyword"] = 109] = "ThisKeyword"; + SyntaxKind5[SyntaxKind5["ThrowKeyword"] = 110] = "ThrowKeyword"; + SyntaxKind5[SyntaxKind5["TrueKeyword"] = 111] = "TrueKeyword"; + SyntaxKind5[SyntaxKind5["TryKeyword"] = 112] = "TryKeyword"; + SyntaxKind5[SyntaxKind5["TypeOfKeyword"] = 113] = "TypeOfKeyword"; + SyntaxKind5[SyntaxKind5["VarKeyword"] = 114] = "VarKeyword"; + SyntaxKind5[SyntaxKind5["VoidKeyword"] = 115] = "VoidKeyword"; + SyntaxKind5[SyntaxKind5["WhileKeyword"] = 116] = "WhileKeyword"; + SyntaxKind5[SyntaxKind5["WithKeyword"] = 117] = "WithKeyword"; + SyntaxKind5[SyntaxKind5["ImplementsKeyword"] = 118] = "ImplementsKeyword"; + SyntaxKind5[SyntaxKind5["InterfaceKeyword"] = 119] = "InterfaceKeyword"; + SyntaxKind5[SyntaxKind5["LetKeyword"] = 120] = "LetKeyword"; + SyntaxKind5[SyntaxKind5["PackageKeyword"] = 121] = "PackageKeyword"; + SyntaxKind5[SyntaxKind5["PrivateKeyword"] = 122] = "PrivateKeyword"; + SyntaxKind5[SyntaxKind5["ProtectedKeyword"] = 123] = "ProtectedKeyword"; + SyntaxKind5[SyntaxKind5["PublicKeyword"] = 124] = "PublicKeyword"; + SyntaxKind5[SyntaxKind5["StaticKeyword"] = 125] = "StaticKeyword"; + SyntaxKind5[SyntaxKind5["YieldKeyword"] = 126] = "YieldKeyword"; + SyntaxKind5[SyntaxKind5["AbstractKeyword"] = 127] = "AbstractKeyword"; + SyntaxKind5[SyntaxKind5["AccessorKeyword"] = 128] = "AccessorKeyword"; + SyntaxKind5[SyntaxKind5["AsKeyword"] = 129] = "AsKeyword"; + SyntaxKind5[SyntaxKind5["AssertsKeyword"] = 130] = "AssertsKeyword"; + SyntaxKind5[SyntaxKind5["AssertKeyword"] = 131] = "AssertKeyword"; + SyntaxKind5[SyntaxKind5["AnyKeyword"] = 132] = "AnyKeyword"; + SyntaxKind5[SyntaxKind5["AsyncKeyword"] = 133] = "AsyncKeyword"; + SyntaxKind5[SyntaxKind5["AwaitKeyword"] = 134] = "AwaitKeyword"; + SyntaxKind5[SyntaxKind5["BooleanKeyword"] = 135] = "BooleanKeyword"; + SyntaxKind5[SyntaxKind5["ConstructorKeyword"] = 136] = "ConstructorKeyword"; + SyntaxKind5[SyntaxKind5["DeclareKeyword"] = 137] = "DeclareKeyword"; + SyntaxKind5[SyntaxKind5["GetKeyword"] = 138] = "GetKeyword"; + SyntaxKind5[SyntaxKind5["InferKeyword"] = 139] = "InferKeyword"; + SyntaxKind5[SyntaxKind5["IntrinsicKeyword"] = 140] = "IntrinsicKeyword"; + SyntaxKind5[SyntaxKind5["IsKeyword"] = 141] = "IsKeyword"; + SyntaxKind5[SyntaxKind5["KeyOfKeyword"] = 142] = "KeyOfKeyword"; + SyntaxKind5[SyntaxKind5["ModuleKeyword"] = 143] = "ModuleKeyword"; + SyntaxKind5[SyntaxKind5["NamespaceKeyword"] = 144] = "NamespaceKeyword"; + SyntaxKind5[SyntaxKind5["NeverKeyword"] = 145] = "NeverKeyword"; + SyntaxKind5[SyntaxKind5["OutKeyword"] = 146] = "OutKeyword"; + SyntaxKind5[SyntaxKind5["ReadonlyKeyword"] = 147] = "ReadonlyKeyword"; + SyntaxKind5[SyntaxKind5["RequireKeyword"] = 148] = "RequireKeyword"; + SyntaxKind5[SyntaxKind5["NumberKeyword"] = 149] = "NumberKeyword"; + SyntaxKind5[SyntaxKind5["ObjectKeyword"] = 150] = "ObjectKeyword"; + SyntaxKind5[SyntaxKind5["SatisfiesKeyword"] = 151] = "SatisfiesKeyword"; + SyntaxKind5[SyntaxKind5["SetKeyword"] = 152] = "SetKeyword"; + SyntaxKind5[SyntaxKind5["StringKeyword"] = 153] = "StringKeyword"; + SyntaxKind5[SyntaxKind5["SymbolKeyword"] = 154] = "SymbolKeyword"; + SyntaxKind5[SyntaxKind5["TypeKeyword"] = 155] = "TypeKeyword"; + SyntaxKind5[SyntaxKind5["UndefinedKeyword"] = 156] = "UndefinedKeyword"; + SyntaxKind5[SyntaxKind5["UniqueKeyword"] = 157] = "UniqueKeyword"; + SyntaxKind5[SyntaxKind5["UnknownKeyword"] = 158] = "UnknownKeyword"; + SyntaxKind5[SyntaxKind5["FromKeyword"] = 159] = "FromKeyword"; + SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 160] = "GlobalKeyword"; + SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 161] = "BigIntKeyword"; + SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 162] = "OverrideKeyword"; + SyntaxKind5[SyntaxKind5["OfKeyword"] = 163] = "OfKeyword"; + SyntaxKind5[SyntaxKind5["QualifiedName"] = 164] = "QualifiedName"; + SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 165] = "ComputedPropertyName"; + SyntaxKind5[SyntaxKind5["TypeParameter"] = 166] = "TypeParameter"; + SyntaxKind5[SyntaxKind5["Parameter"] = 167] = "Parameter"; + SyntaxKind5[SyntaxKind5["Decorator"] = 168] = "Decorator"; + SyntaxKind5[SyntaxKind5["PropertySignature"] = 169] = "PropertySignature"; + SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 170] = "PropertyDeclaration"; + SyntaxKind5[SyntaxKind5["MethodSignature"] = 171] = "MethodSignature"; + SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 172] = "MethodDeclaration"; + SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 173] = "ClassStaticBlockDeclaration"; + SyntaxKind5[SyntaxKind5["Constructor"] = 174] = "Constructor"; + SyntaxKind5[SyntaxKind5["GetAccessor"] = 175] = "GetAccessor"; + SyntaxKind5[SyntaxKind5["SetAccessor"] = 176] = "SetAccessor"; + SyntaxKind5[SyntaxKind5["CallSignature"] = 177] = "CallSignature"; + SyntaxKind5[SyntaxKind5["ConstructSignature"] = 178] = "ConstructSignature"; + SyntaxKind5[SyntaxKind5["IndexSignature"] = 179] = "IndexSignature"; + SyntaxKind5[SyntaxKind5["TypePredicate"] = 180] = "TypePredicate"; + SyntaxKind5[SyntaxKind5["TypeReference"] = 181] = "TypeReference"; + SyntaxKind5[SyntaxKind5["FunctionType"] = 182] = "FunctionType"; + SyntaxKind5[SyntaxKind5["ConstructorType"] = 183] = "ConstructorType"; + SyntaxKind5[SyntaxKind5["TypeQuery"] = 184] = "TypeQuery"; + SyntaxKind5[SyntaxKind5["TypeLiteral"] = 185] = "TypeLiteral"; + SyntaxKind5[SyntaxKind5["ArrayType"] = 186] = "ArrayType"; + SyntaxKind5[SyntaxKind5["TupleType"] = 187] = "TupleType"; + SyntaxKind5[SyntaxKind5["OptionalType"] = 188] = "OptionalType"; + SyntaxKind5[SyntaxKind5["RestType"] = 189] = "RestType"; + SyntaxKind5[SyntaxKind5["UnionType"] = 190] = "UnionType"; + SyntaxKind5[SyntaxKind5["IntersectionType"] = 191] = "IntersectionType"; + SyntaxKind5[SyntaxKind5["ConditionalType"] = 192] = "ConditionalType"; + SyntaxKind5[SyntaxKind5["InferType"] = 193] = "InferType"; + SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 194] = "ParenthesizedType"; + SyntaxKind5[SyntaxKind5["ThisType"] = 195] = "ThisType"; + SyntaxKind5[SyntaxKind5["TypeOperator"] = 196] = "TypeOperator"; + SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 197] = "IndexedAccessType"; + SyntaxKind5[SyntaxKind5["MappedType"] = 198] = "MappedType"; + SyntaxKind5[SyntaxKind5["LiteralType"] = 199] = "LiteralType"; + SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 200] = "NamedTupleMember"; + SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 201] = "TemplateLiteralType"; + SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 202] = "TemplateLiteralTypeSpan"; + SyntaxKind5[SyntaxKind5["ImportType"] = 203] = "ImportType"; + SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 204] = "ObjectBindingPattern"; + SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 205] = "ArrayBindingPattern"; + SyntaxKind5[SyntaxKind5["BindingElement"] = 206] = "BindingElement"; + SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 207] = "ArrayLiteralExpression"; + SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 208] = "ObjectLiteralExpression"; + SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 209] = "PropertyAccessExpression"; + SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 210] = "ElementAccessExpression"; + SyntaxKind5[SyntaxKind5["CallExpression"] = 211] = "CallExpression"; + SyntaxKind5[SyntaxKind5["NewExpression"] = 212] = "NewExpression"; + SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 213] = "TaggedTemplateExpression"; + SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 214] = "TypeAssertionExpression"; + SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 215] = "ParenthesizedExpression"; + SyntaxKind5[SyntaxKind5["FunctionExpression"] = 216] = "FunctionExpression"; + SyntaxKind5[SyntaxKind5["ArrowFunction"] = 217] = "ArrowFunction"; + SyntaxKind5[SyntaxKind5["DeleteExpression"] = 218] = "DeleteExpression"; + SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 219] = "TypeOfExpression"; + SyntaxKind5[SyntaxKind5["VoidExpression"] = 220] = "VoidExpression"; + SyntaxKind5[SyntaxKind5["AwaitExpression"] = 221] = "AwaitExpression"; + SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 222] = "PrefixUnaryExpression"; + SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 223] = "PostfixUnaryExpression"; + SyntaxKind5[SyntaxKind5["BinaryExpression"] = 224] = "BinaryExpression"; + SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 225] = "ConditionalExpression"; + SyntaxKind5[SyntaxKind5["TemplateExpression"] = 226] = "TemplateExpression"; + SyntaxKind5[SyntaxKind5["YieldExpression"] = 227] = "YieldExpression"; + SyntaxKind5[SyntaxKind5["SpreadElement"] = 228] = "SpreadElement"; + SyntaxKind5[SyntaxKind5["ClassExpression"] = 229] = "ClassExpression"; + SyntaxKind5[SyntaxKind5["OmittedExpression"] = 230] = "OmittedExpression"; + SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 231] = "ExpressionWithTypeArguments"; + SyntaxKind5[SyntaxKind5["AsExpression"] = 232] = "AsExpression"; + SyntaxKind5[SyntaxKind5["NonNullExpression"] = 233] = "NonNullExpression"; + SyntaxKind5[SyntaxKind5["MetaProperty"] = 234] = "MetaProperty"; + SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 235] = "SyntheticExpression"; + SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 236] = "SatisfiesExpression"; + SyntaxKind5[SyntaxKind5["TemplateSpan"] = 237] = "TemplateSpan"; + SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 238] = "SemicolonClassElement"; + SyntaxKind5[SyntaxKind5["Block"] = 239] = "Block"; + SyntaxKind5[SyntaxKind5["EmptyStatement"] = 240] = "EmptyStatement"; + SyntaxKind5[SyntaxKind5["VariableStatement"] = 241] = "VariableStatement"; + SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 242] = "ExpressionStatement"; + SyntaxKind5[SyntaxKind5["IfStatement"] = 243] = "IfStatement"; + SyntaxKind5[SyntaxKind5["DoStatement"] = 244] = "DoStatement"; + SyntaxKind5[SyntaxKind5["WhileStatement"] = 245] = "WhileStatement"; + SyntaxKind5[SyntaxKind5["ForStatement"] = 246] = "ForStatement"; + SyntaxKind5[SyntaxKind5["ForInStatement"] = 247] = "ForInStatement"; + SyntaxKind5[SyntaxKind5["ForOfStatement"] = 248] = "ForOfStatement"; + SyntaxKind5[SyntaxKind5["ContinueStatement"] = 249] = "ContinueStatement"; + SyntaxKind5[SyntaxKind5["BreakStatement"] = 250] = "BreakStatement"; + SyntaxKind5[SyntaxKind5["ReturnStatement"] = 251] = "ReturnStatement"; + SyntaxKind5[SyntaxKind5["WithStatement"] = 252] = "WithStatement"; + SyntaxKind5[SyntaxKind5["SwitchStatement"] = 253] = "SwitchStatement"; + SyntaxKind5[SyntaxKind5["LabeledStatement"] = 254] = "LabeledStatement"; + SyntaxKind5[SyntaxKind5["ThrowStatement"] = 255] = "ThrowStatement"; + SyntaxKind5[SyntaxKind5["TryStatement"] = 256] = "TryStatement"; + SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 257] = "DebuggerStatement"; + SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 258] = "VariableDeclaration"; + SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 259] = "VariableDeclarationList"; + SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 260] = "FunctionDeclaration"; + SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 261] = "ClassDeclaration"; + SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 262] = "InterfaceDeclaration"; + SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 263] = "TypeAliasDeclaration"; + SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 264] = "EnumDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 265] = "ModuleDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleBlock"] = 266] = "ModuleBlock"; + SyntaxKind5[SyntaxKind5["CaseBlock"] = 267] = "CaseBlock"; + SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 268] = "NamespaceExportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 269] = "ImportEqualsDeclaration"; + SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 270] = "ImportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportClause"] = 271] = "ImportClause"; + SyntaxKind5[SyntaxKind5["NamespaceImport"] = 272] = "NamespaceImport"; + SyntaxKind5[SyntaxKind5["NamedImports"] = 273] = "NamedImports"; + SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 274] = "ImportSpecifier"; + SyntaxKind5[SyntaxKind5["ExportAssignment"] = 275] = "ExportAssignment"; + SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 276] = "ExportDeclaration"; + SyntaxKind5[SyntaxKind5["NamedExports"] = 277] = "NamedExports"; + SyntaxKind5[SyntaxKind5["NamespaceExport"] = 278] = "NamespaceExport"; + SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 279] = "ExportSpecifier"; + SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 280] = "MissingDeclaration"; + SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 281] = "ExternalModuleReference"; + SyntaxKind5[SyntaxKind5["JsxElement"] = 282] = "JsxElement"; + SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 283] = "JsxSelfClosingElement"; + SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 284] = "JsxOpeningElement"; + SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 285] = "JsxClosingElement"; + SyntaxKind5[SyntaxKind5["JsxFragment"] = 286] = "JsxFragment"; + SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 287] = "JsxOpeningFragment"; + SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 288] = "JsxClosingFragment"; + SyntaxKind5[SyntaxKind5["JsxAttribute"] = 289] = "JsxAttribute"; + SyntaxKind5[SyntaxKind5["JsxAttributes"] = 290] = "JsxAttributes"; + SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 291] = "JsxSpreadAttribute"; + SyntaxKind5[SyntaxKind5["JsxExpression"] = 292] = "JsxExpression"; + SyntaxKind5[SyntaxKind5["CaseClause"] = 293] = "CaseClause"; + SyntaxKind5[SyntaxKind5["DefaultClause"] = 294] = "DefaultClause"; + SyntaxKind5[SyntaxKind5["HeritageClause"] = 295] = "HeritageClause"; + SyntaxKind5[SyntaxKind5["CatchClause"] = 296] = "CatchClause"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 297] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 298] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 299] = "ImportTypeAssertionContainer"; + SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 300] = "PropertyAssignment"; + SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 301] = "ShorthandPropertyAssignment"; + SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 302] = "SpreadAssignment"; + SyntaxKind5[SyntaxKind5["EnumMember"] = 303] = "EnumMember"; + SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 304] = "UnparsedPrologue"; + SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 305] = "UnparsedPrepend"; + SyntaxKind5[SyntaxKind5["UnparsedText"] = 306] = "UnparsedText"; + SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 307] = "UnparsedInternalText"; + SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 308] = "UnparsedSyntheticReference"; + SyntaxKind5[SyntaxKind5["SourceFile"] = 309] = "SourceFile"; + SyntaxKind5[SyntaxKind5["Bundle"] = 310] = "Bundle"; + SyntaxKind5[SyntaxKind5["UnparsedSource"] = 311] = "UnparsedSource"; + SyntaxKind5[SyntaxKind5["InputFiles"] = 312] = "InputFiles"; + SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 313] = "JSDocTypeExpression"; + SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 314] = "JSDocNameReference"; + SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 315] = "JSDocMemberName"; + SyntaxKind5[SyntaxKind5["JSDocAllType"] = 316] = "JSDocAllType"; + SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 317] = "JSDocUnknownType"; + SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 318] = "JSDocNullableType"; + SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 319] = "JSDocNonNullableType"; + SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 320] = "JSDocOptionalType"; + SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 321] = "JSDocFunctionType"; + SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 322] = "JSDocVariadicType"; + SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 323] = "JSDocNamepathType"; + SyntaxKind5[SyntaxKind5["JSDoc"] = 324] = "JSDoc"; + SyntaxKind5[SyntaxKind5["JSDocComment"] = 324 /* JSDoc */] = "JSDocComment"; + SyntaxKind5[SyntaxKind5["JSDocText"] = 325] = "JSDocText"; + SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 326] = "JSDocTypeLiteral"; + SyntaxKind5[SyntaxKind5["JSDocSignature"] = 327] = "JSDocSignature"; + SyntaxKind5[SyntaxKind5["JSDocLink"] = 328] = "JSDocLink"; + SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 329] = "JSDocLinkCode"; + SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 330] = "JSDocLinkPlain"; + SyntaxKind5[SyntaxKind5["JSDocTag"] = 331] = "JSDocTag"; + SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 332] = "JSDocAugmentsTag"; + SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 333] = "JSDocImplementsTag"; + SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 334] = "JSDocAuthorTag"; + SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 335] = "JSDocDeprecatedTag"; + SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 336] = "JSDocClassTag"; + SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 337] = "JSDocPublicTag"; + SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 338] = "JSDocPrivateTag"; + SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 339] = "JSDocProtectedTag"; + SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 340] = "JSDocReadonlyTag"; + SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 341] = "JSDocOverrideTag"; + SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 342] = "JSDocCallbackTag"; + SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 343] = "JSDocOverloadTag"; + SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 344] = "JSDocEnumTag"; + SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 345] = "JSDocParameterTag"; + SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 346] = "JSDocReturnTag"; + SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 347] = "JSDocThisTag"; + SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 348] = "JSDocTypeTag"; + SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 349] = "JSDocTemplateTag"; + SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 350] = "JSDocTypedefTag"; + SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 351] = "JSDocSeeTag"; + SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 352] = "JSDocPropertyTag"; + SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 353] = "JSDocThrowsTag"; + SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 354] = "JSDocSatisfiesTag"; + SyntaxKind5[SyntaxKind5["SyntaxList"] = 355] = "SyntaxList"; + SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 356] = "NotEmittedStatement"; + SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 357] = "PartiallyEmittedExpression"; + SyntaxKind5[SyntaxKind5["CommaListExpression"] = 358] = "CommaListExpression"; + SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 359] = "MergeDeclarationMarker"; + SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 360] = "EndOfDeclarationMarker"; + SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression"; + SyntaxKind5[SyntaxKind5["Count"] = 362] = "Count"; SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment"; SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment"; SyntaxKind5[SyntaxKind5["LastCompoundAssignment"] = 78 /* CaretEqualsToken */] = "LastCompoundAssignment"; - SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 81 /* BreakKeyword */] = "FirstReservedWord"; - SyntaxKind5[SyntaxKind5["LastReservedWord"] = 116 /* WithKeyword */] = "LastReservedWord"; - SyntaxKind5[SyntaxKind5["FirstKeyword"] = 81 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 162 /* OfKeyword */] = "LastKeyword"; - SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 117 /* ImplementsKeyword */] = "FirstFutureReservedWord"; - SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 125 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 179 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 202 /* ImportType */] = "LastTypeNode"; + SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 82 /* BreakKeyword */] = "FirstReservedWord"; + SyntaxKind5[SyntaxKind5["LastReservedWord"] = 117 /* WithKeyword */] = "LastReservedWord"; + SyntaxKind5[SyntaxKind5["FirstKeyword"] = 82 /* BreakKeyword */] = "FirstKeyword"; + SyntaxKind5[SyntaxKind5["LastKeyword"] = 163 /* OfKeyword */] = "LastKeyword"; + SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 118 /* ImplementsKeyword */] = "FirstFutureReservedWord"; + SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 126 /* YieldKeyword */] = "LastFutureReservedWord"; + SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 180 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind5[SyntaxKind5["LastTypeNode"] = 203 /* ImportType */] = "LastTypeNode"; SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 18 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind5[SyntaxKind5["LastPunctuation"] = 78 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 162 /* LastKeyword */] = "LastToken"; + SyntaxKind5[SyntaxKind5["LastToken"] = 163 /* LastKeyword */] = "LastToken"; SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 8 /* NumericLiteral */] = "FirstLiteralToken"; @@ -3937,15 +3938,15 @@ SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 17 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 29 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 78 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 240 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 163 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; - SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind5[SyntaxKind5["FirstStatement"] = 241 /* VariableStatement */] = "FirstStatement"; + SyntaxKind5[SyntaxKind5["LastStatement"] = 257 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind5[SyntaxKind5["FirstNode"] = 164 /* QualifiedName */] = "FirstNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 313 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 354 /* JSDocSatisfiesTag */] = "LastJSDocNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 331 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 354 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; + SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 127 /* AbstractKeyword */] = "FirstContextualKeyword"; + SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 163 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind5; })(SyntaxKind || {}); NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { @@ -4444,7 +4445,6 @@ TypeFlags2[TypeFlags2["DefinitelyFalsy"] = 117632] = "DefinitelyFalsy"; TypeFlags2[TypeFlags2["PossiblyFalsy"] = 117724] = "PossiblyFalsy"; TypeFlags2[TypeFlags2["Intrinsic"] = 67359327] = "Intrinsic"; - TypeFlags2[TypeFlags2["Primitive"] = 134348796] = "Primitive"; TypeFlags2[TypeFlags2["StringLike"] = 402653316] = "StringLike"; TypeFlags2[TypeFlags2["NumberLike"] = 296] = "NumberLike"; TypeFlags2[TypeFlags2["BigIntLike"] = 2112] = "BigIntLike"; @@ -4452,6 +4452,7 @@ TypeFlags2[TypeFlags2["EnumLike"] = 1056] = "EnumLike"; TypeFlags2[TypeFlags2["ESSymbolLike"] = 12288] = "ESSymbolLike"; TypeFlags2[TypeFlags2["VoidLike"] = 49152] = "VoidLike"; + TypeFlags2[TypeFlags2["Primitive"] = 402784252] = "Primitive"; TypeFlags2[TypeFlags2["DefinitelyNonNullable"] = 470302716] = "DefinitelyNonNullable"; TypeFlags2[TypeFlags2["DisjointDomains"] = 469892092] = "DisjointDomains"; TypeFlags2[TypeFlags2["UnionOrIntersection"] = 3145728] = "UnionOrIntersection"; @@ -4465,7 +4466,7 @@ TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable"; TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton"; TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable"; - TypeFlags2[TypeFlags2["IncludesMask"] = 205258751] = "IncludesMask"; + TypeFlags2[TypeFlags2["IncludesMask"] = 473694207] = "IncludesMask"; TypeFlags2[TypeFlags2["IncludesMissingType"] = 262144 /* TypeParameter */] = "IncludesMissingType"; TypeFlags2[TypeFlags2["IncludesNonWideningType"] = 4194304 /* Index */] = "IncludesNonWideningType"; TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard"; @@ -4646,6 +4647,7 @@ })(DiagnosticCategory || {}); ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => { ModuleResolutionKind2[ModuleResolutionKind2["Classic"] = 1] = "Classic"; + ModuleResolutionKind2[ModuleResolutionKind2["NodeJs"] = 2] = "NodeJs"; ModuleResolutionKind2[ModuleResolutionKind2["Node10"] = 2] = "Node10"; ModuleResolutionKind2[ModuleResolutionKind2["Node16"] = 3] = "Node16"; ModuleResolutionKind2[ModuleResolutionKind2["NodeNext"] = 99] = "NodeNext"; @@ -5210,12 +5212,6 @@ kind: 4 /* MultiLine */ } }; - DeprecationVersion = /* @__PURE__ */ ((DeprecationVersion2) => { - DeprecationVersion2["v5_0"] = "5.0"; - DeprecationVersion2["v5_5"] = "5.5"; - DeprecationVersion2["v6_0"] = "6.0"; - return DeprecationVersion2; - })(DeprecationVersion || {}); } }); @@ -8140,12 +8136,14 @@ Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."), An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."), Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."), - Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecat_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), - Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."), + Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), + Option_0_has_been_removed_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."), Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."), Option_0_is_redundant_and_cannot_be_specified_with_option_1: diag(5104, 1 /* Error */, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."), Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: diag(5105, 1 /* Error */, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."), Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), + Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), + Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -9582,8 +9580,8 @@ var text = textInitial; var pos; var end; - var startPos; - var tokenPos; + var fullStartPos; + var tokenStart; var token; var tokenValue; var tokenFlags; @@ -9591,18 +9589,21 @@ var inJSDocType = 0; setText(text, start, length2); var scanner2 = { - getStartPos: () => startPos, + getTokenFullStart: () => fullStartPos, + getStartPos: () => fullStartPos, + getTokenEnd: () => pos, getTextPos: () => pos, getToken: () => token, - getTokenPos: () => tokenPos, - getTokenText: () => text.substring(tokenPos, pos), + getTokenStart: () => tokenStart, + getTokenPos: () => tokenStart, + getTokenText: () => text.substring(tokenStart, pos), getTokenValue: () => tokenValue, hasUnicodeEscape: () => (tokenFlags & 1024 /* UnicodeEscape */) !== 0, hasExtendedUnicodeEscape: () => (tokenFlags & 8 /* ExtendedUnicodeEscape */) !== 0, hasPrecedingLineBreak: () => (tokenFlags & 1 /* PrecedingLineBreak */) !== 0, hasPrecedingJSDocComment: () => (tokenFlags & 2 /* PrecedingJSDocComment */) !== 0, - isIdentifier: () => token === 79 /* Identifier */ || token > 116 /* LastReservedWord */, - isReservedWord: () => token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */, + isIdentifier: () => token === 79 /* Identifier */ || token > 117 /* LastReservedWord */, + isReservedWord: () => token >= 82 /* FirstReservedWord */ && token <= 117 /* LastReservedWord */, isUnterminated: () => (tokenFlags & 4 /* Unterminated */) !== 0, getCommentDirectives: () => commentDirectives, getNumericLiteralFlags: () => tokenFlags & 1008 /* NumericLiteralFlags */, @@ -9622,6 +9623,7 @@ reScanInvalidIdentifier, scanJsxToken, scanJsDocToken, + scanJSDocCommentTextToken, scan, getText, clearCommentDirectives, @@ -9629,7 +9631,8 @@ setScriptTarget, setLanguageVariant, setOnError, - setTextPos, + resetTokenState, + setTextPos: resetTokenState, setInJSDocType, tryScan, lookAhead, @@ -9639,7 +9642,7 @@ Object.defineProperty(scanner2, "__debugShowCurrentPositionInText", { get: () => { const text2 = scanner2.getText(); - return text2.slice(0, scanner2.getStartPos()) + "\u2551" + text2.slice(scanner2.getStartPos()); + return text2.slice(0, scanner2.getTokenFullStart()) + "\u2551" + text2.slice(scanner2.getTokenFullStart()); } }); } @@ -10162,11 +10165,11 @@ } } function scan() { - startPos = pos; + fullStartPos = pos; tokenFlags = 0 /* None */; let asteriskSeen = false; while (true) { - tokenPos = pos; + tokenStart = pos; if (pos >= end) { return token = 1 /* EndOfFileToken */; } @@ -10325,9 +10328,9 @@ } commentDirectives = appendIfCommentDirective( commentDirectives, - text.slice(tokenPos, pos), + text.slice(tokenStart, pos), commentDirectiveRegExSingleLine, - tokenPos + tokenStart ); if (skipTrivia2) { continue; @@ -10341,7 +10344,7 @@ tokenFlags |= 2 /* PrecedingJSDocComment */; } let commentClosed = false; - let lastLineStart = tokenPos; + let lastLineStart = tokenStart; while (pos < end) { const ch2 = text.charCodeAt(pos); if (ch2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { @@ -10619,7 +10622,7 @@ } function reScanInvalidIdentifier() { Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."); - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; tokenFlags = 0; const ch = codePointAt(text, pos); const identifierKind = scanIdentifier(ch, 99 /* ESNext */); @@ -10635,7 +10638,7 @@ pos += charSize(ch); while (pos < end && isIdentifierPart(ch = codePointAt(text, pos), languageVersion2)) pos += charSize(ch); - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } @@ -10666,12 +10669,12 @@ } function reScanAsteriskEqualsToken() { Debug.assert(token === 66 /* AsteriskEqualsToken */, "'reScanAsteriskEqualsToken' should only be called on a '*='"); - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 63 /* EqualsToken */; } function reScanSlashToken() { if (token === 43 /* SlashToken */ || token === 68 /* SlashEqualsToken */) { - let p = tokenPos + 1; + let p = tokenStart + 1; let inEscape = false; let inCharacterClass = false; while (true) { @@ -10704,7 +10707,7 @@ p++; } pos = p; - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); token = 13 /* RegularExpressionLiteral */; } return token; @@ -10737,41 +10740,41 @@ } function reScanTemplateToken(isTaggedTemplate) { Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); - pos = tokenPos; + pos = tokenStart; return token = scanTemplateAndSetTokenValue(isTaggedTemplate); } function reScanTemplateHeadOrNoSubstitutionTemplate() { - pos = tokenPos; + pos = tokenStart; return token = scanTemplateAndSetTokenValue( /* isTaggedTemplate */ true ); } function reScanJsxToken(allowMultilineJsxText = true) { - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; return token = scanJsxToken(allowMultilineJsxText); } function reScanLessThanToken() { if (token === 47 /* LessThanLessThanToken */) { - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 29 /* LessThanToken */; } return token; } function reScanHashToken() { if (token === 80 /* PrivateIdentifier */) { - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 62 /* HashToken */; } return token; } function reScanQuestionToken() { Debug.assert(token === 60 /* QuestionQuestionToken */, "'reScanQuestionToken' should only be called on a '??'"); - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 57 /* QuestionToken */; } function scanJsxToken(allowMultilineJsxText = true) { - startPos = tokenPos = pos; + fullStartPos = tokenStart = pos; if (pos >= end) { return token = 1 /* EndOfFileToken */; } @@ -10816,7 +10819,7 @@ } pos++; } - tokenValue = text.substring(startPos, pos); + tokenValue = text.substring(fullStartPos, pos); return firstNonWhitespace === -1 ? 12 /* JsxTextAllWhiteSpaces */ : 11 /* JsxText */; } function scanJsxIdentifier() { @@ -10850,7 +10853,7 @@ return token; } function scanJsxAttributeValue() { - startPos = pos; + fullStartPos = pos; switch (text.charCodeAt(pos)) { case 34 /* doubleQuote */: case 39 /* singleQuote */: @@ -10864,11 +10867,32 @@ } } function reScanJsxAttributeValue() { - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; return scanJsxAttributeValue(); } + function scanJSDocCommentTextToken(inBackticks) { + fullStartPos = tokenStart = pos; + tokenFlags = 0 /* None */; + if (pos >= end) { + return token = 1 /* EndOfFileToken */; + } + for (let ch = text.charCodeAt(pos); pos < end && (!isLineBreak(ch) && ch !== 96 /* backtick */); ch = codePointAt(text, ++pos)) { + if (!inBackticks) { + if (ch === 123 /* openBrace */) { + break; + } else if (ch === 64 /* at */ && pos - 1 >= 0 && isWhiteSpaceSingleLine(text.charCodeAt(pos - 1)) && !(pos + 1 < end && isWhiteSpaceLike(text.charCodeAt(pos + 1)))) { + break; + } + } + } + if (pos === tokenStart) { + return scanJsDocToken(); + } + tokenValue = text.substring(tokenStart, pos); + return token = 81 /* JSDocCommentTextToken */; + } function scanJsDocToken() { - startPos = tokenPos = pos; + fullStartPos = tokenStart = pos; tokenFlags = 0 /* None */; if (pos >= end) { return token = 1 /* EndOfFileToken */; @@ -10940,7 +10964,7 @@ let char = ch; while (pos < end && isIdentifierPart(char = codePointAt(text, pos), languageVersion) || text.charCodeAt(pos) === 45 /* minus */) pos += charSize(char); - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); if (char === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } @@ -10951,16 +10975,16 @@ } function speculationHelper(callback, isLookahead) { const savePos = pos; - const saveStartPos = startPos; - const saveTokenPos = tokenPos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; const saveToken = token; const saveTokenValue = tokenValue; const saveTokenFlags = tokenFlags; const result = callback(); if (!result || isLookahead) { pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; token = saveToken; tokenValue = saveTokenValue; tokenFlags = saveTokenFlags; @@ -10970,8 +10994,8 @@ function scanRange(start2, length3, callback) { const saveEnd = end; const savePos = pos; - const saveStartPos = startPos; - const saveTokenPos = tokenPos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; const saveToken = token; const saveTokenValue = tokenValue; const saveTokenFlags = tokenFlags; @@ -10980,8 +11004,8 @@ const result = callback(); end = saveEnd; pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; token = saveToken; tokenValue = saveTokenValue; tokenFlags = saveTokenFlags; @@ -11011,7 +11035,7 @@ function setText(newText, start2, length3) { text = newText || ""; end = length3 === void 0 ? text.length : start2 + length3; - setTextPos(start2 || 0); + resetTokenState(start2 || 0); } function setOnError(errorCallback) { onError = errorCallback; @@ -11022,11 +11046,11 @@ function setLanguageVariant(variant) { languageVariant = variant; } - function setTextPos(textPos) { - Debug.assert(textPos >= 0); - pos = textPos; - startPos = textPos; - tokenPos = textPos; + function resetTokenState(position) { + Debug.assert(position >= 0); + pos = position; + fullStartPos = position; + tokenStart = position; token = 0 /* Unknown */; tokenValue = void 0; tokenFlags = 0 /* None */; @@ -11059,88 +11083,88 @@ "use strict"; init_ts2(); textToKeywordObj = { - abstract: 126 /* AbstractKeyword */, - accessor: 127 /* AccessorKeyword */, - any: 131 /* AnyKeyword */, - as: 128 /* AsKeyword */, - asserts: 129 /* AssertsKeyword */, - assert: 130 /* AssertKeyword */, - bigint: 160 /* BigIntKeyword */, - boolean: 134 /* BooleanKeyword */, - break: 81 /* BreakKeyword */, - case: 82 /* CaseKeyword */, - catch: 83 /* CatchKeyword */, - class: 84 /* ClassKeyword */, - continue: 86 /* ContinueKeyword */, - const: 85 /* ConstKeyword */, - ["constructor"]: 135 /* ConstructorKeyword */, - debugger: 87 /* DebuggerKeyword */, - declare: 136 /* DeclareKeyword */, - default: 88 /* DefaultKeyword */, - delete: 89 /* DeleteKeyword */, - do: 90 /* DoKeyword */, - else: 91 /* ElseKeyword */, - enum: 92 /* EnumKeyword */, - export: 93 /* ExportKeyword */, - extends: 94 /* ExtendsKeyword */, - false: 95 /* FalseKeyword */, - finally: 96 /* FinallyKeyword */, - for: 97 /* ForKeyword */, - from: 158 /* FromKeyword */, - function: 98 /* FunctionKeyword */, - get: 137 /* GetKeyword */, - if: 99 /* IfKeyword */, - implements: 117 /* ImplementsKeyword */, - import: 100 /* ImportKeyword */, - in: 101 /* InKeyword */, - infer: 138 /* InferKeyword */, - instanceof: 102 /* InstanceOfKeyword */, - interface: 118 /* InterfaceKeyword */, - intrinsic: 139 /* IntrinsicKeyword */, - is: 140 /* IsKeyword */, - keyof: 141 /* KeyOfKeyword */, - let: 119 /* LetKeyword */, - module: 142 /* ModuleKeyword */, - namespace: 143 /* NamespaceKeyword */, - never: 144 /* NeverKeyword */, - new: 103 /* NewKeyword */, - null: 104 /* NullKeyword */, - number: 148 /* NumberKeyword */, - object: 149 /* ObjectKeyword */, - package: 120 /* PackageKeyword */, - private: 121 /* PrivateKeyword */, - protected: 122 /* ProtectedKeyword */, - public: 123 /* PublicKeyword */, - override: 161 /* OverrideKeyword */, - out: 145 /* OutKeyword */, - readonly: 146 /* ReadonlyKeyword */, - require: 147 /* RequireKeyword */, - global: 159 /* GlobalKeyword */, - return: 105 /* ReturnKeyword */, - satisfies: 150 /* SatisfiesKeyword */, - set: 151 /* SetKeyword */, - static: 124 /* StaticKeyword */, - string: 152 /* StringKeyword */, - super: 106 /* SuperKeyword */, - switch: 107 /* SwitchKeyword */, - symbol: 153 /* SymbolKeyword */, - this: 108 /* ThisKeyword */, - throw: 109 /* ThrowKeyword */, - true: 110 /* TrueKeyword */, - try: 111 /* TryKeyword */, - type: 154 /* TypeKeyword */, - typeof: 112 /* TypeOfKeyword */, - undefined: 155 /* UndefinedKeyword */, - unique: 156 /* UniqueKeyword */, - unknown: 157 /* UnknownKeyword */, - var: 113 /* VarKeyword */, - void: 114 /* VoidKeyword */, - while: 115 /* WhileKeyword */, - with: 116 /* WithKeyword */, - yield: 125 /* YieldKeyword */, - async: 132 /* AsyncKeyword */, - await: 133 /* AwaitKeyword */, - of: 162 /* OfKeyword */ + abstract: 127 /* AbstractKeyword */, + accessor: 128 /* AccessorKeyword */, + any: 132 /* AnyKeyword */, + as: 129 /* AsKeyword */, + asserts: 130 /* AssertsKeyword */, + assert: 131 /* AssertKeyword */, + bigint: 161 /* BigIntKeyword */, + boolean: 135 /* BooleanKeyword */, + break: 82 /* BreakKeyword */, + case: 83 /* CaseKeyword */, + catch: 84 /* CatchKeyword */, + class: 85 /* ClassKeyword */, + continue: 87 /* ContinueKeyword */, + const: 86 /* ConstKeyword */, + ["constructor"]: 136 /* ConstructorKeyword */, + debugger: 88 /* DebuggerKeyword */, + declare: 137 /* DeclareKeyword */, + default: 89 /* DefaultKeyword */, + delete: 90 /* DeleteKeyword */, + do: 91 /* DoKeyword */, + else: 92 /* ElseKeyword */, + enum: 93 /* EnumKeyword */, + export: 94 /* ExportKeyword */, + extends: 95 /* ExtendsKeyword */, + false: 96 /* FalseKeyword */, + finally: 97 /* FinallyKeyword */, + for: 98 /* ForKeyword */, + from: 159 /* FromKeyword */, + function: 99 /* FunctionKeyword */, + get: 138 /* GetKeyword */, + if: 100 /* IfKeyword */, + implements: 118 /* ImplementsKeyword */, + import: 101 /* ImportKeyword */, + in: 102 /* InKeyword */, + infer: 139 /* InferKeyword */, + instanceof: 103 /* InstanceOfKeyword */, + interface: 119 /* InterfaceKeyword */, + intrinsic: 140 /* IntrinsicKeyword */, + is: 141 /* IsKeyword */, + keyof: 142 /* KeyOfKeyword */, + let: 120 /* LetKeyword */, + module: 143 /* ModuleKeyword */, + namespace: 144 /* NamespaceKeyword */, + never: 145 /* NeverKeyword */, + new: 104 /* NewKeyword */, + null: 105 /* NullKeyword */, + number: 149 /* NumberKeyword */, + object: 150 /* ObjectKeyword */, + package: 121 /* PackageKeyword */, + private: 122 /* PrivateKeyword */, + protected: 123 /* ProtectedKeyword */, + public: 124 /* PublicKeyword */, + override: 162 /* OverrideKeyword */, + out: 146 /* OutKeyword */, + readonly: 147 /* ReadonlyKeyword */, + require: 148 /* RequireKeyword */, + global: 160 /* GlobalKeyword */, + return: 106 /* ReturnKeyword */, + satisfies: 151 /* SatisfiesKeyword */, + set: 152 /* SetKeyword */, + static: 125 /* StaticKeyword */, + string: 153 /* StringKeyword */, + super: 107 /* SuperKeyword */, + switch: 108 /* SwitchKeyword */, + symbol: 154 /* SymbolKeyword */, + this: 109 /* ThisKeyword */, + throw: 110 /* ThrowKeyword */, + true: 111 /* TrueKeyword */, + try: 112 /* TryKeyword */, + type: 155 /* TypeKeyword */, + typeof: 113 /* TypeOfKeyword */, + undefined: 156 /* UndefinedKeyword */, + unique: 157 /* UniqueKeyword */, + unknown: 158 /* UnknownKeyword */, + var: 114 /* VarKeyword */, + void: 115 /* VoidKeyword */, + while: 116 /* WhileKeyword */, + with: 117 /* WithKeyword */, + yield: 126 /* YieldKeyword */, + async: 133 /* AsyncKeyword */, + await: 134 /* AwaitKeyword */, + of: 163 /* OfKeyword */ }; textToKeyword = new Map(Object.entries(textToKeywordObj)); textToToken = new Map(Object.entries({ @@ -11362,16 +11386,16 @@ ); } function getTypeParameterOwner(d) { - if (d && d.kind === 165 /* TypeParameter */) { + if (d && d.kind === 166 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 261 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 262 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent2) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 173 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 174 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -11397,14 +11421,14 @@ node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 257 /* VariableDeclaration */) { + if (node.kind === 258 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 258 /* VariableDeclarationList */) { + if (node && node.kind === 259 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 240 /* VariableStatement */) { + if (node && node.kind === 241 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -11536,30 +11560,30 @@ return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 223 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { + if (expr.kind === 224 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return expr.name; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 214 /* ParenthesizedExpression */: { + case 215 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 253 /* LabeledStatement */: { + case 254 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -11590,16 +11614,16 @@ switch (declaration.kind) { case 79 /* Identifier */: return declaration; - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: { + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 163 /* QualifiedName */) { + if (name.kind === 164 /* QualifiedName */) { return name.right; } break; } - case 210 /* CallExpression */: - case 223 /* BinaryExpression */: { + case 211 /* CallExpression */: + case 224 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -11615,15 +11639,15 @@ return void 0; } } - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 343 /* JSDocEnumTag */: + case 344 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -11870,10 +11894,10 @@ return getJSDocTags(node).filter((doc) => doc.kind === kind); } function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 324 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 325 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 327 /* JSDocLink */ ? "link" : link.kind === 328 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 328 /* JSDocLink */ ? "link" : link.kind === 329 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -11889,7 +11913,7 @@ return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 323 /* JSDoc */); + Debug.assert(node.parent.kind === 324 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -11917,7 +11941,7 @@ return node.kind === 79 /* Identifier */ || node.kind === 80 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 175 /* SetAccessor */ || node.kind === 174 /* GetAccessor */; + return node.kind === 176 /* SetAccessor */ || node.kind === 175 /* GetAccessor */; } function isPropertyAccessChain(node) { return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); @@ -11930,7 +11954,7 @@ } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */ || kind === 210 /* CallExpression */ || kind === 232 /* NonNullExpression */); + return !!(node.flags & 32 /* OptionalChain */) && (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */ || kind === 211 /* CallExpression */ || kind === 233 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -11942,7 +11966,7 @@ return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + return node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -11954,34 +11978,34 @@ return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 249 /* BreakStatement */ || node.kind === 248 /* ContinueStatement */; + return node.kind === 250 /* BreakStatement */ || node.kind === 249 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 277 /* NamespaceExport */ || node.kind === 276 /* NamedExports */; + return node.kind === 278 /* NamespaceExport */ || node.kind === 277 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 305 /* UnparsedText */: - case 306 /* UnparsedInternalText */: + case 306 /* UnparsedText */: + case 307 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 303 /* UnparsedPrologue */ || node.kind === 307 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 304 /* UnparsedPrologue */ || node.kind === 308 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 351 /* JSDocPropertyTag */ || node.kind === 344 /* JSDocParameterTag */; + return node.kind === 352 /* JSDocPropertyTag */ || node.kind === 345 /* JSDocParameterTag */; } function isNode(node) { return isNodeKind(node.kind); } function isNodeKind(kind) { - return kind >= 163 /* FirstNode */; + return kind >= 164 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 162 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 163 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -11997,11 +12021,11 @@ } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: case 13 /* RegularExpressionLiteral */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: return true; } return false; @@ -12021,23 +12045,23 @@ } function isTypeOnlyImportDeclaration(node) { switch (node.kind) { - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.isTypeOnly; - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: return node.isTypeOnly; } return false; } function isTypeOnlyExportDeclaration(node) { switch (node.kind) { - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause; - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return node.parent.isTypeOnly; } return false; @@ -12067,21 +12091,21 @@ } function isModifierKind(token) { switch (token) { - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 132 /* AsyncKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 88 /* DefaultKeyword */: - case 93 /* ExportKeyword */: - case 101 /* InKeyword */: - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 124 /* StaticKeyword */: - case 145 /* OutKeyword */: - case 161 /* OverrideKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 133 /* AsyncKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 89 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 102 /* InKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 125 /* StaticKeyword */: + case 146 /* OutKeyword */: + case 162 /* OverrideKeyword */: return true; } return false; @@ -12090,22 +12114,22 @@ return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 124 /* StaticKeyword */ || idToken === 161 /* OverrideKeyword */ || idToken === 127 /* AccessorKeyword */; + return isParameterPropertyModifier(idToken) || idToken === 125 /* StaticKeyword */ || idToken === 162 /* OverrideKeyword */ || idToken === 128 /* AccessorKeyword */; } function isModifier(node) { return isModifierKind(node.kind); } function isEntityName(node) { const kind = node.kind; - return kind === 163 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 164 /* QualifiedName */ || kind === 79 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 164 /* ComputedPropertyName */; + return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 165 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 203 /* ObjectBindingPattern */ || kind === 204 /* ArrayBindingPattern */; + return kind === 79 /* Identifier */ || kind === 204 /* ObjectBindingPattern */ || kind === 205 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -12117,17 +12141,17 @@ return node && isFunctionLikeDeclarationKind(node.kind); } function isBooleanLiteral(node) { - return node.kind === 110 /* TrueKeyword */ || node.kind === 95 /* FalseKeyword */; + return node.kind === 111 /* TrueKeyword */ || node.kind === 96 /* FalseKeyword */; } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: return false; @@ -12135,14 +12159,14 @@ } function isFunctionLikeKind(kind) { switch (kind) { - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 181 /* FunctionType */: - case 320 /* JSDocFunctionType */: - case 182 /* ConstructorType */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 182 /* FunctionType */: + case 321 /* JSDocFunctionType */: + case 183 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -12153,22 +12177,22 @@ } function isClassElement(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 169 /* PropertyDeclaration */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 178 /* IndexSignature */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 237 /* SemicolonClassElement */; + return kind === 174 /* Constructor */ || kind === 170 /* PropertyDeclaration */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 179 /* IndexSignature */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 238 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */); + return node && (node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */); } function isAccessor(node) { - return node && (node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */); + return node && (node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -12176,10 +12200,10 @@ } function isNamedClassElement(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: return true; default: return false; @@ -12190,22 +12214,22 @@ } function isTypeElement(node) { const kind = node.kind; - return kind === 177 /* ConstructSignature */ || kind === 176 /* CallSignature */ || kind === 168 /* PropertySignature */ || kind === 170 /* MethodSignature */ || kind === 178 /* IndexSignature */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 178 /* ConstructSignature */ || kind === 177 /* CallSignature */ || kind === 169 /* PropertySignature */ || kind === 171 /* MethodSignature */ || kind === 179 /* IndexSignature */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 301 /* SpreadAssignment */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 302 /* SpreadAssignment */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return true; } return false; @@ -12213,23 +12237,23 @@ function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 204 /* ArrayBindingPattern */ || kind === 203 /* ObjectBindingPattern */; + return kind === 205 /* ArrayBindingPattern */ || kind === 204 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 206 /* ArrayLiteralExpression */ || kind === 207 /* ObjectLiteralExpression */; + return kind === 207 /* ArrayLiteralExpression */ || kind === 208 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 205 /* BindingElement */ || kind === 229 /* OmittedExpression */; + return kind === 206 /* BindingElement */ || kind === 230 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: return true; } return false; @@ -12242,40 +12266,40 @@ } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 203 /* ObjectBindingPattern */: - case 207 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 208 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return true; } return false; } function isArrayBindingOrAssignmentElement(node) { switch (node.kind) { - case 205 /* BindingElement */: - case 229 /* OmittedExpression */: - case 227 /* SpreadElement */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: + case 206 /* BindingElement */: + case 230 /* OmittedExpression */: + case 228 /* SpreadElement */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return true; } return isAssignmentExpression( @@ -12286,50 +12310,50 @@ } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */; + return kind === 209 /* PropertyAccessExpression */ || kind === 164 /* QualifiedName */ || kind === 203 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */; + return kind === 209 /* PropertyAccessExpression */ || kind === 164 /* QualifiedName */; } function isCallLikeExpression(node) { switch (node.kind) { - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 167 /* Decorator */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 168 /* Decorator */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 210 /* CallExpression */ || node.kind === 211 /* NewExpression */; + return node.kind === 211 /* CallExpression */ || node.kind === 212 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 225 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; + return kind === 226 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 211 /* NewExpression */: - case 210 /* CallExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: - case 212 /* TaggedTemplateExpression */: - case 206 /* ArrayLiteralExpression */: - case 214 /* ParenthesizedExpression */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 212 /* NewExpression */: + case 211 /* CallExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: + case 213 /* TaggedTemplateExpression */: + case 207 /* ArrayLiteralExpression */: + case 215 /* ParenthesizedExpression */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 13 /* RegularExpressionLiteral */: @@ -12337,17 +12361,17 @@ case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: - case 108 /* ThisKeyword */: - case 110 /* TrueKeyword */: - case 106 /* SuperKeyword */: - case 232 /* NonNullExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 233 /* MetaProperty */: - case 100 /* ImportKeyword */: - case 279 /* MissingDeclaration */: + case 226 /* TemplateExpression */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 109 /* ThisKeyword */: + case 111 /* TrueKeyword */: + case 107 /* SuperKeyword */: + case 233 /* NonNullExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 234 /* MetaProperty */: + case 101 /* ImportKeyword */: + case 280 /* MissingDeclaration */: return true; default: return false; @@ -12358,13 +12382,13 @@ } function isUnaryExpressionKind(kind) { switch (kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: - case 217 /* DeleteExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 220 /* AwaitExpression */: - case 213 /* TypeAssertionExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 218 /* DeleteExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 221 /* AwaitExpression */: + case 214 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -12372,9 +12396,9 @@ } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return true; - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; default: return false; @@ -12382,10 +12406,10 @@ } function isLiteralTypeLiteral(node) { switch (node.kind) { - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 221 /* PrefixUnaryExpression */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 222 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -12396,16 +12420,16 @@ } function isExpressionKind(kind) { switch (kind) { - case 224 /* ConditionalExpression */: - case 226 /* YieldExpression */: - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 227 /* SpreadElement */: - case 231 /* AsExpression */: - case 229 /* OmittedExpression */: - case 357 /* CommaListExpression */: - case 356 /* PartiallyEmittedExpression */: - case 235 /* SatisfiesExpression */: + case 225 /* ConditionalExpression */: + case 227 /* YieldExpression */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 228 /* SpreadElement */: + case 232 /* AsExpression */: + case 230 /* OmittedExpression */: + case 358 /* CommaListExpression */: + case 357 /* PartiallyEmittedExpression */: + case 236 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -12413,20 +12437,20 @@ } function isAssertionExpression(node) { const kind = node.kind; - return kind === 213 /* TypeAssertionExpression */ || kind === 231 /* AsExpression */; + return kind === 214 /* TypeAssertionExpression */ || kind === 232 /* AsExpression */; } function isNotEmittedOrPartiallyEmittedNode(node) { return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return true; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -12444,7 +12468,7 @@ return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); } function isForInOrOfStatement(node) { - return node.kind === 246 /* ForInStatement */ || node.kind === 247 /* ForOfStatement */; + return node.kind === 247 /* ForInStatement */ || node.kind === 248 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -12457,89 +12481,89 @@ } function isModuleBody(node) { const kind = node.kind; - return kind === 265 /* ModuleBlock */ || kind === 264 /* ModuleDeclaration */ || kind === 79 /* Identifier */; + return kind === 266 /* ModuleBlock */ || kind === 265 /* ModuleDeclaration */ || kind === 79 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 265 /* ModuleBlock */ || kind === 264 /* ModuleDeclaration */; + return kind === 266 /* ModuleBlock */ || kind === 265 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 264 /* ModuleDeclaration */; + return kind === 79 /* Identifier */ || kind === 265 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 272 /* NamedImports */ || kind === 271 /* NamespaceImport */; + return kind === 273 /* NamedImports */ || kind === 272 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */ || node.kind === 263 /* EnumDeclaration */; + return node.kind === 265 /* ModuleDeclaration */ || node.kind === 264 /* EnumDeclaration */; } function canHaveSymbol(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 205 /* BindingElement */: - case 210 /* CallExpression */: - case 176 /* CallSignature */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 172 /* ClassStaticBlockDeclaration */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 209 /* ElementAccessExpression */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: - case 278 /* ExportSpecifier */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 206 /* BindingElement */: + case 211 /* CallExpression */: + case 177 /* CallSignature */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 173 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 210 /* ElementAccessExpression */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: + case 279 /* ExportSpecifier */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: case 79 /* Identifier */: - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: - case 320 /* JSDocFunctionType */: - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: - case 326 /* JSDocSignature */: - case 349 /* JSDocTypedefTag */: - case 325 /* JSDocTypeLiteral */: - case 288 /* JsxAttribute */: - case 289 /* JsxAttributes */: - case 290 /* JsxSpreadAttribute */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 199 /* NamedTupleMember */: - case 277 /* NamespaceExport */: - case 267 /* NamespaceExportDeclaration */: - case 271 /* NamespaceImport */: - case 211 /* NewExpression */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: + case 321 /* JSDocFunctionType */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 327 /* JSDocSignature */: + case 350 /* JSDocTypedefTag */: + case 326 /* JSDocTypeLiteral */: + case 289 /* JsxAttribute */: + case 290 /* JsxAttributes */: + case 291 /* JsxSpreadAttribute */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 200 /* NamedTupleMember */: + case 278 /* NamespaceExport */: + case 268 /* NamespaceExportDeclaration */: + case 272 /* NamespaceImport */: + case 212 /* NewExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - case 207 /* ObjectLiteralExpression */: - case 166 /* Parameter */: - case 208 /* PropertyAccessExpression */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 308 /* SourceFile */: - case 301 /* SpreadAssignment */: + case 208 /* ObjectLiteralExpression */: + case 167 /* Parameter */: + case 209 /* PropertyAccessExpression */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 309 /* SourceFile */: + case 302 /* SpreadAssignment */: case 10 /* StringLiteral */: - case 262 /* TypeAliasDeclaration */: - case 184 /* TypeLiteral */: - case 165 /* TypeParameter */: - case 257 /* VariableDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 185 /* TypeLiteral */: + case 166 /* TypeParameter */: + case 258 /* VariableDeclaration */: return true; default: return false; @@ -12547,53 +12571,53 @@ } function canHaveLocals(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 238 /* Block */: - case 176 /* CallSignature */: - case 266 /* CaseBlock */: - case 295 /* CatchClause */: - case 172 /* ClassStaticBlockDeclaration */: - case 191 /* ConditionalType */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: - case 178 /* IndexSignature */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 349 /* JSDocTypedefTag */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 175 /* SetAccessor */: - case 308 /* SourceFile */: - case 262 /* TypeAliasDeclaration */: + case 217 /* ArrowFunction */: + case 239 /* Block */: + case 177 /* CallSignature */: + case 267 /* CaseBlock */: + case 296 /* CatchClause */: + case 173 /* ClassStaticBlockDeclaration */: + case 192 /* ConditionalType */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: + case 179 /* IndexSignature */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 350 /* JSDocTypedefTag */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 176 /* SetAccessor */: + case 309 /* SourceFile */: + case 263 /* TypeAliasDeclaration */: return true; default: return false; } } function isDeclarationKind(kind) { - return kind === 216 /* ArrowFunction */ || kind === 205 /* BindingElement */ || kind === 260 /* ClassDeclaration */ || kind === 228 /* ClassExpression */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 173 /* Constructor */ || kind === 263 /* EnumDeclaration */ || kind === 302 /* EnumMember */ || kind === 278 /* ExportSpecifier */ || kind === 259 /* FunctionDeclaration */ || kind === 215 /* FunctionExpression */ || kind === 174 /* GetAccessor */ || kind === 270 /* ImportClause */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 273 /* ImportSpecifier */ || kind === 261 /* InterfaceDeclaration */ || kind === 288 /* JsxAttribute */ || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 264 /* ModuleDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 271 /* NamespaceImport */ || kind === 277 /* NamespaceExport */ || kind === 166 /* Parameter */ || kind === 299 /* PropertyAssignment */ || kind === 169 /* PropertyDeclaration */ || kind === 168 /* PropertySignature */ || kind === 175 /* SetAccessor */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 262 /* TypeAliasDeclaration */ || kind === 165 /* TypeParameter */ || kind === 257 /* VariableDeclaration */ || kind === 349 /* JSDocTypedefTag */ || kind === 341 /* JSDocCallbackTag */ || kind === 351 /* JSDocPropertyTag */; + return kind === 217 /* ArrowFunction */ || kind === 206 /* BindingElement */ || kind === 261 /* ClassDeclaration */ || kind === 229 /* ClassExpression */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 174 /* Constructor */ || kind === 264 /* EnumDeclaration */ || kind === 303 /* EnumMember */ || kind === 279 /* ExportSpecifier */ || kind === 260 /* FunctionDeclaration */ || kind === 216 /* FunctionExpression */ || kind === 175 /* GetAccessor */ || kind === 271 /* ImportClause */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 274 /* ImportSpecifier */ || kind === 262 /* InterfaceDeclaration */ || kind === 289 /* JsxAttribute */ || kind === 172 /* MethodDeclaration */ || kind === 171 /* MethodSignature */ || kind === 265 /* ModuleDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 272 /* NamespaceImport */ || kind === 278 /* NamespaceExport */ || kind === 167 /* Parameter */ || kind === 300 /* PropertyAssignment */ || kind === 170 /* PropertyDeclaration */ || kind === 169 /* PropertySignature */ || kind === 176 /* SetAccessor */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 263 /* TypeAliasDeclaration */ || kind === 166 /* TypeParameter */ || kind === 258 /* VariableDeclaration */ || kind === 350 /* JSDocTypedefTag */ || kind === 342 /* JSDocCallbackTag */ || kind === 352 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 259 /* FunctionDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 267 /* NamespaceExportDeclaration */; + return kind === 260 /* FunctionDeclaration */ || kind === 280 /* MissingDeclaration */ || kind === 261 /* ClassDeclaration */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 275 /* ExportAssignment */ || kind === 268 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 355 /* NotEmittedStatement */ || kind === 359 /* EndOfDeclarationMarker */ || kind === 358 /* MergeDeclarationMarker */; + return kind === 250 /* BreakStatement */ || kind === 249 /* ContinueStatement */ || kind === 257 /* DebuggerStatement */ || kind === 244 /* DoStatement */ || kind === 242 /* ExpressionStatement */ || kind === 240 /* EmptyStatement */ || kind === 247 /* ForInStatement */ || kind === 248 /* ForOfStatement */ || kind === 246 /* ForStatement */ || kind === 243 /* IfStatement */ || kind === 254 /* LabeledStatement */ || kind === 251 /* ReturnStatement */ || kind === 253 /* SwitchStatement */ || kind === 255 /* ThrowStatement */ || kind === 256 /* TryStatement */ || kind === 241 /* VariableStatement */ || kind === 245 /* WhileStatement */ || kind === 252 /* WithStatement */ || kind === 356 /* NotEmittedStatement */ || kind === 360 /* EndOfDeclarationMarker */ || kind === 359 /* MergeDeclarationMarker */; } function isDeclaration(node) { - if (node.kind === 165 /* TypeParameter */) { - return node.parent && node.parent.kind !== 348 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 166 /* TypeParameter */) { + return node.parent && node.parent.kind !== 349 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -12608,10 +12632,10 @@ return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 238 /* Block */) + if (node.kind !== 239 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 255 /* TryStatement */ || node.parent.kind === 295 /* CatchClause */) { + if (node.parent.kind === 256 /* TryStatement */ || node.parent.kind === 296 /* CatchClause */) { return false; } } @@ -12619,50 +12643,50 @@ } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 238 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 239 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 280 /* ExternalModuleReference */ || kind === 163 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 281 /* ExternalModuleReference */ || kind === 164 /* QualifiedName */ || kind === 79 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 108 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 208 /* PropertyAccessExpression */; + return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 209 /* PropertyAccessExpression */; } function isJsxChild(node) { const kind = node.kind; - return kind === 281 /* JsxElement */ || kind === 291 /* JsxExpression */ || kind === 282 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 285 /* JsxFragment */; + return kind === 282 /* JsxElement */ || kind === 292 /* JsxExpression */ || kind === 283 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 286 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 288 /* JsxAttribute */ || kind === 290 /* JsxSpreadAttribute */; + return kind === 289 /* JsxAttribute */ || kind === 291 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 10 /* StringLiteral */ || kind === 291 /* JsxExpression */; + return kind === 10 /* StringLiteral */ || kind === 292 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 283 /* JsxOpeningElement */ || kind === 282 /* JsxSelfClosingElement */; + return kind === 284 /* JsxOpeningElement */ || kind === 283 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */; + return kind === 293 /* CaseClause */ || kind === 294 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */; + return node.kind >= 313 /* FirstJSDocNode */ && node.kind <= 354 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 323 /* JSDoc */ || node.kind === 322 /* JSDocNamepathType */ || node.kind === 324 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 324 /* JSDoc */ || node.kind === 323 /* JSDocNamepathType */ || node.kind === 325 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */; + return node.kind >= 331 /* FirstJSDocTagNode */ && node.kind <= 354 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 175 /* SetAccessor */; + return node.kind === 176 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 174 /* GetAccessor */; + return node.kind === 175 /* GetAccessor */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) @@ -12678,22 +12702,22 @@ } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: - case 299 /* PropertyAssignment */: - case 302 /* EnumMember */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: + case 300 /* PropertyAssignment */: + case 303 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 288 /* JsxAttribute */ || node.kind === 290 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 289 /* JsxAttribute */ || node.kind === 291 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 180 /* TypeReference */ || node.kind === 230 /* ExpressionWithTypeArguments */; + return node.kind === 181 /* TypeReference */ || node.kind === 231 /* ExpressionWithTypeArguments */; } function guessIndentation(lines) { let indentation = MAX_SMI_X86; @@ -12720,7 +12744,7 @@ return node.kind === 10 /* StringLiteral */ || node.kind === 14 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 327 /* JSDocLink */ || node.kind === 328 /* JSDocLinkCode */ || node.kind === 329 /* JSDocLinkPlain */; + return node.kind === 328 /* JSDocLink */ || node.kind === 329 /* JSDocLinkCode */ || node.kind === 330 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -12728,7 +12752,7 @@ } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 321 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 322 /* JSDocVariadicType */; } var unchangedTextChangeRange, supportedLocaleDirectories, MAX_SMI_X86; var init_utilitiesPublic = __esm({ @@ -12930,7 +12954,7 @@ } } function getSourceFileOfNode(node) { - while (node && node.kind !== 308 /* SourceFile */) { + while (node && node.kind !== 309 /* SourceFile */) { node = node.parent; } return node; @@ -12943,11 +12967,11 @@ } function isStatementWithLocals(node) { switch (node.kind) { - case 238 /* Block */: - case 266 /* CaseBlock */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return true; } return false; @@ -13106,7 +13130,7 @@ if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 355 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return skipTrivia( @@ -13621,7 +13645,7 @@ } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 257 /* VariableDeclaration */ && node.parent.kind === 295 /* CatchClause */; + return node.kind === 258 /* VariableDeclaration */ && node.parent.kind === 296 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 10 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -13639,10 +13663,10 @@ return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 264 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 265 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 308 /* SourceFile */ || node.kind === 264 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 309 /* SourceFile */ || node.kind === 265 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { return !!(module2.flags & 1024 /* GlobalAugmentation */); @@ -13652,9 +13676,9 @@ } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return isExternalModule(node.parent); - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -13701,24 +13725,24 @@ } function isBlockScope(node, parentNode) { switch (node.kind) { - case 308 /* SourceFile */: - case 266 /* CaseBlock */: - case 295 /* CatchClause */: - case 264 /* ModuleDeclaration */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 169 /* PropertyDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: + case 309 /* SourceFile */: + case 267 /* CaseBlock */: + case 296 /* CatchClause */: + case 265 /* ModuleDeclaration */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 170 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return true; - case 238 /* Block */: + case 239 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; @@ -13726,9 +13750,9 @@ function isDeclarationWithTypeParameters(node) { Debug.type(node); switch (node.kind) { - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: - case 326 /* JSDocSignature */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 327 /* JSDocSignature */: return true; default: assertType(node); @@ -13738,25 +13762,25 @@ function isDeclarationWithTypeParameterChildren(node) { Debug.type(node); switch (node.kind) { - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 320 /* JSDocFunctionType */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 348 /* JSDocTemplateTag */: - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 321 /* JSDocFunctionType */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 349 /* JSDocTemplateTag */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: assertType(node); @@ -13765,8 +13789,8 @@ } function isAnyImportSyntax(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: return true; default: return false; @@ -13777,15 +13801,15 @@ } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 240 /* VariableStatement */: - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 241 /* VariableStatement */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: return true; default: return false; @@ -13814,7 +13838,7 @@ return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 164 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 165 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a2; @@ -13826,7 +13850,7 @@ case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; @@ -13839,20 +13863,20 @@ } function entityNameToString(name) { switch (name.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return "this"; case 80 /* PrivateIdentifier */: case 79 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 314 /* JSDocMemberName */: + case 315 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); default: return Debug.assertNever(name); @@ -13939,8 +13963,8 @@ pos ); scanner2.scan(); - const start = scanner2.getTokenPos(); - return createTextSpanFromBounds(start, scanner2.getTextPos()); + const start = scanner2.getTokenStart(); + return createTextSpanFromBounds(start, scanner2.getTokenEnd()); } function scanTokenAtPosition(sourceFile, pos) { const scanner2 = createScanner( @@ -13958,7 +13982,7 @@ } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 238 /* Block */) { + if (node.body && node.body.kind === 239 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -13970,7 +13994,7 @@ function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 308 /* SourceFile */: { + case 309 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -13982,35 +14006,35 @@ } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 262 /* TypeAliasDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 271 /* NamespaceImport */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 263 /* TypeAliasDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 272 /* NamespaceImport */: errorNode = node.name; break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: { + case 293 /* CaseClause */: + case 294 /* DefaultClause */: { const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); } - case 250 /* ReturnStatement */: - case 226 /* YieldExpression */: { + case 251 /* ReturnStatement */: + case 227 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } @@ -14049,19 +14073,19 @@ return !!(getCombinedNodeFlags(node) & 1 /* Let */); } function isSuperCall(n) { - return n.kind === 210 /* CallExpression */ && n.expression.kind === 106 /* SuperKeyword */; + return n.kind === 211 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 210 /* CallExpression */ && n.expression.kind === 100 /* ImportKeyword */; + return n.kind === 211 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; } function isImportMeta(n) { - return isMetaProperty(n) && n.keywordToken === 100 /* ImportKeyword */ && n.name.escapedText === "meta"; + return isMetaProperty(n) && n.keywordToken === 101 /* ImportKeyword */ && n.name.escapedText === "meta"; } function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 241 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; + return node.kind === 242 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -14079,85 +14103,86 @@ return node.kind !== 11 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 166 /* Parameter */ || node.kind === 165 /* TypeParameter */ || node.kind === 215 /* FunctionExpression */ || node.kind === 216 /* ArrowFunction */ || node.kind === 214 /* ParenthesizedExpression */ || node.kind === 257 /* VariableDeclaration */ || node.kind === 278 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 167 /* Parameter */ || node.kind === 166 /* TypeParameter */ || node.kind === 216 /* FunctionExpression */ || node.kind === 217 /* ArrowFunction */ || node.kind === 215 /* ParenthesizedExpression */ || node.kind === 258 /* VariableDeclaration */ || node.kind === 279 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } function isPartOfTypeNode(node) { - if (179 /* FirstTypeNode */ <= node.kind && node.kind <= 202 /* LastTypeNode */) { + if (180 /* FirstTypeNode */ <= node.kind && node.kind <= 203 /* LastTypeNode */) { return true; } switch (node.kind) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 152 /* StringKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 149 /* ObjectKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 153 /* StringKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 150 /* ObjectKeyword */: + case 156 /* UndefinedKeyword */: + case 105 /* NullKeyword */: + case 145 /* NeverKeyword */: return true; - case 114 /* VoidKeyword */: - return node.parent.kind !== 219 /* VoidExpression */; - case 230 /* ExpressionWithTypeArguments */: + case 115 /* VoidKeyword */: + return node.parent.kind !== 220 /* VoidExpression */; + case 231 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 165 /* TypeParameter */: - return node.parent.kind === 197 /* MappedType */ || node.parent.kind === 192 /* InferType */; + case 166 /* TypeParameter */: + return node.parent.kind === 198 /* MappedType */ || node.parent.kind === 193 /* InferType */; case 79 /* Identifier */: - if (node.parent.kind === 163 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 164 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 79 /* Identifier */ || node.kind === 163 /* QualifiedName */ || node.kind === 208 /* PropertyAccessExpression */, + node.kind === 79 /* Identifier */ || node.kind === 164 /* QualifiedName */ || node.kind === 209 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 163 /* QualifiedName */: - case 208 /* PropertyAccessExpression */: - case 108 /* ThisKeyword */: { + case 164 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 109 /* ThisKeyword */: { const { parent: parent2 } = node; - if (parent2.kind === 183 /* TypeQuery */) { + if (parent2.kind === 184 /* TypeQuery */) { return false; } - if (parent2.kind === 202 /* ImportType */) { + if (parent2.kind === 203 /* ImportType */) { return !parent2.isTypeOf; } - if (179 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 202 /* LastTypeNode */) { + if (180 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 203 /* LastTypeNode */) { return true; } switch (parent2.kind) { - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isHeritageClause(parent2.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent2); - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return node === parent2.constraint; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return node === parent2.constraint; - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 166 /* Parameter */: - case 257 /* VariableDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 167 /* Parameter */: + case 258 /* VariableDeclaration */: return node === parent2.type; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return node === parent2.type; - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return node === parent2.type; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return node === parent2.type; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return contains(parent2.typeArguments, node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return false; } } @@ -14177,23 +14202,23 @@ return traverse(body); function traverse(node) { switch (node.kind) { - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitor(node); - case 266 /* CaseBlock */: - case 238 /* Block */: - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 251 /* WithStatement */: - case 252 /* SwitchStatement */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 253 /* LabeledStatement */: - case 255 /* TryStatement */: - case 295 /* CatchClause */: + case 267 /* CaseBlock */: + case 239 /* Block */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 252 /* WithStatement */: + case 253 /* SwitchStatement */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 254 /* LabeledStatement */: + case 256 /* TryStatement */: + case 296 /* CatchClause */: return forEachChild(node, traverse); } } @@ -14202,21 +14227,21 @@ return traverse(body); function traverse(node) { switch (node.kind) { - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 263 /* EnumDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 165 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -14227,9 +14252,9 @@ } } function getRestParameterElementType(node) { - if (node && node.kind === 185 /* ArrayType */) { + if (node && node.kind === 186 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 180 /* TypeReference */) { + } else if (node && node.kind === 181 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -14237,26 +14262,26 @@ } function getMembersOfDeclaration(node) { switch (node.kind) { - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 184 /* TypeLiteral */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 185 /* TypeLiteral */: return node.members; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 205 /* BindingElement */: - case 302 /* EnumMember */: - case 166 /* Parameter */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 300 /* ShorthandPropertyAssignment */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 303 /* EnumMember */: + case 167 /* Parameter */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 301 /* ShorthandPropertyAssignment */: + case 258 /* VariableDeclaration */: return true; } } @@ -14266,7 +14291,7 @@ return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 258 /* VariableDeclarationList */ && node.parent.parent.kind === 240 /* VariableStatement */; + return node.parent.kind === 259 /* VariableDeclarationList */ && node.parent.parent.kind === 241 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -14283,13 +14308,13 @@ } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return true; } return false; @@ -14299,20 +14324,20 @@ if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 253 /* LabeledStatement */) { + if (node.statement.kind !== 254 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 238 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 239 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 171 /* MethodDeclaration */ && node.parent.kind === 207 /* ObjectLiteralExpression */; + return node && node.kind === 172 /* MethodDeclaration */ && node.parent.kind === 208 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 171 /* MethodDeclaration */ || node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */) && (node.parent.kind === 207 /* ObjectLiteralExpression */ || node.parent.kind === 228 /* ClassExpression */); + return (node.kind === 172 /* MethodDeclaration */ || node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */) && (node.parent.kind === 208 /* ObjectLiteralExpression */ || node.parent.kind === 229 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -14322,7 +14347,7 @@ } function getPropertyAssignment(objectLiteral, key, key2) { return objectLiteral.properties.filter((property) => { - if (property.kind === 299 /* PropertyAssignment */) { + if (property.kind === 300 /* PropertyAssignment */) { const propName = tryGetTextOfPropertyName(property.name); return key === propName || !!key2 && key2 === propName; } @@ -14366,63 +14391,63 @@ return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration); } function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) { - Debug.assert(node.kind !== 308 /* SourceFile */); + Debug.assert(node.kind !== 309 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) { return node; } node = node.parent.parent; break; - case 167 /* Decorator */: - if (node.parent.kind === 166 /* Parameter */ && isClassElement(node.parent.parent)) { + case 168 /* Decorator */: + if (node.parent.kind === 167 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 264 /* ModuleDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 263 /* EnumDeclaration */: - case 308 /* SourceFile */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 265 /* ModuleDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 264 /* EnumDeclaration */: + case 309 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 169 /* PropertyDeclaration */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 170 /* PropertyDeclaration */: return true; - case 238 /* Block */: + case 239 /* Block */: switch (node.parent.kind) { - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -14454,9 +14479,9 @@ ); if (container) { switch (container.kind) { - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return container; } } @@ -14469,26 +14494,26 @@ return void 0; } switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: node = node.parent; break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: return node; - case 167 /* Decorator */: - if (node.parent.kind === 166 /* Parameter */ && isClassElement(node.parent.parent)) { + case 168 /* Decorator */: + if (node.parent.kind === 167 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -14498,54 +14523,54 @@ } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 215 /* FunctionExpression */ || func.kind === 216 /* ArrowFunction */) { + if (func.kind === 216 /* FunctionExpression */ || func.kind === 217 /* ArrowFunction */) { let prev = func; let parent2 = func.parent; - while (parent2.kind === 214 /* ParenthesizedExpression */) { + while (parent2.kind === 215 /* ParenthesizedExpression */) { prev = parent2; parent2 = parent2.parent; } - if (parent2.kind === 210 /* CallExpression */ && parent2.expression === prev) { + if (parent2.kind === 211 /* CallExpression */ && parent2.expression === prev) { return parent2; } } } function isSuperOrSuperProperty(node) { - return node.kind === 106 /* SuperKeyword */ || isSuperProperty(node); + return node.kind === 107 /* SuperKeyword */ || isSuperProperty(node); } function isSuperProperty(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && node.expression.kind === 106 /* SuperKeyword */; + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && node.expression.kind === 108 /* ThisKeyword */; + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a2; - return !!node && isVariableDeclaration(node) && ((_a2 = node.initializer) == null ? void 0 : _a2.kind) === 108 /* ThisKeyword */; + return !!node && isVariableDeclaration(node) && ((_a2 = node.initializer) == null ? void 0 : _a2.kind) === 109 /* ThisKeyword */; } function isThisInitializedObjectBindingExpression(node) { - return !!node && (isShorthandPropertyAssignment(node) || isPropertyAssignment(node)) && isBinaryExpression(node.parent.parent) && node.parent.parent.operatorToken.kind === 63 /* EqualsToken */ && node.parent.parent.right.kind === 108 /* ThisKeyword */; + return !!node && (isShorthandPropertyAssignment(node) || isPropertyAssignment(node)) && isBinaryExpression(node.parent.parent) && node.parent.parent.operatorToken.kind === 63 /* EqualsToken */ && node.parent.parent.right.kind === 109 /* ThisKeyword */; } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 79 /* Identifier */: - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return node.tag; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -14556,20 +14581,20 @@ return false; } switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return true; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return !useLegacyDecorators; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2)); - case 166 /* Parameter */: + case 167 /* Parameter */: if (!useLegacyDecorators) return false; - return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 173 /* Constructor */ || parent2.kind === 171 /* MethodDeclaration */ || parent2.kind === 175 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 260 /* ClassDeclaration */; + return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 174 /* Constructor */ || parent2.kind === 172 /* MethodDeclaration */ || parent2.kind === 176 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 261 /* ClassDeclaration */; } return false; } @@ -14581,13 +14606,13 @@ } function childIsDecorated(useLegacyDecorators, node, parent2) { switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent2)); default: return false; @@ -14638,73 +14663,73 @@ } function isJSXTagName(node) { const { parent: parent2 } = node; - if (parent2.kind === 283 /* JsxOpeningElement */ || parent2.kind === 282 /* JsxSelfClosingElement */ || parent2.kind === 284 /* JsxClosingElement */) { + if (parent2.kind === 284 /* JsxOpeningElement */ || parent2.kind === 283 /* JsxSelfClosingElement */ || parent2.kind === 285 /* JsxClosingElement */) { return parent2.tagName === node; } return false; } function isExpressionNode(node) { switch (node.kind) { - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 13 /* RegularExpressionLiteral */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 231 /* AsExpression */: - case 213 /* TypeAssertionExpression */: - case 235 /* SatisfiesExpression */: - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 218 /* TypeOfExpression */: - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: - case 223 /* BinaryExpression */: - case 224 /* ConditionalExpression */: - case 227 /* SpreadElement */: - case 225 /* TemplateExpression */: - case 229 /* OmittedExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: - case 226 /* YieldExpression */: - case 220 /* AwaitExpression */: - case 233 /* MetaProperty */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 232 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 236 /* SatisfiesExpression */: + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 219 /* TypeOfExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 224 /* BinaryExpression */: + case 225 /* ConditionalExpression */: + case 228 /* SpreadElement */: + case 226 /* TemplateExpression */: + case 230 /* OmittedExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: + case 227 /* YieldExpression */: + case 221 /* AwaitExpression */: + case 234 /* MetaProperty */: return true; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); - case 163 /* QualifiedName */: - while (node.parent.kind === 163 /* QualifiedName */) { + case 164 /* QualifiedName */: + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 314 /* JSDocMemberName */: + return node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 315 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); case 80 /* PrivateIdentifier */: - return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 101 /* InKeyword */; + return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 102 /* InKeyword */; case 79 /* Identifier */: - if (node.parent.kind === 183 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 184 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return isInExpressionContext(node); default: return false; @@ -14713,64 +14738,64 @@ function isInExpressionContext(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 302 /* EnumMember */: - case 299 /* PropertyAssignment */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 303 /* EnumMember */: + case 300 /* PropertyAssignment */: + case 206 /* BindingElement */: return parent2.initializer === node; - case 241 /* ExpressionStatement */: - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 250 /* ReturnStatement */: - case 251 /* WithStatement */: - case 252 /* SwitchStatement */: - case 292 /* CaseClause */: - case 254 /* ThrowStatement */: + case 242 /* ExpressionStatement */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 251 /* ReturnStatement */: + case 252 /* WithStatement */: + case 253 /* SwitchStatement */: + case 293 /* CaseClause */: + case 255 /* ThrowStatement */: return parent2.expression === node; - case 245 /* ForStatement */: + case 246 /* ForStatement */: const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 258 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 259 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 258 /* VariableDeclarationList */ || forInStatement.expression === node; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 259 /* VariableDeclarationList */ || forInStatement.expression === node; + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return node === parent2.expression; - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return node === parent2.expression; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return node === parent2.expression; - case 167 /* Decorator */: - case 291 /* JsxExpression */: - case 290 /* JsxSpreadAttribute */: - case 301 /* SpreadAssignment */: + case 168 /* Decorator */: + case 292 /* JsxExpression */: + case 291 /* JsxSpreadAttribute */: + case 302 /* SpreadAssignment */: return true; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return parent2.expression === node && !isPartOfTypeNode(parent2); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return parent2.objectAssignmentInitializer === node; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return node === parent2.expression; default: return isExpressionNode(parent2); } } function isPartOfTypeQuery(node) { - while (node.kind === 163 /* QualifiedName */ || node.kind === 79 /* Identifier */) { + while (node.kind === 164 /* QualifiedName */ || node.kind === 79 /* Identifier */) { node = node.parent; } - return node.kind === 183 /* TypeQuery */; + return node.kind === 184 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 280 /* ExternalModuleReference */; + return node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 281 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -14780,7 +14805,7 @@ return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 280 /* ExternalModuleReference */; + return node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 281 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -14801,10 +14826,10 @@ return !!node && !!(node.flags & 8388608 /* JSDoc */); } function isJSDocIndexSignature(node) { - return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 152 /* StringKeyword */ || node.typeArguments[0].kind === 148 /* NumberKeyword */); + return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 153 /* StringKeyword */ || node.typeArguments[0].kind === 149 /* NumberKeyword */); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 210 /* CallExpression */) { + if (callExpression.kind !== 211 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -14881,9 +14906,9 @@ function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 215 /* FunctionExpression */ || e.kind === 216 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 216 /* FunctionExpression */ || e.kind === 217 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 215 /* FunctionExpression */ || initializer.kind === 228 /* ClassExpression */ || initializer.kind === 216 /* ArrowFunction */) { + if (initializer.kind === 216 /* FunctionExpression */ || initializer.kind === 229 /* ClassExpression */ || initializer.kind === 217 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -14914,7 +14939,7 @@ if (isPropertyNameLiteral(name) && isPropertyNameLiteral(initializer)) { return getTextOfIdentifierOrLiteral(name) === getTextOfIdentifierOrLiteral(initializer); } - if (isMemberName(name) && isLiteralLikeAccess(initializer) && (initializer.expression.kind === 108 /* ThisKeyword */ || isIdentifier(initializer.expression) && (initializer.expression.escapedText === "window" || initializer.expression.escapedText === "self" || initializer.expression.escapedText === "global"))) { + if (isMemberName(name) && isLiteralLikeAccess(initializer) && (initializer.expression.kind === 109 /* ThisKeyword */ || isIdentifier(initializer.expression) && (initializer.expression.escapedText === "window" || initializer.expression.escapedText === "self" || initializer.expression.escapedText === "global"))) { return isSameEntityName(name, getNameOrArgument(initializer)); } if (isLiteralLikeAccess(name) && isLiteralLikeAccess(initializer)) { @@ -14959,14 +14984,14 @@ return isElementAccessExpression(node) && isStringOrNumericLiteralLike(node.argumentExpression); } function isBindableStaticAccessExpression(node, excludeThisKeyword) { - return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 108 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( + return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 109 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( node.expression, /*excludeThisKeyword*/ true )) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 108 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( + return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 109 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( node.expression, /*excludeThisKeyword*/ true @@ -15033,7 +15058,7 @@ return void 0; } function getAssignmentDeclarationPropertyAccessKind(lhs) { - if (lhs.expression.kind === 108 /* ThisKeyword */) { + if (lhs.expression.kind === 109 /* ThisKeyword */) { return 4 /* ThisProperty */; } else if (isModuleExportsAccessExpression(lhs)) { return 2 /* ModuleExports */; @@ -15074,7 +15099,7 @@ return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 241 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 242 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; @@ -15087,29 +15112,29 @@ return false; } const decl = symbol.valueDeclaration; - return decl.kind === 259 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 260 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a2, _b; switch (node.kind) { - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: return (_a2 = findAncestor(node.initializer, (node2) => isRequireCall( node2, /*requireStringLiteralLikeArgument*/ true ))) == null ? void 0 : _a2.arguments[0]; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); - case 270 /* ImportClause */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 278 /* NamespaceExport */: return tryCast(node.parent.moduleSpecifier, isStringLiteralLike); - case 271 /* NamespaceImport */: - case 278 /* ExportSpecifier */: + case 272 /* NamespaceImport */: + case 279 /* ExportSpecifier */: return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); default: Debug.assertNever(node); @@ -15120,18 +15145,18 @@ } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: return node.parent; - case 280 /* ExternalModuleReference */: + case 281 /* ExternalModuleReference */: return node.parent.parent; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return isImportCall(node.parent) || isRequireCall( node.parent, /*checkArg*/ false ) ? node.parent : void 0; - case 198 /* LiteralType */: + case 199 /* LiteralType */: Debug.assert(isStringLiteral(node)); return tryCast(node.parent.parent, isImportTypeNode); default: @@ -15140,16 +15165,16 @@ } function getExternalModuleName(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: return node.moduleSpecifier; - case 268 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 280 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 202 /* ImportType */: + case 269 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 281 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 203 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return node.arguments[0]; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return node.name.kind === 10 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -15157,18 +15182,18 @@ } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return node; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 269 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 270 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -15185,13 +15210,13 @@ function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 166 /* Parameter */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 300 /* ShorthandPropertyAssignment */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 167 /* Parameter */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 301 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -15203,7 +15228,7 @@ return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 349 /* JSDocTypedefTag */ || node.kind === 341 /* JSDocCallbackTag */ || node.kind === 343 /* JSDocEnumTag */; + return node.kind === 350 /* JSDocTypedefTag */ || node.kind === 342 /* JSDocCallbackTag */ || node.kind === 344 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -15216,12 +15241,12 @@ } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return node.initializer; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return node.initializer; } } @@ -15229,26 +15254,26 @@ return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 264 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 265 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveFlowNode(node) { - if (node.kind >= 240 /* FirstStatement */ && node.kind <= 256 /* LastStatement */) { + if (node.kind >= 241 /* FirstStatement */ && node.kind <= 257 /* LastStatement */) { return true; } switch (node.kind) { case 79 /* Identifier */: - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 163 /* QualifiedName */: - case 233 /* MetaProperty */: - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: - case 205 /* BindingElement */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 164 /* QualifiedName */: + case 234 /* MetaProperty */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 206 /* BindingElement */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -15256,71 +15281,71 @@ } function canHaveJSDoc(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 238 /* Block */: - case 249 /* BreakStatement */: - case 176 /* CallSignature */: - case 292 /* CaseClause */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 172 /* ClassStaticBlockDeclaration */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 248 /* ContinueStatement */: - case 256 /* DebuggerStatement */: - case 243 /* DoStatement */: - case 209 /* ElementAccessExpression */: - case 239 /* EmptyStatement */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 239 /* Block */: + case 250 /* BreakStatement */: + case 177 /* CallSignature */: + case 293 /* CaseClause */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 173 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 249 /* ContinueStatement */: + case 257 /* DebuggerStatement */: + case 244 /* DoStatement */: + case 210 /* ElementAccessExpression */: + case 240 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: - case 278 /* ExportSpecifier */: - case 241 /* ExpressionStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: + case 279 /* ExportSpecifier */: + case 242 /* ExpressionStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: case 79 /* Identifier */: - case 242 /* IfStatement */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 253 /* LabeledStatement */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 199 /* NamedTupleMember */: - case 267 /* NamespaceExportDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 166 /* Parameter */: - case 214 /* ParenthesizedExpression */: - case 208 /* PropertyAccessExpression */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 250 /* ReturnStatement */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: - case 252 /* SwitchStatement */: - case 254 /* ThrowStatement */: - case 255 /* TryStatement */: - case 262 /* TypeAliasDeclaration */: - case 165 /* TypeParameter */: - case 257 /* VariableDeclaration */: - case 240 /* VariableStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: + case 243 /* IfStatement */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 254 /* LabeledStatement */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 200 /* NamedTupleMember */: + case 268 /* NamespaceExportDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 167 /* Parameter */: + case 215 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 251 /* ReturnStatement */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: + case 253 /* SwitchStatement */: + case 255 /* ThrowStatement */: + case 256 /* TryStatement */: + case 263 /* TypeAliasDeclaration */: + case 166 /* TypeParameter */: + case 258 /* VariableDeclaration */: + case 241 /* VariableStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: return true; default: return false; @@ -15336,11 +15361,11 @@ if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 166 /* Parameter */) { + if (node.kind === 167 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 165 /* TypeParameter */) { + if (node.kind === 166 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -15360,7 +15385,7 @@ } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 299 /* PropertyAssignment */ || parent2.kind === 274 /* ExportAssignment */ || parent2.kind === 169 /* PropertyDeclaration */ || parent2.kind === 241 /* ExpressionStatement */ && node.kind === 208 /* PropertyAccessExpression */ || parent2.kind === 250 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 300 /* PropertyAssignment */ || parent2.kind === 275 /* ExportAssignment */ || parent2.kind === 170 /* PropertyDeclaration */ || parent2.kind === 242 /* ExpressionStatement */ && node.kind === 209 /* PropertyAccessExpression */ || parent2.kind === 251 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { return parent2; } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isBinaryExpression(parent2) && parent2.operatorToken.kind === 63 /* EqualsToken */)) { return parent2.parent; @@ -15430,32 +15455,32 @@ let parent2 = node.parent; while (true) { switch (parent2.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const binaryOperator = parent2.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 63 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: const unaryOperator = parent2.operator; return unaryOperator === 45 /* PlusPlusToken */ || unaryOperator === 46 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 214 /* ParenthesizedExpression */: - case 206 /* ArrayLiteralExpression */: - case 227 /* SpreadElement */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 207 /* ArrayLiteralExpression */: + case 228 /* SpreadElement */: + case 233 /* NonNullExpression */: node = parent2; break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: node = parent2.parent; break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { return 0 /* None */; } node = parent2.parent; break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (parent2.name === node) { return 0 /* None */; } @@ -15472,22 +15497,22 @@ } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 238 /* Block */: - case 240 /* VariableStatement */: - case 251 /* WithStatement */: - case 242 /* IfStatement */: - case 252 /* SwitchStatement */: - case 266 /* CaseBlock */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 253 /* LabeledStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 255 /* TryStatement */: - case 295 /* CatchClause */: + case 239 /* Block */: + case 241 /* VariableStatement */: + case 252 /* WithStatement */: + case 243 /* IfStatement */: + case 253 /* SwitchStatement */: + case 267 /* CaseBlock */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 254 /* LabeledStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 256 /* TryStatement */: + case 296 /* CatchClause */: return true; } return false; @@ -15502,14 +15527,14 @@ return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 193 /* ParenthesizedType */); + return walkUp(node, 194 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 214 /* ParenthesizedExpression */); + return walkUp(node, 215 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 193 /* ParenthesizedType */) { + while (node && node.kind === 194 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -15525,11 +15550,11 @@ return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 208 /* PropertyAccessExpression */ && node.kind !== 209 /* ElementAccessExpression */) { + if (node.kind !== 209 /* PropertyAccessExpression */ && node.kind !== 210 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 217 /* DeleteExpression */; + return node && node.kind === 218 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -15567,55 +15592,55 @@ } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 164 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 165 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent2 = node.parent; switch (parent2.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 302 /* EnumMember */: - case 299 /* PropertyAssignment */: - case 208 /* PropertyAccessExpression */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 303 /* EnumMember */: + case 300 /* PropertyAssignment */: + case 209 /* PropertyAccessExpression */: return parent2.name === node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return parent2.right === node; - case 205 /* BindingElement */: - case 273 /* ImportSpecifier */: + case 206 /* BindingElement */: + case 274 /* ImportSpecifier */: return parent2.propertyName === node; - case 278 /* ExportSpecifier */: - case 288 /* JsxAttribute */: - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: + case 279 /* ExportSpecifier */: + case 289 /* JsxAttribute */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: return true; } return false; } function isAliasSymbolDeclaration(node) { - if (node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 267 /* NamespaceExportDeclaration */ || node.kind === 270 /* ImportClause */ && !!node.name || node.kind === 271 /* NamespaceImport */ || node.kind === 277 /* NamespaceExport */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 278 /* ExportSpecifier */ || node.kind === 274 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { + if (node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 268 /* NamespaceExportDeclaration */ || node.kind === 271 /* ImportClause */ && !!node.name || node.kind === 272 /* NamespaceImport */ || node.kind === 278 /* NamespaceExport */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 279 /* ExportSpecifier */ || node.kind === 275 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { return true; } return isInJSFile(node) && (isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isPropertyAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableExpression(node.parent.right)); } function getAliasDeclarationFromName(node) { switch (node.parent.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 271 /* NamespaceImport */: - case 278 /* ExportSpecifier */: - case 274 /* ExportAssignment */: - case 268 /* ImportEqualsDeclaration */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 272 /* NamespaceImport */: + case 279 /* ExportSpecifier */: + case 275 /* ExportAssignment */: + case 269 /* ImportEqualsDeclaration */: + case 278 /* NamespaceExport */: return node.parent; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 163 /* QualifiedName */); + } while (node.parent.kind === 164 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -15630,7 +15655,7 @@ return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 300 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 299 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 301 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 300 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -15643,14 +15668,14 @@ return baseType; } function getClassExtendsHeritageElement(node) { - const heritageClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : void 0; } function getEffectiveImplementsTypeNodes(node) { if (isInJSFile(node)) { return getJSDocImplementsTags(node).map((n) => n.class); } else { - const heritageClause = getHeritageClause(node.heritageClauses, 117 /* ImplementsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 118 /* ImplementsKeyword */); return heritageClause == null ? void 0 : heritageClause.types; } } @@ -15658,7 +15683,7 @@ return isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || emptyArray : isClassLike(node) ? concatenate(singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || emptyArray : emptyArray; } function getInterfaceBaseTypeNodes(node) { - const heritageClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const heritageClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); return heritageClause ? heritageClause.types : void 0; } function getHeritageClause(clauses, kind) { @@ -15681,16 +15706,16 @@ return void 0; } function isKeyword(token) { - return 81 /* FirstKeyword */ <= token && token <= 162 /* LastKeyword */; + return 82 /* FirstKeyword */ <= token && token <= 163 /* LastKeyword */; } function isContextualKeyword(token) { - return 126 /* FirstContextualKeyword */ <= token && token <= 162 /* LastContextualKeyword */; + return 127 /* FirstContextualKeyword */ <= token && token <= 163 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); } function isFutureReservedKeyword(token) { - return 117 /* FirstFutureReservedWord */ <= token && token <= 125 /* LastFutureReservedWord */; + return 118 /* FirstFutureReservedWord */ <= token && token <= 126 /* LastFutureReservedWord */; } function isStringANonContextualKeyword(name) { const token = stringToToken(name); @@ -15713,13 +15738,13 @@ } let flags = 0 /* Normal */; switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -15732,10 +15757,10 @@ } function isAsyncFunction(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -15751,7 +15776,7 @@ return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 164 /* ComputedPropertyName */ || name.kind === 209 /* ElementAccessExpression */)) { + if (!(name.kind === 165 /* ComputedPropertyName */ || name.kind === 210 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -15765,7 +15790,7 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -15818,13 +15843,13 @@ function isAnonymousFunctionDefinition(node, cb) { node = skipOuterExpressions(node); switch (node.kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: if (node.name) { return false; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: break; default: return false; @@ -15833,19 +15858,19 @@ } function isNamedEvaluationSource(node) { switch (node.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return !isProtoSetter(node.name); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return !!node.objectAssignmentInitializer; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return isIdentifier(node.name) && !!node.initializer; - case 166 /* Parameter */: + case 167 /* Parameter */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return !!node.initializer; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 76 /* AmpersandAmpersandEqualsToken */: @@ -15854,7 +15879,7 @@ return isIdentifier(node.left); } break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return true; } return false; @@ -15863,18 +15888,18 @@ if (!isNamedEvaluationSource(node)) return false; switch (node.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb); - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isAnonymousFunctionDefinition(node.right, cb); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return isAnonymousFunctionDefinition(node.expression, cb); } } @@ -15883,17 +15908,17 @@ } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 166 /* Parameter */; + return root.kind === 167 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 205 /* BindingElement */) { + while (node.kind === 206 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 215 /* FunctionExpression */ || kind === 259 /* FunctionDeclaration */ || kind === 216 /* ArrowFunction */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 264 /* ModuleDeclaration */ || kind === 308 /* SourceFile */; + return kind === 174 /* Constructor */ || kind === 216 /* FunctionExpression */ || kind === 260 /* FunctionDeclaration */ || kind === 217 /* ArrowFunction */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 265 /* ModuleDeclaration */ || kind === 309 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); @@ -15903,22 +15928,22 @@ } function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 211 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 212 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 211 /* NewExpression */: + case 212 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 221 /* PrefixUnaryExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 220 /* AwaitExpression */: - case 224 /* ConditionalExpression */: - case 226 /* YieldExpression */: + case 222 /* PrefixUnaryExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 221 /* AwaitExpression */: + case 225 /* ConditionalExpression */: + case 227 /* YieldExpression */: return 1 /* Right */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (operator) { case 42 /* AsteriskAsteriskToken */: case 63 /* EqualsToken */: @@ -15944,13 +15969,13 @@ } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 211 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 212 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 223 /* BinaryExpression */) { + if (expression.kind === 224 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 221 /* PrefixUnaryExpression */ || expression.kind === 222 /* PostfixUnaryExpression */) { + } else if (expression.kind === 222 /* PrefixUnaryExpression */ || expression.kind === 223 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -15958,15 +15983,15 @@ } function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return 0 /* Comma */; - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return 1 /* Spread */; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return 2 /* Yield */; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return 4 /* Conditional */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (operatorKind) { case 27 /* CommaToken */: return 0 /* Comma */; @@ -15990,51 +16015,51 @@ default: return getBinaryOperatorPrecedence(operatorKind); } - case 213 /* TypeAssertionExpression */: - case 232 /* NonNullExpression */: - case 221 /* PrefixUnaryExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 220 /* AwaitExpression */: + case 214 /* TypeAssertionExpression */: + case 233 /* NonNullExpression */: + case 222 /* PrefixUnaryExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 221 /* AwaitExpression */: return 16 /* Unary */; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return 17 /* Update */; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return 18 /* LeftHandSide */; - case 211 /* NewExpression */: + case 212 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 212 /* TaggedTemplateExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 233 /* MetaProperty */: + case 213 /* TaggedTemplateExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 234 /* MetaProperty */: return 19 /* Member */; - case 231 /* AsExpression */: - case 235 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 236 /* SatisfiesExpression */: return 11 /* Relational */; - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 228 /* ClassExpression */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 229 /* ClassExpression */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 214 /* ParenthesizedExpression */: - case 229 /* OmittedExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: + case 226 /* TemplateExpression */: + case 215 /* ParenthesizedExpression */: + case 230 /* OmittedExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -16063,10 +16088,10 @@ case 31 /* GreaterThanToken */: case 32 /* LessThanEqualsToken */: case 33 /* GreaterThanEqualsToken */: - case 102 /* InstanceOfKeyword */: - case 101 /* InKeyword */: - case 128 /* AsKeyword */: - case 150 /* SatisfiesKeyword */: + case 103 /* InstanceOfKeyword */: + case 102 /* InKeyword */: + case 129 /* AsKeyword */: + case 151 /* SatisfiesKeyword */: return 11 /* Relational */; case 47 /* LessThanLessThanToken */: case 48 /* GreaterThanGreaterThanToken */: @@ -16087,7 +16112,7 @@ function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return !!i.expression; case 11 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -16563,7 +16588,7 @@ while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 183 /* TypeQuery */; + return node.parent.kind === 184 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.escapedText === "this"; @@ -16575,9 +16600,9 @@ let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 174 /* GetAccessor */) { + if (accessor.kind === 175 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 175 /* SetAccessor */) { + } else if (accessor.kind === 176 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -16593,10 +16618,10 @@ } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 174 /* GetAccessor */ && !getAccessor) { + if (member.kind === 175 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 175 /* SetAccessor */ && !setAccessor) { + if (member.kind === 176 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -16628,7 +16653,7 @@ return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 323 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 324 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -16818,7 +16843,7 @@ return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 162 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 163 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -16893,37 +16918,37 @@ } function modifierToFlag(token) { switch (token) { - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: return 32 /* Static */; - case 123 /* PublicKeyword */: + case 124 /* PublicKeyword */: return 4 /* Public */; - case 122 /* ProtectedKeyword */: + case 123 /* ProtectedKeyword */: return 16 /* Protected */; - case 121 /* PrivateKeyword */: + case 122 /* PrivateKeyword */: return 8 /* Private */; - case 126 /* AbstractKeyword */: + case 127 /* AbstractKeyword */: return 256 /* Abstract */; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return 128 /* Accessor */; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return 1 /* Export */; - case 136 /* DeclareKeyword */: + case 137 /* DeclareKeyword */: return 2 /* Ambient */; - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: return 2048 /* Const */; - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return 1024 /* Default */; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return 512 /* Async */; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: return 64 /* Readonly */; - case 161 /* OverrideKeyword */: + case 162 /* OverrideKeyword */: return 16384 /* Override */; - case 101 /* InKeyword */: + case 102 /* InKeyword */: return 32768 /* In */; - case 145 /* OutKeyword */: + case 146 /* OutKeyword */: return 65536 /* Out */; - case 167 /* Decorator */: + case 168 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -16956,7 +16981,7 @@ function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node) { if (isExpressionWithTypeArguments(node)) { if (isHeritageClause(node.parent) && isClassLike(node.parent.parent)) { - return { class: node.parent.parent, isImplements: node.parent.token === 117 /* ImplementsKeyword */ }; + return { class: node.parent.parent, isImplements: node.parent.token === 118 /* ImplementsKeyword */ }; } if (isJSDocAugmentsTag(node.parent)) { const host = getEffectiveJSDocHost(node.parent); @@ -16980,7 +17005,7 @@ true )) { const kind = node.left.kind; - return kind === 207 /* ObjectLiteralExpression */ || kind === 206 /* ArrayLiteralExpression */; + return kind === 208 /* ObjectLiteralExpression */ || kind === 207 /* ArrayLiteralExpression */; } return false; } @@ -16994,12 +17019,12 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 79 /* Identifier */); @@ -17007,7 +17032,7 @@ } } function isDottedName(node) { - return node.kind === 79 /* Identifier */ || node.kind === 108 /* ThisKeyword */ || node.kind === 106 /* SuperKeyword */ || node.kind === 233 /* MetaProperty */ || node.kind === 208 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 214 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 234 /* MetaProperty */ || node.kind === 209 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 215 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -17032,7 +17057,7 @@ return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 163 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 164 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; @@ -17041,10 +17066,10 @@ return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } function isEmptyObjectLiteral(expression) { - return expression.kind === 207 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 208 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 206 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 207 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -17310,8 +17335,8 @@ const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 263 /* EnumDeclaration */: - case 264 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -17363,34 +17388,29 @@ } function accessKind(node) { const { parent: parent2 } = node; - if (!parent2) - return 0 /* Read */; - switch (parent2.kind) { - case 214 /* ParenthesizedExpression */: + switch (parent2 == null ? void 0 : parent2.kind) { + case 215 /* ParenthesizedExpression */: return accessKind(parent2); - case 222 /* PostfixUnaryExpression */: - case 221 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const { operator } = parent2; - return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? writeOrReadWrite() : 0 /* Read */; - case 223 /* BinaryExpression */: + return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */; + case 224 /* BinaryExpression */: const { left, operatorToken } = parent2; - return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : writeOrReadWrite() : 0 /* Read */; - case 208 /* PropertyAccessExpression */: + return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */; + case 209 /* PropertyAccessExpression */: return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 299 /* PropertyAssignment */: { + case 300 /* PropertyAssignment */: { const parentAccess = accessKind(parent2.parent); return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return accessKind(parent2); default: return 0 /* Read */; } - function writeOrReadWrite() { - return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 241 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; - } } function reverseAccessKind(a) { switch (a) { @@ -17499,16 +17519,16 @@ return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 139 /* IntrinsicKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */; + return kind >= 180 /* FirstTypeNode */ && kind <= 203 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 158 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 161 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 156 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 140 /* IntrinsicKeyword */ || kind === 231 /* ExpressionWithTypeArguments */ || kind === 316 /* JSDocAllType */ || kind === 317 /* JSDocUnknownType */ || kind === 318 /* JSDocNullableType */ || kind === 319 /* JSDocNonNullableType */ || kind === 320 /* JSDocOptionalType */ || kind === 321 /* JSDocFunctionType */ || kind === 322 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */; + return node.kind === 209 /* PropertyAccessExpression */ || node.kind === 210 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 208 /* PropertyAccessExpression */) { + if (node.kind === 209 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 209 /* ElementAccessExpression */); + Debug.assert(node.kind === 210 /* ElementAccessExpression */); return node.argumentExpression; } function isBundleFileTextLike(section) { @@ -17521,7 +17541,7 @@ } } function isNamedImportsOrExports(node) { - return node.kind === 272 /* NamedImports */ || node.kind === 276 /* NamedExports */; + return node.kind === 273 /* NamedImports */ || node.kind === 277 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -17534,12 +17554,12 @@ return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 208 /* PropertyAccessExpression */) { + if (access.kind === 209 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 209 /* ElementAccessExpression */) { + } else if (access.kind === 210 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -17561,28 +17581,28 @@ function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: node = node.operand; continue; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: node = node.left; continue; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: node = node.condition; continue; - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: node = node.tag; continue; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 231 /* AsExpression */: - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: - case 232 /* NonNullExpression */: - case 356 /* PartiallyEmittedExpression */: - case 235 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 233 /* NonNullExpression */: + case 357 /* PartiallyEmittedExpression */: + case 236 /* SatisfiesExpression */: node = node.expression; continue; } @@ -18652,7 +18672,7 @@ result = scanner2.scan(); } const flags = scanner2.getTokenFlags(); - return success && result === 9 /* BigIntLiteral */ && scanner2.getTextPos() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); + return success && result === 9 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); } function isValidTypeOnlyAliasUseSite(useSite) { return !!(useSite.flags & 16777216 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); @@ -18661,33 +18681,33 @@ return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 79 /* Identifier */ || node.kind === 208 /* PropertyAccessExpression */) { + while (node.kind === 79 /* Identifier */ || node.kind === 209 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 164 /* ComputedPropertyName */) { + if (node.kind !== 165 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 261 /* InterfaceDeclaration */ || containerKind === 184 /* TypeLiteral */; + return containerKind === 262 /* InterfaceDeclaration */ || containerKind === 185 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 79 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent2) => { switch (parent2.kind) { - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return true; - case 208 /* PropertyAccessExpression */: - case 230 /* ExpressionWithTypeArguments */: + case 209 /* PropertyAccessExpression */: + case 231 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 117 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 261 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 262 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -18799,20 +18819,20 @@ if (!node.parent) return void 0; switch (node.kind) { - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: const { parent: parent3 } = node; - return parent3.kind === 192 /* InferType */ ? void 0 : parent3.typeParameters; - case 166 /* Parameter */: + return parent3.kind === 193 /* InferType */ ? void 0 : parent3.typeParameters; + case 167 /* Parameter */: return node.parent.parameters; - case 201 /* TemplateLiteralTypeSpan */: + case 202 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return node.parent.templateSpans; - case 167 /* Decorator */: { + case 168 /* Decorator */: { const { parent: parent4 } = node; return canHaveDecorators(parent4) ? parent4.modifiers : void 0; } - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return node.parent.heritageClauses; } const { parent: parent2 } = node; @@ -18820,43 +18840,43 @@ return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent2.kind) { - case 184 /* TypeLiteral */: - case 261 /* InterfaceDeclaration */: + case 185 /* TypeLiteral */: + case 262 /* InterfaceDeclaration */: return isTypeElement(node) ? parent2.members : void 0; - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return parent2.types; - case 186 /* TupleType */: - case 206 /* ArrayLiteralExpression */: - case 357 /* CommaListExpression */: - case 272 /* NamedImports */: - case 276 /* NamedExports */: + case 187 /* TupleType */: + case 207 /* ArrayLiteralExpression */: + case 358 /* CommaListExpression */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: return parent2.elements; - case 207 /* ObjectLiteralExpression */: - case 289 /* JsxAttributes */: + case 208 /* ObjectLiteralExpression */: + case 290 /* JsxAttributes */: return parent2.properties; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 281 /* JsxElement */: - case 285 /* JsxFragment */: + case 282 /* JsxElement */: + case 286 /* JsxFragment */: return isJsxChild(node) ? parent2.children : void 0; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent2.typeArguments : void 0; - case 238 /* Block */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 266 /* ModuleBlock */: return parent2.statements; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return parent2.clauses; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return isClassElement(node) ? parent2.members : void 0; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return isEnumMember(node) ? parent2.members : void 0; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return parent2.statements; } } @@ -18865,7 +18885,7 @@ if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 216 /* ArrowFunction */) { + if (node.kind !== 217 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -18878,14 +18898,14 @@ return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 257 /* VariableDeclaration */ && node.parent.kind === 295 /* CatchClause */; + return node.kind === 258 /* VariableDeclaration */ && node.parent.kind === 296 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 215 /* FunctionExpression */ || node.kind === 216 /* ArrowFunction */; + return node.kind === 216 /* FunctionExpression */ || node.kind === 217 /* ArrowFunction */; } function escapeSnippetText(text) { return text.replace(/\$/gm, () => "\\$"); @@ -18948,23 +18968,23 @@ } function getParameterTypeNode(parameter) { var _a2; - return parameter.kind === 344 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; + return parameter.kind === 345 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; } function isTypeDeclaration(node) { switch (node.kind) { - case 165 /* TypeParameter */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 166 /* TypeParameter */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return true; - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.isTypeOnly; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -18978,7 +18998,7 @@ return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 320 /* JSDocOptionalType */; } function canUsePropertyAccess(name, languageVersion) { if (name.length === 0) { @@ -18993,17 +19013,17 @@ } function isJSDocOptionalParameter(node) { return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType - (node.type && node.type.kind === 319 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */)); + (node.type && node.type.kind === 320 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 320 /* JSDocOptionalType */)); } function isOptionalDeclaration(declaration) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return !!declaration.questionToken; - case 166 /* Parameter */: + case 167 /* Parameter */: return !!declaration.questionToken || isJSDocOptionalParameter(declaration); - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: return isOptionalJSDocPropertyLikeTag(declaration); default: return false; @@ -19011,7 +19031,7 @@ } function isNonNullAccess(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression); + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && isNonNullExpression(node.expression); } function isJSDocSatisfiesExpression(node) { return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); @@ -19329,16 +19349,16 @@ return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(223 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(223 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(224 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(224 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 216 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 217 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 226 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 227 /* YieldExpression */) { return false; } return true; @@ -19372,7 +19392,7 @@ if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { + if (node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -19385,7 +19405,7 @@ } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 214 /* ParenthesizedExpression */) { + if (skipped.kind === 215 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -19411,7 +19431,7 @@ return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(224 /* ConditionalExpression */, 57 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(225 /* ConditionalExpression */, 57 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -19432,8 +19452,8 @@ /*stopAtCallExpression*/ false ).kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: needsParens = true; } } @@ -19446,16 +19466,16 @@ true ); switch (leftmostExpr.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 211 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 212 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -19473,7 +19493,7 @@ function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(223 /* BinaryExpression */, 27 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(224 /* BinaryExpression */, 27 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -19481,7 +19501,7 @@ if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 215 /* FunctionExpression */ || kind === 216 /* ArrowFunction */) { + if (kind === 216 /* FunctionExpression */ || kind === 217 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -19496,7 +19516,7 @@ /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 207 /* ObjectLiteralExpression */ || leftmostExpressionKind === 215 /* FunctionExpression */) { + if (leftmostExpressionKind === 208 /* ObjectLiteralExpression */ || leftmostExpressionKind === 216 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -19506,31 +19526,31 @@ body, /*stopAtCallExpressions*/ false - ).kind === 207 /* ObjectLiteralExpression */)) { + ).kind === 208 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 191 /* ConditionalType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 192 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -19540,8 +19560,8 @@ } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -19551,23 +19571,23 @@ } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 192 /* InferType */: - case 195 /* TypeOperator */: - case 183 /* TypeQuery */: + case 193 /* InferType */: + case 196 /* TypeOperator */: + case 184 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -19732,11 +19752,11 @@ } function convertToAssignmentPattern(node) { switch (node.kind) { - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 203 /* ObjectBindingPattern */: - case 207 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 208 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -20091,40 +20111,40 @@ updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(315 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(316 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(316 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(317 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(318 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(319 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(318 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(319 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(317 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(318 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(317 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(318 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(319 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(320 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(319 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(320 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(321 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(322 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(321 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(322 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(322 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(323 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(322 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(323 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -20164,82 +20184,82 @@ updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(347 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(348 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(347 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(345 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(346 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(345 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(346 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(346 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(347 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(346 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(347 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(333 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(334 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(333 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(334 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(335 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(336 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(335 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(336 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(339 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(339 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(340 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(340 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(341 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(341 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(334 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(335 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(334 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(335 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(352 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(353 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(354 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(354 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -20702,50 +20722,50 @@ return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 162 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 163 /* LastToken */, "Invalid token"); Debug.assert(token <= 14 /* FirstTemplateToken */ || token >= 17 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 8 /* FirstLiteralToken */ || token >= 14 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 79 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); const node = createBaseToken(token); let transformFlags = 0 /* None */; switch (token) { - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; break; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 126 /* AbstractKeyword */: - case 136 /* DeclareKeyword */: - case 85 /* ConstKeyword */: - case 131 /* AnyKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 144 /* NeverKeyword */: - case 149 /* ObjectKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - case 161 /* OverrideKeyword */: - case 152 /* StringKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 114 /* VoidKeyword */: - case 157 /* UnknownKeyword */: - case 155 /* UndefinedKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 127 /* AbstractKeyword */: + case 137 /* DeclareKeyword */: + case 86 /* ConstKeyword */: + case 132 /* AnyKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 145 /* NeverKeyword */: + case 150 /* ObjectKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + case 162 /* OverrideKeyword */: + case 153 /* StringKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 115 /* VoidKeyword */: + case 158 /* UnknownKeyword */: + case 156 /* UndefinedKeyword */: transformFlags = 1 /* ContainsTypeScript */; break; - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: transformFlags = 1024 /* ContainsES2015 */ | 134217728 /* ContainsLexicalSuper */; node.flowNode = void 0; break; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: transformFlags = 1024 /* ContainsES2015 */; break; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: transformFlags = 16777216 /* ContainsClassFields */; break; - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: transformFlags = 16384 /* ContainsLexicalThis */; node.flowNode = void 0; break; @@ -20756,19 +20776,19 @@ return node; } function createSuper() { - return createToken(106 /* SuperKeyword */); + return createToken(107 /* SuperKeyword */); } function createThis() { - return createToken(108 /* ThisKeyword */); + return createToken(109 /* ThisKeyword */); } function createNull() { - return createToken(104 /* NullKeyword */); + return createToken(105 /* NullKeyword */); } function createTrue() { - return createToken(110 /* TrueKeyword */); + return createToken(111 /* TrueKeyword */); } function createFalse() { - return createToken(95 /* FalseKeyword */); + return createToken(96 /* FalseKeyword */); } function createModifier(kind) { return createToken(kind); @@ -20776,39 +20796,39 @@ function createModifiersFromModifierFlags(flags2) { const result = []; if (flags2 & 1 /* Export */) - result.push(createModifier(93 /* ExportKeyword */)); + result.push(createModifier(94 /* ExportKeyword */)); if (flags2 & 2 /* Ambient */) - result.push(createModifier(136 /* DeclareKeyword */)); + result.push(createModifier(137 /* DeclareKeyword */)); if (flags2 & 1024 /* Default */) - result.push(createModifier(88 /* DefaultKeyword */)); + result.push(createModifier(89 /* DefaultKeyword */)); if (flags2 & 2048 /* Const */) - result.push(createModifier(85 /* ConstKeyword */)); + result.push(createModifier(86 /* ConstKeyword */)); if (flags2 & 4 /* Public */) - result.push(createModifier(123 /* PublicKeyword */)); + result.push(createModifier(124 /* PublicKeyword */)); if (flags2 & 8 /* Private */) - result.push(createModifier(121 /* PrivateKeyword */)); + result.push(createModifier(122 /* PrivateKeyword */)); if (flags2 & 16 /* Protected */) - result.push(createModifier(122 /* ProtectedKeyword */)); + result.push(createModifier(123 /* ProtectedKeyword */)); if (flags2 & 256 /* Abstract */) - result.push(createModifier(126 /* AbstractKeyword */)); + result.push(createModifier(127 /* AbstractKeyword */)); if (flags2 & 32 /* Static */) - result.push(createModifier(124 /* StaticKeyword */)); + result.push(createModifier(125 /* StaticKeyword */)); if (flags2 & 16384 /* Override */) - result.push(createModifier(161 /* OverrideKeyword */)); + result.push(createModifier(162 /* OverrideKeyword */)); if (flags2 & 64 /* Readonly */) - result.push(createModifier(146 /* ReadonlyKeyword */)); + result.push(createModifier(147 /* ReadonlyKeyword */)); if (flags2 & 128 /* Accessor */) - result.push(createModifier(127 /* AccessorKeyword */)); + result.push(createModifier(128 /* AccessorKeyword */)); if (flags2 & 512 /* Async */) - result.push(createModifier(132 /* AsyncKeyword */)); + result.push(createModifier(133 /* AsyncKeyword */)); if (flags2 & 32768 /* In */) - result.push(createModifier(101 /* InKeyword */)); + result.push(createModifier(102 /* InKeyword */)); if (flags2 & 65536 /* Out */) - result.push(createModifier(145 /* OutKeyword */)); + result.push(createModifier(146 /* OutKeyword */)); return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(163 /* QualifiedName */); + const node = createBaseNode(164 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -20819,7 +20839,7 @@ return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(164 /* ComputedPropertyName */); + const node = createBaseNode(165 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -20828,7 +20848,7 @@ return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(165 /* TypeParameter */); + const node = createBaseDeclaration(166 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -20843,7 +20863,7 @@ } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { var _a2, _b; - const node = createBaseDeclaration(166 /* Parameter */); + const node = createBaseDeclaration(167 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -20862,7 +20882,7 @@ return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(167 /* Decorator */); + const node = createBaseNode(168 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -20875,7 +20895,7 @@ return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(168 /* PropertySignature */); + const node = createBaseDeclaration(169 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -20895,7 +20915,7 @@ return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(169 /* PropertyDeclaration */); + const node = createBaseDeclaration(170 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; @@ -20911,7 +20931,7 @@ return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(170 /* MethodSignature */); + const node = createBaseDeclaration(171 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -20929,7 +20949,7 @@ return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(171 /* MethodDeclaration */); + const node = createBaseDeclaration(172 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -20966,7 +20986,7 @@ return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(172 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(173 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -20987,7 +21007,7 @@ return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(173 /* Constructor */); + const node = createBaseDeclaration(174 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; @@ -21013,7 +21033,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(174 /* GetAccessor */); + const node = createBaseDeclaration(175 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -21044,7 +21064,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(175 /* SetAccessor */); + const node = createBaseDeclaration(176 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -21076,7 +21096,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(176 /* CallSignature */); + const node = createBaseDeclaration(177 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21091,7 +21111,7 @@ return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(177 /* ConstructSignature */); + const node = createBaseDeclaration(178 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21106,7 +21126,7 @@ return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(178 /* IndexSignature */); + const node = createBaseDeclaration(179 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -21121,7 +21141,7 @@ return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(201 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(202 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -21134,7 +21154,7 @@ return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(179 /* TypePredicate */); + const node = createBaseNode(180 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -21145,7 +21165,7 @@ return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(180 /* TypeReference */); + const node = createBaseNode(181 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21155,7 +21175,7 @@ return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(181 /* FunctionType */); + const node = createBaseDeclaration(182 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21180,7 +21200,7 @@ return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(182 /* ConstructorType */); + const node = createBaseDeclaration(183 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -21211,7 +21231,7 @@ return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(183 /* TypeQuery */); + const node = createBaseNode(184 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21221,7 +21241,7 @@ return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(184 /* TypeLiteral */); + const node = createBaseDeclaration(185 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21230,7 +21250,7 @@ return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(185 /* ArrayType */); + const node = createBaseNode(186 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21239,7 +21259,7 @@ return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(186 /* TupleType */); + const node = createBaseNode(187 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21248,7 +21268,7 @@ return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(199 /* NamedTupleMember */); + const node = createBaseDeclaration(200 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -21261,7 +21281,7 @@ return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(187 /* OptionalType */); + const node = createBaseNode(188 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21270,7 +21290,7 @@ return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(188 /* RestType */); + const node = createBaseNode(189 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21288,19 +21308,19 @@ return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(189 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(190 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(190 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(191 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(191 /* ConditionalType */); + const node = createBaseNode(192 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -21314,7 +21334,7 @@ return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(192 /* InferType */); + const node = createBaseNode(193 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21323,7 +21343,7 @@ return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(200 /* TemplateLiteralType */); + const node = createBaseNode(201 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21333,7 +21353,7 @@ return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(202 /* ImportType */); + const node = createBaseNode(203 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -21346,7 +21366,7 @@ return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(193 /* ParenthesizedType */); + const node = createBaseNode(194 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21355,14 +21375,14 @@ return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(194 /* ThisType */); + const node = createBaseNode(195 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(195 /* TypeOperator */); + const node = createBaseNode(196 /* TypeOperator */); node.operator = operator; - node.type = operator === 146 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); + node.type = operator === 147 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; } @@ -21370,7 +21390,7 @@ return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(196 /* IndexedAccessType */); + const node = createBaseNode(197 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -21380,7 +21400,7 @@ return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(197 /* MappedType */); + const node = createBaseDeclaration(198 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -21396,7 +21416,7 @@ return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(198 /* LiteralType */); + const node = createBaseNode(199 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21405,7 +21425,7 @@ return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(203 /* ObjectBindingPattern */); + const node = createBaseNode(204 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -21417,7 +21437,7 @@ return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(204 /* ArrayBindingPattern */); + const node = createBaseNode(205 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -21426,7 +21446,7 @@ return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(205 /* BindingElement */); + const node = createBaseDeclaration(206 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -21439,7 +21459,7 @@ return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(206 /* ArrayLiteralExpression */); + const node = createBaseNode(207 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -21451,7 +21471,7 @@ return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(207 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(208 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -21462,7 +21482,7 @@ return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(208 /* PropertyAccessExpression */); + const node = createBaseDeclaration(209 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -21512,7 +21532,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(209 /* ElementAccessExpression */); + const node = createBaseDeclaration(210 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -21562,7 +21582,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(210 /* CallExpression */); + const node = createBaseDeclaration(211 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -21619,7 +21639,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(211 /* NewExpression */); + const node = createBaseDeclaration(212 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -21633,7 +21653,7 @@ return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(212 /* TaggedTemplateExpression */); + const node = createBaseNode(213 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -21654,7 +21674,7 @@ return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(213 /* TypeAssertionExpression */); + const node = createBaseNode(214 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -21664,7 +21684,7 @@ return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(214 /* ParenthesizedExpression */); + const node = createBaseNode(215 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -21674,7 +21694,7 @@ return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(215 /* FunctionExpression */); + const node = createBaseDeclaration(216 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -21699,7 +21719,7 @@ return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(216 /* ArrowFunction */); + const node = createBaseDeclaration(217 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -21721,7 +21741,7 @@ return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(217 /* DeleteExpression */); + const node = createBaseNode(218 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21730,7 +21750,7 @@ return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(218 /* TypeOfExpression */); + const node = createBaseNode(219 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21739,7 +21759,7 @@ return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(219 /* VoidExpression */); + const node = createBaseNode(220 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21748,7 +21768,7 @@ return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(220 /* AwaitExpression */); + const node = createBaseNode(221 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -21757,7 +21777,7 @@ return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(221 /* PrefixUnaryExpression */); + const node = createBaseNode(222 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -21770,7 +21790,7 @@ return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(222 /* PostfixUnaryExpression */); + const node = createBaseNode(223 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -21783,7 +21803,7 @@ return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(223 /* BinaryExpression */); + const node = createBaseDeclaration(224 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -21803,7 +21823,7 @@ } else if (isLogicalOrCoalescingAssignmentOperator(operatorKind)) { node.transformFlags |= 16 /* ContainsES2021 */; } - if (operatorKind === 101 /* InKeyword */ && isPrivateIdentifier(node.left)) { + if (operatorKind === 102 /* InKeyword */ && isPrivateIdentifier(node.left)) { node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */; } node.jsDoc = void 0; @@ -21816,7 +21836,7 @@ return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(224 /* ConditionalExpression */); + const node = createBaseNode(225 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken != null ? questionToken : createToken(57 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -21829,7 +21849,7 @@ return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(225 /* TemplateExpression */); + const node = createBaseNode(226 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -21904,7 +21924,7 @@ } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(226 /* YieldExpression */); + const node = createBaseNode(227 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -21914,7 +21934,7 @@ return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(227 /* SpreadElement */); + const node = createBaseNode(228 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -21923,7 +21943,7 @@ return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(228 /* ClassExpression */); + const node = createBaseDeclaration(229 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -21937,10 +21957,10 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(229 /* OmittedExpression */); + return createBaseNode(230 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(230 /* ExpressionWithTypeArguments */); + const node = createBaseNode(231 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -21954,7 +21974,7 @@ return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(231 /* AsExpression */); + const node = createBaseNode(232 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -21964,7 +21984,7 @@ return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(232 /* NonNullExpression */); + const node = createBaseNode(233 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -21980,7 +22000,7 @@ return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(235 /* SatisfiesExpression */); + const node = createBaseNode(236 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -21990,7 +22010,7 @@ return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(232 /* NonNullExpression */); + const node = createBaseNode(233 /* NonNullExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, @@ -22005,15 +22025,15 @@ return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(233 /* MetaProperty */); + const node = createBaseNode(234 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); switch (keywordToken) { - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: node.transformFlags |= 1024 /* ContainsES2015 */; break; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: node.transformFlags |= 4 /* ContainsESNext */; break; default: @@ -22026,7 +22046,7 @@ return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(236 /* TemplateSpan */); + const node = createBaseNode(237 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -22036,12 +22056,12 @@ return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(237 /* SemicolonClassElement */); + const node = createBaseNode(238 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(238 /* Block */); + const node = createBaseNode(239 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -22054,7 +22074,7 @@ return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(240 /* VariableStatement */); + const node = createBaseNode(241 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -22069,12 +22089,12 @@ return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(239 /* EmptyStatement */); + const node = createBaseNode(240 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(241 /* ExpressionStatement */); + const node = createBaseNode(242 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -22085,7 +22105,7 @@ return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(242 /* IfStatement */); + const node = createBaseNode(243 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -22098,7 +22118,7 @@ return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(243 /* DoStatement */); + const node = createBaseNode(244 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -22110,7 +22130,7 @@ return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(244 /* WhileStatement */); + const node = createBaseNode(245 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -22122,7 +22142,7 @@ return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(245 /* ForStatement */); + const node = createBaseNode(246 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -22138,7 +22158,7 @@ return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(246 /* ForInStatement */); + const node = createBaseNode(247 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -22153,7 +22173,7 @@ return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(247 /* ForOfStatement */); + const node = createBaseNode(248 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -22171,7 +22191,7 @@ return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(248 /* ContinueStatement */); + const node = createBaseNode(249 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22182,7 +22202,7 @@ return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(249 /* BreakStatement */); + const node = createBaseNode(250 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22193,7 +22213,7 @@ return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(250 /* ReturnStatement */); + const node = createBaseNode(251 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22204,7 +22224,7 @@ return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(251 /* WithStatement */); + const node = createBaseNode(252 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -22216,7 +22236,7 @@ return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(252 /* SwitchStatement */); + const node = createBaseNode(253 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -22229,7 +22249,7 @@ return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(253 /* LabeledStatement */); + const node = createBaseNode(254 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -22241,7 +22261,7 @@ return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(254 /* ThrowStatement */); + const node = createBaseNode(255 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -22252,7 +22272,7 @@ return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(255 /* TryStatement */); + const node = createBaseNode(256 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -22265,14 +22285,14 @@ return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(256 /* DebuggerStatement */); + const node = createBaseNode(257 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { var _a2; - const node = createBaseDeclaration(257 /* VariableDeclaration */); + const node = createBaseDeclaration(258 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -22285,7 +22305,7 @@ return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(258 /* VariableDeclarationList */); + const node = createBaseNode(259 /* VariableDeclarationList */); node.flags |= flags2 & 3 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -22298,7 +22318,7 @@ return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(259 /* FunctionDeclaration */); + const node = createBaseDeclaration(260 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -22334,7 +22354,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(260 /* ClassDeclaration */); + const node = createBaseDeclaration(261 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22355,7 +22375,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(261 /* InterfaceDeclaration */); + const node = createBaseDeclaration(262 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22369,7 +22389,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(262 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(263 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22384,7 +22404,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(263 /* EnumDeclaration */); + const node = createBaseDeclaration(264 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -22397,7 +22417,7 @@ return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(264 /* ModuleDeclaration */); + const node = createBaseDeclaration(265 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); node.name = name; @@ -22417,7 +22437,7 @@ return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(265 /* ModuleBlock */); + const node = createBaseNode(266 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -22427,7 +22447,7 @@ return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(266 /* CaseBlock */); + const node = createBaseNode(267 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -22438,7 +22458,7 @@ return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(267 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(268 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -22455,7 +22475,7 @@ return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(268 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(269 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -22472,7 +22492,7 @@ return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(269 /* ImportDeclaration */); + const node = createBaseNode(270 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -22486,7 +22506,7 @@ return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(270 /* ImportClause */); + const node = createBaseDeclaration(271 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -22501,7 +22521,7 @@ return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(296 /* AssertClause */); + const node = createBaseNode(297 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -22511,7 +22531,7 @@ return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(297 /* AssertEntry */); + const node = createBaseNode(298 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -22521,7 +22541,7 @@ return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(298 /* ImportTypeAssertionContainer */); + const node = createBaseNode(299 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -22530,7 +22550,7 @@ return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(271 /* NamespaceImport */); + const node = createBaseDeclaration(272 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22540,7 +22560,7 @@ return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(277 /* NamespaceExport */); + const node = createBaseDeclaration(278 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22550,7 +22570,7 @@ return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(272 /* NamedImports */); + const node = createBaseNode(273 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22560,7 +22580,7 @@ return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(273 /* ImportSpecifier */); + const node = createBaseDeclaration(274 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -22572,7 +22592,7 @@ return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment2(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(274 /* ExportAssignment */); + const node = createBaseDeclaration(275 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -22590,7 +22610,7 @@ return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(275 /* ExportDeclaration */); + const node = createBaseDeclaration(276 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -22613,7 +22633,7 @@ return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(276 /* NamedExports */); + const node = createBaseNode(277 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22623,7 +22643,7 @@ return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(278 /* ExportSpecifier */); + const node = createBaseNode(279 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -22636,12 +22656,12 @@ return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(279 /* MissingDeclaration */); + const node = createBaseDeclaration(280 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(280 /* ExternalModuleReference */); + const node = createBaseNode(281 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22673,7 +22693,7 @@ return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(320 /* JSDocFunctionType */); + const node = createBaseDeclaration(321 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -22687,7 +22707,7 @@ return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(325 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(326 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -22696,7 +22716,7 @@ return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(312 /* JSDocTypeExpression */); + const node = createBaseNode(313 /* JSDocTypeExpression */); node.type = type; return node; } @@ -22704,7 +22724,7 @@ return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(326 /* JSDocSignature */); + const node = createBaseDeclaration(327 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -22733,7 +22753,7 @@ return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(348 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); + const node = createBaseJSDocTag(349 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -22742,7 +22762,7 @@ return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(349 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(350 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -22754,7 +22774,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(344 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(345 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -22765,7 +22785,7 @@ return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(351 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(352 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -22776,7 +22796,7 @@ return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(341 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(342 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -22788,7 +22808,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(342 /* JSDocOverloadTag */, tagName != null ? tagName : createIdentifier("overload"), comment); + const node = createBaseJSDocTag(343 /* JSDocOverloadTag */, tagName != null ? tagName : createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -22796,7 +22816,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(331 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); + const node = createBaseJSDocTag(332 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); node.class = className; return node; } @@ -22804,12 +22824,12 @@ return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(332 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); + const node = createBaseJSDocTag(333 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(350 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); + const node = createBaseJSDocTag(351 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); node.name = name; return node; } @@ -22817,7 +22837,7 @@ return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(313 /* JSDocNameReference */); + const node = createBaseNode(314 /* JSDocNameReference */); node.name = name; return node; } @@ -22825,7 +22845,7 @@ return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(314 /* JSDocMemberName */); + const node = createBaseNode(315 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -22835,7 +22855,7 @@ return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(327 /* JSDocLink */); + const node = createBaseNode(328 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -22844,7 +22864,7 @@ return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(328 /* JSDocLinkCode */); + const node = createBaseNode(329 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -22853,7 +22873,7 @@ return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(329 /* JSDocLinkPlain */); + const node = createBaseNode(330 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -22880,14 +22900,14 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(330 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(331 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(343 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(343 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(344 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(344 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -22897,7 +22917,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(324 /* JSDocText */); + const node = createBaseNode(325 /* JSDocText */); node.text = text; return node; } @@ -22905,7 +22925,7 @@ return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(323 /* JSDoc */); + const node = createBaseNode(324 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -22914,7 +22934,7 @@ return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(281 /* JsxElement */); + const node = createBaseNode(282 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -22925,7 +22945,7 @@ return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(282 /* JsxSelfClosingElement */); + const node = createBaseNode(283 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -22939,7 +22959,7 @@ return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(283 /* JsxOpeningElement */); + const node = createBaseNode(284 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -22953,7 +22973,7 @@ return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(284 /* JsxClosingElement */); + const node = createBaseNode(285 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -22962,7 +22982,7 @@ return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(285 /* JsxFragment */); + const node = createBaseNode(286 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -22983,17 +23003,17 @@ return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(286 /* JsxOpeningFragment */); + const node = createBaseNode(287 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(287 /* JsxClosingFragment */); + const node = createBaseNode(288 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(288 /* JsxAttribute */); + const node = createBaseDeclaration(289 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -23003,7 +23023,7 @@ return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(289 /* JsxAttributes */); + const node = createBaseDeclaration(290 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -23012,7 +23032,7 @@ return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(290 /* JsxSpreadAttribute */); + const node = createBaseNode(291 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -23021,7 +23041,7 @@ return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(291 /* JsxExpression */); + const node = createBaseNode(292 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -23031,7 +23051,7 @@ return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(292 /* CaseClause */); + const node = createBaseNode(293 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -23042,7 +23062,7 @@ return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(293 /* DefaultClause */); + const node = createBaseNode(294 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -23051,15 +23071,15 @@ return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(294 /* HeritageClause */); + const node = createBaseNode(295 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); switch (token) { - case 94 /* ExtendsKeyword */: + case 95 /* ExtendsKeyword */: node.transformFlags |= 1024 /* ContainsES2015 */; break; - case 117 /* ImplementsKeyword */: + case 118 /* ImplementsKeyword */: node.transformFlags |= 1 /* ContainsTypeScript */; break; default: @@ -23071,7 +23091,7 @@ return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(295 /* CatchClause */); + const node = createBaseNode(296 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -23083,7 +23103,7 @@ return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(299 /* PropertyAssignment */); + const node = createBaseDeclaration(300 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -23105,7 +23125,7 @@ return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(300 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(301 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -23129,7 +23149,7 @@ return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(301 /* SpreadAssignment */); + const node = createBaseDeclaration(302 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -23139,7 +23159,7 @@ return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(302 /* EnumMember */); + const node = createBaseDeclaration(303 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -23150,7 +23170,7 @@ return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(309 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -23231,7 +23251,7 @@ return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(309 /* SourceFile */); node.flags |= source.flags & ~8 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { @@ -23265,7 +23285,7 @@ return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(309 /* Bundle */); + const node = createBaseNode(310 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; @@ -23278,7 +23298,7 @@ return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(310 /* UnparsedSource */); + const node = createBaseNode(311 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -23295,48 +23315,48 @@ return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(303 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(304 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(304 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(305 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 306 /* UnparsedInternalText */ : 305 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 307 /* UnparsedInternalText */ : 306 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(307 /* UnparsedSyntheticReference */); + const node = createBaseNode(308 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(311 /* InputFiles */); + const node = createBaseNode(312 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(234 /* SyntheticExpression */); + const node = createBaseNode(235 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList3(children) { - const node = createBaseNode(354 /* SyntaxList */); + const node = createBaseNode(355 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(355 /* NotEmittedStatement */); + const node = createBaseNode(356 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(356 /* PartiallyEmittedExpression */); + const node = createBaseNode(357 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -23358,7 +23378,7 @@ return node; } function createCommaListExpression(elements) { - const node = createBaseNode(357 /* CommaListExpression */); + const node = createBaseNode(358 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -23367,19 +23387,19 @@ return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createEndOfDeclarationMarker(original) { - const node = createBaseNode(359 /* EndOfDeclarationMarker */); + const node = createBaseNode(360 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createMergeDeclarationMarker(original) { - const node = createBaseNode(358 /* MergeDeclarationMarker */); + const node = createBaseNode(359 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(360 /* SyntheticReferenceExpression */); + const node = createBaseNode(361 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -23612,17 +23632,17 @@ } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 231 /* AsExpression */: + case 232 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -23657,18 +23677,18 @@ switch (target.kind) { case 79 /* Identifier */: return cacheIdentifiers; - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: return false; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -23980,43 +24000,43 @@ } function getDefaultTagNameForKind(kind) { switch (kind) { - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return "type"; - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: return "returns"; - case 346 /* JSDocThisTag */: + case 347 /* JSDocThisTag */: return "this"; - case 343 /* JSDocEnumTag */: + case 344 /* JSDocEnumTag */: return "enum"; - case 333 /* JSDocAuthorTag */: + case 334 /* JSDocAuthorTag */: return "author"; - case 335 /* JSDocClassTag */: + case 336 /* JSDocClassTag */: return "class"; - case 336 /* JSDocPublicTag */: + case 337 /* JSDocPublicTag */: return "public"; - case 337 /* JSDocPrivateTag */: + case 338 /* JSDocPrivateTag */: return "private"; - case 338 /* JSDocProtectedTag */: + case 339 /* JSDocProtectedTag */: return "protected"; - case 339 /* JSDocReadonlyTag */: + case 340 /* JSDocReadonlyTag */: return "readonly"; - case 340 /* JSDocOverrideTag */: + case 341 /* JSDocOverrideTag */: return "override"; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return "template"; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return "typedef"; - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return "param"; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return "prop"; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: return "callback"; - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return "overload"; - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return "augments"; - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -24098,70 +24118,70 @@ children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */) { + if (kind >= 180 /* FirstTypeNode */ && kind <= 203 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 206 /* ArrayLiteralExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 207 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 166 /* Parameter */: + case 167 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 173 /* Constructor */: + case 174 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; - case 131 /* AnyKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 144 /* NeverKeyword */: - case 152 /* StringKeyword */: - case 149 /* ObjectKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 114 /* VoidKeyword */: - case 165 /* TypeParameter */: - case 168 /* PropertySignature */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 132 /* AnyKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 145 /* NeverKeyword */: + case 153 /* StringKeyword */: + case 150 /* ObjectKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 115 /* VoidKeyword */: + case 166 /* TypeParameter */: + case 169 /* PropertySignature */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 295 /* CatchClause */: + case 296 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 213 /* TypeAssertionExpression */: - case 235 /* SatisfiesExpression */: - case 231 /* AsExpression */: - case 356 /* PartiallyEmittedExpression */: - case 214 /* ParenthesizedExpression */: - case 106 /* SuperKeyword */: + case 214 /* TypeAssertionExpression */: + case 236 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 357 /* PartiallyEmittedExpression */: + case 215 /* ParenthesizedExpression */: + case 107 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -24510,7 +24530,7 @@ var _a2; if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = (_a2 = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node)))) != null ? _a2 : Debug.fail("Could not determine parsed source file."); @@ -24919,7 +24939,7 @@ void 0, factory2.createBinaryExpression( propertyName, - 101 /* InKeyword */, + 102 /* InKeyword */, factory2.createIdentifier("obj") ) ) @@ -25825,619 +25845,619 @@ return node.kind === 80 /* PrivateIdentifier */; } function isExportModifier(node) { - return node.kind === 93 /* ExportKeyword */; + return node.kind === 94 /* ExportKeyword */; } function isDefaultModifier(node) { - return node.kind === 88 /* DefaultKeyword */; + return node.kind === 89 /* DefaultKeyword */; } function isAsyncModifier(node) { - return node.kind === 132 /* AsyncKeyword */; + return node.kind === 133 /* AsyncKeyword */; } function isAssertsKeyword(node) { - return node.kind === 129 /* AssertsKeyword */; + return node.kind === 130 /* AssertsKeyword */; } function isAwaitKeyword(node) { - return node.kind === 133 /* AwaitKeyword */; + return node.kind === 134 /* AwaitKeyword */; } function isReadonlyKeyword(node) { - return node.kind === 146 /* ReadonlyKeyword */; + return node.kind === 147 /* ReadonlyKeyword */; } function isStaticModifier(node) { - return node.kind === 124 /* StaticKeyword */; + return node.kind === 125 /* StaticKeyword */; } function isAbstractModifier(node) { - return node.kind === 126 /* AbstractKeyword */; + return node.kind === 127 /* AbstractKeyword */; } function isOverrideModifier(node) { - return node.kind === 161 /* OverrideKeyword */; + return node.kind === 162 /* OverrideKeyword */; } function isAccessorModifier(node) { - return node.kind === 127 /* AccessorKeyword */; + return node.kind === 128 /* AccessorKeyword */; } function isSuperKeyword(node) { - return node.kind === 106 /* SuperKeyword */; + return node.kind === 107 /* SuperKeyword */; } function isImportKeyword(node) { - return node.kind === 100 /* ImportKeyword */; + return node.kind === 101 /* ImportKeyword */; } function isCaseKeyword(node) { - return node.kind === 82 /* CaseKeyword */; + return node.kind === 83 /* CaseKeyword */; } function isQualifiedName(node) { - return node.kind === 163 /* QualifiedName */; + return node.kind === 164 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 164 /* ComputedPropertyName */; + return node.kind === 165 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 165 /* TypeParameter */; + return node.kind === 166 /* TypeParameter */; } function isParameter(node) { - return node.kind === 166 /* Parameter */; + return node.kind === 167 /* Parameter */; } function isDecorator(node) { - return node.kind === 167 /* Decorator */; + return node.kind === 168 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 168 /* PropertySignature */; + return node.kind === 169 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 169 /* PropertyDeclaration */; + return node.kind === 170 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 170 /* MethodSignature */; + return node.kind === 171 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 171 /* MethodDeclaration */; + return node.kind === 172 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 172 /* ClassStaticBlockDeclaration */; + return node.kind === 173 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 173 /* Constructor */; + return node.kind === 174 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 174 /* GetAccessor */; + return node.kind === 175 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 175 /* SetAccessor */; + return node.kind === 176 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 176 /* CallSignature */; + return node.kind === 177 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 177 /* ConstructSignature */; + return node.kind === 178 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 178 /* IndexSignature */; + return node.kind === 179 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 179 /* TypePredicate */; + return node.kind === 180 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 180 /* TypeReference */; + return node.kind === 181 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 181 /* FunctionType */; + return node.kind === 182 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 182 /* ConstructorType */; + return node.kind === 183 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 183 /* TypeQuery */; + return node.kind === 184 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 184 /* TypeLiteral */; + return node.kind === 185 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 185 /* ArrayType */; + return node.kind === 186 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 186 /* TupleType */; + return node.kind === 187 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 199 /* NamedTupleMember */; + return node.kind === 200 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 187 /* OptionalType */; + return node.kind === 188 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 188 /* RestType */; + return node.kind === 189 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 189 /* UnionType */; + return node.kind === 190 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 190 /* IntersectionType */; + return node.kind === 191 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 191 /* ConditionalType */; + return node.kind === 192 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 192 /* InferType */; + return node.kind === 193 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 193 /* ParenthesizedType */; + return node.kind === 194 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 194 /* ThisType */; + return node.kind === 195 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 195 /* TypeOperator */; + return node.kind === 196 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 196 /* IndexedAccessType */; + return node.kind === 197 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 197 /* MappedType */; + return node.kind === 198 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 198 /* LiteralType */; + return node.kind === 199 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 202 /* ImportType */; + return node.kind === 203 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 201 /* TemplateLiteralTypeSpan */; + return node.kind === 202 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 200 /* TemplateLiteralType */; + return node.kind === 201 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 203 /* ObjectBindingPattern */; + return node.kind === 204 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 204 /* ArrayBindingPattern */; + return node.kind === 205 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 205 /* BindingElement */; + return node.kind === 206 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 206 /* ArrayLiteralExpression */; + return node.kind === 207 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 207 /* ObjectLiteralExpression */; + return node.kind === 208 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 208 /* PropertyAccessExpression */; + return node.kind === 209 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 209 /* ElementAccessExpression */; + return node.kind === 210 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 210 /* CallExpression */; + return node.kind === 211 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 211 /* NewExpression */; + return node.kind === 212 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 212 /* TaggedTemplateExpression */; + return node.kind === 213 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 213 /* TypeAssertionExpression */; + return node.kind === 214 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 214 /* ParenthesizedExpression */; + return node.kind === 215 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 215 /* FunctionExpression */; + return node.kind === 216 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 216 /* ArrowFunction */; + return node.kind === 217 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 217 /* DeleteExpression */; + return node.kind === 218 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 218 /* TypeOfExpression */; + return node.kind === 219 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 219 /* VoidExpression */; + return node.kind === 220 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 220 /* AwaitExpression */; + return node.kind === 221 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 221 /* PrefixUnaryExpression */; + return node.kind === 222 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 222 /* PostfixUnaryExpression */; + return node.kind === 223 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 223 /* BinaryExpression */; + return node.kind === 224 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 224 /* ConditionalExpression */; + return node.kind === 225 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 225 /* TemplateExpression */; + return node.kind === 226 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 226 /* YieldExpression */; + return node.kind === 227 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 227 /* SpreadElement */; + return node.kind === 228 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 228 /* ClassExpression */; + return node.kind === 229 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 229 /* OmittedExpression */; + return node.kind === 230 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 230 /* ExpressionWithTypeArguments */; + return node.kind === 231 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 231 /* AsExpression */; + return node.kind === 232 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 235 /* SatisfiesExpression */; + return node.kind === 236 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 232 /* NonNullExpression */; + return node.kind === 233 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 233 /* MetaProperty */; + return node.kind === 234 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 234 /* SyntheticExpression */; + return node.kind === 235 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 356 /* PartiallyEmittedExpression */; + return node.kind === 357 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 357 /* CommaListExpression */; + return node.kind === 358 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 236 /* TemplateSpan */; + return node.kind === 237 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 237 /* SemicolonClassElement */; + return node.kind === 238 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 238 /* Block */; + return node.kind === 239 /* Block */; } function isVariableStatement(node) { - return node.kind === 240 /* VariableStatement */; + return node.kind === 241 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 239 /* EmptyStatement */; + return node.kind === 240 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 241 /* ExpressionStatement */; + return node.kind === 242 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 242 /* IfStatement */; + return node.kind === 243 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 243 /* DoStatement */; + return node.kind === 244 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 244 /* WhileStatement */; + return node.kind === 245 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 245 /* ForStatement */; + return node.kind === 246 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 246 /* ForInStatement */; + return node.kind === 247 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 247 /* ForOfStatement */; + return node.kind === 248 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 248 /* ContinueStatement */; + return node.kind === 249 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 249 /* BreakStatement */; + return node.kind === 250 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 250 /* ReturnStatement */; + return node.kind === 251 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 251 /* WithStatement */; + return node.kind === 252 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 252 /* SwitchStatement */; + return node.kind === 253 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 253 /* LabeledStatement */; + return node.kind === 254 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 254 /* ThrowStatement */; + return node.kind === 255 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 255 /* TryStatement */; + return node.kind === 256 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 256 /* DebuggerStatement */; + return node.kind === 257 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 257 /* VariableDeclaration */; + return node.kind === 258 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 258 /* VariableDeclarationList */; + return node.kind === 259 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 259 /* FunctionDeclaration */; + return node.kind === 260 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 260 /* ClassDeclaration */; + return node.kind === 261 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 261 /* InterfaceDeclaration */; + return node.kind === 262 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 262 /* TypeAliasDeclaration */; + return node.kind === 263 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 263 /* EnumDeclaration */; + return node.kind === 264 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */; + return node.kind === 265 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 265 /* ModuleBlock */; + return node.kind === 266 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 266 /* CaseBlock */; + return node.kind === 267 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 267 /* NamespaceExportDeclaration */; + return node.kind === 268 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */; + return node.kind === 269 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 269 /* ImportDeclaration */; + return node.kind === 270 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 270 /* ImportClause */; + return node.kind === 271 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 298 /* ImportTypeAssertionContainer */; + return node.kind === 299 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 296 /* AssertClause */; + return node.kind === 297 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 297 /* AssertEntry */; + return node.kind === 298 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 271 /* NamespaceImport */; + return node.kind === 272 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 277 /* NamespaceExport */; + return node.kind === 278 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 272 /* NamedImports */; + return node.kind === 273 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 273 /* ImportSpecifier */; + return node.kind === 274 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 274 /* ExportAssignment */; + return node.kind === 275 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 275 /* ExportDeclaration */; + return node.kind === 276 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 276 /* NamedExports */; + return node.kind === 277 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 278 /* ExportSpecifier */; + return node.kind === 279 /* ExportSpecifier */; } function isMissingDeclaration(node) { - return node.kind === 279 /* MissingDeclaration */; + return node.kind === 280 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 355 /* NotEmittedStatement */; + return node.kind === 356 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 360 /* SyntheticReferenceExpression */; + return node.kind === 361 /* SyntheticReferenceExpression */; } function isMergeDeclarationMarker(node) { - return node.kind === 358 /* MergeDeclarationMarker */; + return node.kind === 359 /* MergeDeclarationMarker */; } function isEndOfDeclarationMarker(node) { - return node.kind === 359 /* EndOfDeclarationMarker */; + return node.kind === 360 /* EndOfDeclarationMarker */; } function isExternalModuleReference(node) { - return node.kind === 280 /* ExternalModuleReference */; + return node.kind === 281 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 281 /* JsxElement */; + return node.kind === 282 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 282 /* JsxSelfClosingElement */; + return node.kind === 283 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 283 /* JsxOpeningElement */; + return node.kind === 284 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 284 /* JsxClosingElement */; + return node.kind === 285 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 285 /* JsxFragment */; + return node.kind === 286 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 286 /* JsxOpeningFragment */; + return node.kind === 287 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 287 /* JsxClosingFragment */; + return node.kind === 288 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 288 /* JsxAttribute */; + return node.kind === 289 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 289 /* JsxAttributes */; + return node.kind === 290 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 290 /* JsxSpreadAttribute */; + return node.kind === 291 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 291 /* JsxExpression */; + return node.kind === 292 /* JsxExpression */; } function isCaseClause(node) { - return node.kind === 292 /* CaseClause */; + return node.kind === 293 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 293 /* DefaultClause */; + return node.kind === 294 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 294 /* HeritageClause */; + return node.kind === 295 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 295 /* CatchClause */; + return node.kind === 296 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 299 /* PropertyAssignment */; + return node.kind === 300 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 300 /* ShorthandPropertyAssignment */; + return node.kind === 301 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 301 /* SpreadAssignment */; + return node.kind === 302 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 302 /* EnumMember */; + return node.kind === 303 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 304 /* UnparsedPrepend */; + return node.kind === 305 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 308 /* SourceFile */; + return node.kind === 309 /* SourceFile */; } function isBundle(node) { - return node.kind === 309 /* Bundle */; + return node.kind === 310 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 310 /* UnparsedSource */; + return node.kind === 311 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 312 /* JSDocTypeExpression */; + return node.kind === 313 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 313 /* JSDocNameReference */; + return node.kind === 314 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 314 /* JSDocMemberName */; + return node.kind === 315 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 327 /* JSDocLink */; + return node.kind === 328 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 328 /* JSDocLinkCode */; + return node.kind === 329 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 329 /* JSDocLinkPlain */; + return node.kind === 330 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 315 /* JSDocAllType */; + return node.kind === 316 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 316 /* JSDocUnknownType */; + return node.kind === 317 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 317 /* JSDocNullableType */; + return node.kind === 318 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 318 /* JSDocNonNullableType */; + return node.kind === 319 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 319 /* JSDocOptionalType */; + return node.kind === 320 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 320 /* JSDocFunctionType */; + return node.kind === 321 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 321 /* JSDocVariadicType */; + return node.kind === 322 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 322 /* JSDocNamepathType */; + return node.kind === 323 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 323 /* JSDoc */; + return node.kind === 324 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 325 /* JSDocTypeLiteral */; + return node.kind === 326 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 326 /* JSDocSignature */; + return node.kind === 327 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 331 /* JSDocAugmentsTag */; + return node.kind === 332 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 333 /* JSDocAuthorTag */; + return node.kind === 334 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 335 /* JSDocClassTag */; + return node.kind === 336 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 341 /* JSDocCallbackTag */; + return node.kind === 342 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 336 /* JSDocPublicTag */; + return node.kind === 337 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 337 /* JSDocPrivateTag */; + return node.kind === 338 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 338 /* JSDocProtectedTag */; + return node.kind === 339 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 339 /* JSDocReadonlyTag */; + return node.kind === 340 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 340 /* JSDocOverrideTag */; + return node.kind === 341 /* JSDocOverrideTag */; } function isJSDocOverloadTag(node) { - return node.kind === 342 /* JSDocOverloadTag */; + return node.kind === 343 /* JSDocOverloadTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 334 /* JSDocDeprecatedTag */; + return node.kind === 335 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 350 /* JSDocSeeTag */; + return node.kind === 351 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 343 /* JSDocEnumTag */; + return node.kind === 344 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 344 /* JSDocParameterTag */; + return node.kind === 345 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 345 /* JSDocReturnTag */; + return node.kind === 346 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 346 /* JSDocThisTag */; + return node.kind === 347 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 347 /* JSDocTypeTag */; + return node.kind === 348 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 348 /* JSDocTemplateTag */; + return node.kind === 349 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 349 /* JSDocTypedefTag */; + return node.kind === 350 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 330 /* JSDocTag */; + return node.kind === 331 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 351 /* JSDocPropertyTag */; + return node.kind === 352 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 332 /* JSDocImplementsTag */; + return node.kind === 333 /* JSDocImplementsTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 353 /* JSDocSatisfiesTag */; + return node.kind === 354 /* JSDocSatisfiesTag */; } function isJSDocThrowsTag(node) { - return node.kind === 352 /* JSDocThrowsTag */; + return node.kind === 353 /* JSDocThrowsTag */; } function isSyntaxList(n) { - return n.kind === 354 /* SyntaxList */; + return n.kind === 355 /* SyntaxList */; } var init_nodeTests = __esm({ "src/compiler/factory/nodeTests.ts"() { @@ -26751,14 +26771,14 @@ Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -26811,7 +26831,7 @@ return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaExpression(node) { - return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */; + return node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -26826,19 +26846,19 @@ } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 235 /* SatisfiesExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 236 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -26975,10 +26995,10 @@ const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 269 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 270 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 275 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 276 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -27041,11 +27061,11 @@ } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -27064,11 +27084,11 @@ } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 166 /* Parameter */: - case 205 /* BindingElement */: + case 167 /* Parameter */: + case 206 /* BindingElement */: return bindingElement.dotDotDotToken; - case 227 /* SpreadElement */: - case 301 /* SpreadAssignment */: + case 228 /* SpreadElement */: + case 302 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -27080,7 +27100,7 @@ } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 205 /* BindingElement */: + case 206 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -27089,7 +27109,7 @@ return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -27098,7 +27118,7 @@ return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -27115,11 +27135,11 @@ } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return name.elements; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return name.properties; } } @@ -27136,19 +27156,19 @@ } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 175 /* SetAccessor */; + return kind === 174 /* Constructor */ || kind === 176 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 174 /* Constructor */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 259 /* FunctionDeclaration */ || kind === 173 /* Constructor */ || kind === 178 /* IndexSignature */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 240 /* VariableStatement */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */; + return kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 260 /* FunctionDeclaration */ || kind === 174 /* Constructor */ || kind === 179 /* IndexSignature */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 280 /* MissingDeclaration */ || kind === 241 /* VariableStatement */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 275 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 172 /* ClassStaticBlockDeclaration */ || kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 279 /* MissingDeclaration */ || kind === 267 /* NamespaceExportDeclaration */; + return kind === 173 /* ClassStaticBlockDeclaration */ || kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 280 /* MissingDeclaration */ || kind === 268 /* NamespaceExportDeclaration */; } function isQuestionOrExclamationToken(node) { return isQuestionToken(node) || isExclamationToken(node); @@ -27167,7 +27187,7 @@ } function isLiteralTypeLikeExpression(node) { const kind = node.kind; - return kind === 104 /* NullKeyword */ || kind === 110 /* TrueKeyword */ || kind === 95 /* FalseKeyword */ || isLiteralExpression(node) || isPrefixUnaryExpression(node); + return kind === 105 /* NullKeyword */ || kind === 111 /* TrueKeyword */ || kind === 96 /* FalseKeyword */ || isLiteralExpression(node) || isPrefixUnaryExpression(node); } function isExponentiationOperator(kind) { return kind === 42 /* AsteriskAsteriskToken */; @@ -27191,7 +27211,7 @@ return isShiftOperator(kind) || isAdditiveOperatorOrHigher(kind); } function isRelationalOperator(kind) { - return kind === 29 /* LessThanToken */ || kind === 32 /* LessThanEqualsToken */ || kind === 31 /* GreaterThanToken */ || kind === 33 /* GreaterThanEqualsToken */ || kind === 102 /* InstanceOfKeyword */ || kind === 101 /* InKeyword */; + return kind === 29 /* LessThanToken */ || kind === 32 /* LessThanEqualsToken */ || kind === 31 /* GreaterThanToken */ || kind === 33 /* GreaterThanEqualsToken */ || kind === 103 /* InstanceOfKeyword */ || kind === 102 /* InKeyword */; } function isRelationalOperatorOrHigher(kind) { return isRelationalOperator(kind) || isShiftOperatorOrHigher(kind); @@ -27240,7 +27260,7 @@ } } function isExportOrDefaultKeywordKind(kind) { - return kind === 93 /* ExportKeyword */ || kind === 88 /* DefaultKeyword */; + return kind === 94 /* ExportKeyword */ || kind === 89 /* DefaultKeyword */; } function isExportOrDefaultModifier(node) { const kind = node.kind; @@ -27553,11 +27573,11 @@ } function canHaveModifiers(node) { const kind = node.kind; - return kind === 165 /* TypeParameter */ || kind === 166 /* Parameter */ || kind === 168 /* PropertySignature */ || kind === 169 /* PropertyDeclaration */ || kind === 170 /* MethodSignature */ || kind === 171 /* MethodDeclaration */ || kind === 173 /* Constructor */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 178 /* IndexSignature */ || kind === 182 /* ConstructorType */ || kind === 215 /* FunctionExpression */ || kind === 216 /* ArrowFunction */ || kind === 228 /* ClassExpression */ || kind === 240 /* VariableStatement */ || kind === 259 /* FunctionDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 275 /* ExportDeclaration */; + return kind === 166 /* TypeParameter */ || kind === 167 /* Parameter */ || kind === 169 /* PropertySignature */ || kind === 170 /* PropertyDeclaration */ || kind === 171 /* MethodSignature */ || kind === 172 /* MethodDeclaration */ || kind === 174 /* Constructor */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 179 /* IndexSignature */ || kind === 183 /* ConstructorType */ || kind === 216 /* FunctionExpression */ || kind === 217 /* ArrowFunction */ || kind === 229 /* ClassExpression */ || kind === 241 /* VariableStatement */ || kind === 260 /* FunctionDeclaration */ || kind === 261 /* ClassDeclaration */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 275 /* ExportAssignment */ || kind === 276 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 166 /* Parameter */ || kind === 169 /* PropertyDeclaration */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 228 /* ClassExpression */ || kind === 260 /* ClassDeclaration */; + return kind === 167 /* Parameter */ || kind === 170 /* PropertyDeclaration */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 229 /* ClassExpression */ || kind === 261 /* ClassDeclaration */; } var init_utilitiesPublic2 = __esm({ "src/compiler/factory/utilitiesPublic.ts"() { @@ -27590,7 +27610,7 @@ return forEach(sourceFile.statements, isAnExternalModuleIndicatorNode) || getImportMetaIfNecessary(sourceFile); } function isAnExternalModuleIndicatorNode(node) { - return canHaveModifiers(node) && hasModifierOfKind(node, 93 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; + return canHaveModifiers(node) && hasModifierOfKind(node, 94 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { return sourceFile.flags & 4194304 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; @@ -27602,7 +27622,7 @@ return some(node.modifiers, (m) => m.kind === kind); } function isImportMeta2(node) { - return isMetaProperty(node) && node.keywordToken === 100 /* ImportKeyword */ && node.name.escapedText === "meta"; + return isMetaProperty(node) && node.keywordToken === 101 /* ImportKeyword */ && node.name.escapedText === "meta"; } function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -27657,7 +27677,7 @@ return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 162 /* LastToken */) { + if (node === void 0 || node.kind <= 163 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -27692,7 +27712,7 @@ continue; return res; } - if (current.kind >= 163 /* FirstNode */) { + if (current.kind >= 164 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -27991,7 +28011,7 @@ if (lhs.kind === 79 /* Identifier */) { return lhs.escapedText === rhs.escapedText; } - if (lhs.kind === 108 /* ThisKeyword */) { + if (lhs.kind === 109 /* ThisKeyword */) { return true; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -28012,425 +28032,425 @@ }; parseNodeFactory = createNodeFactory(1 /* NoParenthesizerRules */, parseBaseNodeFactory); forEachChildTable = { - [163 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [164 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [165 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [166 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [300 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [301 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [301 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [302 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [166 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [167 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [169 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [170 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [168 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [169 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [299 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [300 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [257 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [258 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [205 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [206 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [178 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [179 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [182 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [183 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [181 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [182 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [176 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [177 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [171 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [177 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [178 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [172 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [170 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [171 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [173 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [174 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [174 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [175 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [175 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [176 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [259 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [260 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [215 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [216 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [216 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [217 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [172 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [173 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [180 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [181 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [179 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [180 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [183 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [184 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [184 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [185 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [185 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [186 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [186 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [187 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [189 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [190 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [191 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [190 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [191 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [192 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [192 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [193 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [202 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [203 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [298 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [299 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [193 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [195 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [196 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [194 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [196 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [197 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [197 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [198 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [198 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [199 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [199 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [200 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [203 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [204 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [206 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [204 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [205 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [207 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [207 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [208 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [208 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [209 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [209 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [210 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [210 /* CallExpression */]: forEachChildInCallOrNewExpression, - [211 /* NewExpression */]: forEachChildInCallOrNewExpression, - [212 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [211 /* CallExpression */]: forEachChildInCallOrNewExpression, + [212 /* NewExpression */]: forEachChildInCallOrNewExpression, + [213 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [213 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [214 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [214 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [215 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [217 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [218 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [218 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [219 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [219 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [220 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [222 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [226 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [227 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [220 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [221 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [223 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [223 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [224 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [231 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [232 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [232 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [233 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [235 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [236 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [233 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [234 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [224 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [225 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [227 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [228 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [238 /* Block */]: forEachChildInBlock, - [265 /* ModuleBlock */]: forEachChildInBlock, - [308 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [239 /* Block */]: forEachChildInBlock, + [266 /* ModuleBlock */]: forEachChildInBlock, + [309 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [240 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [241 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [258 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [259 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [241 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [242 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [242 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [243 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [243 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [244 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [244 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [245 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [245 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [246 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [246 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [247 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [247 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [248 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [248 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [249 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [250 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [249 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [250 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [251 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [251 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [252 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [252 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [253 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [266 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [267 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [292 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [293 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [293 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [294 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [253 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [254 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [254 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [255 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [255 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [256 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [295 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [296 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [167 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [168 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [260 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [228 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [261 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [261 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [229 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [262 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [262 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [263 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [263 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [264 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [302 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [303 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [264 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [265 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [268 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [269 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [269 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [270 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [270 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [271 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [296 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [297 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [297 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [298 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [267 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [268 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [271 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [272 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [277 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [278 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [272 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [276 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [275 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [273 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [277 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [276 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [273 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [278 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [274 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [274 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [279 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [275 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [225 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [226 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [236 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [237 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [200 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [201 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [201 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [202 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [164 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [165 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [294 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [295 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [230 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [231 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [280 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [281 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [280 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [358 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [282 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [285 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [286 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [282 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [283 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [289 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [283 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [284 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [290 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [288 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [289 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [290 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [291 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [291 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [292 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [284 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [285 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [187 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [188 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [312 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [317 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [319 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [320 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [188 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [189 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [313 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [319 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [318 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [320 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [322 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [323 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [324 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [350 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [351 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [313 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [314 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [314 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [315 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [344 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [351 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [333 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [345 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [352 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [334 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [332 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [333 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [331 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [332 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [348 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [349 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [349 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 312 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [350 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 313 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [341 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [342 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [345 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [346 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [348 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [347 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [344 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [354 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [353 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [343 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [327 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [327 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [328 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [329 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [325 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [328 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [329 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [330 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [326 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [330 /* JSDocTag */]: forEachChildInJSDocTag, - [335 /* JSDocClassTag */]: forEachChildInJSDocTag, - [336 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [337 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [338 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [340 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [331 /* JSDocTag */]: forEachChildInJSDocTag, + [336 /* JSDocClassTag */]: forEachChildInJSDocTag, + [337 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [338 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [339 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [340 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [335 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [341 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [357 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; ((Parser2) => { var scanner2 = createScanner( @@ -28598,9 +28618,9 @@ case 22 /* OpenBracketToken */: expression2 = parseArrayLiteralExpression(); break; - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: expression2 = parseTokenNode(); break; case 40 /* MinusToken */: @@ -28783,13 +28803,13 @@ speculationHelper(() => { const savedContextFlags = contextFlags; contextFlags |= 32768 /* AwaitContext */; - scanner2.setTextPos(nextStatement.pos); + scanner2.resetTokenState(nextStatement.pos); nextToken(); while (token() !== 1 /* EndOfFileToken */) { - const startPos = scanner2.getStartPos(); + const startPos = scanner2.getTokenFullStart(); const statement = parseListElement(0 /* SourceElements */, parseStatement); statements.push(statement); - if (startPos === scanner2.getStartPos()) { + if (startPos === scanner2.getTokenFullStart()) { nextToken(); } if (pos >= 0) { @@ -28977,7 +28997,7 @@ return inContext(32768 /* AwaitContext */); } function parseErrorAtCurrentToken(message, arg0) { - return parseErrorAt(scanner2.getTokenPos(), scanner2.getTextPos(), message, arg0); + return parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), message, arg0); } function parseErrorAtPosition(start, length2, message, arg0) { const lastError = lastOrUndefined(parseDiagnostics); @@ -28996,10 +29016,10 @@ parseErrorAt(range.pos, range.end, message, arg0); } function scanError(message, length2) { - parseErrorAtPosition(scanner2.getTextPos(), length2, message); + parseErrorAtPosition(scanner2.getTokenEnd(), length2, message); } function getNodePos() { - return scanner2.getStartPos(); + return scanner2.getTokenFullStart(); } function hasPrecedingJSDocComment() { return scanner2.hasPrecedingJSDocComment(); @@ -29016,13 +29036,16 @@ } function nextToken() { if (isKeyword(currentToken) && (scanner2.hasUnicodeEscape() || scanner2.hasExtendedUnicodeEscape())) { - parseErrorAt(scanner2.getTokenPos(), scanner2.getTextPos(), Diagnostics.Keywords_cannot_contain_escape_characters); + parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), Diagnostics.Keywords_cannot_contain_escape_characters); } return nextTokenWithoutCheck(); } function nextTokenJSDoc() { return currentToken = scanner2.scanJsDocToken(); } + function nextJSDocCommentTextToken(inBackticks) { + return currentToken = scanner2.scanJSDocCommentTextToken(inBackticks); + } function reScanGreaterToken() { return currentToken = scanner2.reScanGreaterToken(); } @@ -29076,19 +29099,19 @@ if (token() === 79 /* Identifier */) { return true; } - return token() > 116 /* LastReservedWord */; + return token() > 117 /* LastReservedWord */; } function isIdentifier2() { if (token() === 79 /* Identifier */) { return true; } - if (token() === 125 /* YieldKeyword */ && inYieldContext()) { + if (token() === 126 /* YieldKeyword */ && inYieldContext()) { return false; } - if (token() === 133 /* AwaitKeyword */ && inAwaitContext()) { + if (token() === 134 /* AwaitKeyword */ && inAwaitContext()) { return false; } - return token() > 116 /* LastReservedWord */; + return token() > 117 /* LastReservedWord */; } function parseExpected(kind, diagnosticMessage, shouldAdvance = true) { if (token() === kind) { @@ -29129,7 +29152,7 @@ parseErrorForInvalidName(Diagnostics.Interface_name_cannot_be_0, Diagnostics.Interface_must_be_given_a_name, 18 /* OpenBraceToken */); return; case "is": - parseErrorAt(pos, scanner2.getTextPos(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + parseErrorAt(pos, scanner2.getTokenStart(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); return; case "module": case "namespace": @@ -29284,11 +29307,11 @@ } function createNodeArray(elements, pos, end, hasTrailingComma) { const array = factoryCreateNodeArray(elements, hasTrailingComma); - setTextRangePosEnd(array, pos, end != null ? end : scanner2.getStartPos()); + setTextRangePosEnd(array, pos, end != null ? end : scanner2.getTokenFullStart()); return array; } function finishNode(node, pos, end) { - setTextRangePosEnd(node, pos, end != null ? end : scanner2.getStartPos()); + setTextRangePosEnd(node, pos, end != null ? end : scanner2.getTokenFullStart()); if (contextFlags) { node.flags |= contextFlags; } @@ -29300,7 +29323,7 @@ } function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, arg0) { if (reportAtCurrentPosition) { - parseErrorAtPosition(scanner2.getStartPos(), 0, diagnosticMessage, arg0); + parseErrorAtPosition(scanner2.getTokenFullStart(), 0, diagnosticMessage, arg0); } else if (diagnosticMessage) { parseErrorAtCurrentToken(diagnosticMessage, arg0); } @@ -29323,7 +29346,7 @@ "", /*isSingleQuote*/ void 0 - ) : kind === 279 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 280 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -29428,22 +29451,22 @@ } function nextTokenCanFollowModifier() { switch (token()) { - case 85 /* ConstKeyword */: - return nextToken() === 92 /* EnumKeyword */; - case 93 /* ExportKeyword */: + case 86 /* ConstKeyword */: + return nextToken() === 93 /* EnumKeyword */; + case 94 /* ExportKeyword */: nextToken(); - if (token() === 88 /* DefaultKeyword */) { + if (token() === 89 /* DefaultKeyword */) { return lookAhead(nextTokenCanFollowDefaultKeyword); } - if (token() === 154 /* TypeKeyword */) { + if (token() === 155 /* TypeKeyword */) { return lookAhead(nextTokenCanFollowExportModifier); } return canFollowExportModifier(); - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); - case 124 /* StaticKeyword */: - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: + case 125 /* StaticKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: nextToken(); return canFollowModifier(); default: @@ -29451,7 +29474,7 @@ } } function canFollowExportModifier() { - return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 128 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier(); + return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 129 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier(); } function nextTokenCanFollowExportModifier() { nextToken(); @@ -29465,7 +29488,7 @@ } function nextTokenCanFollowDefaultKeyword() { nextToken(); - return token() === 84 /* ClassKeyword */ || token() === 98 /* FunctionKeyword */ || token() === 118 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 132 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); + return token() === 85 /* ClassKeyword */ || token() === 99 /* FunctionKeyword */ || token() === 119 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 127 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 133 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); } function isListElement2(parsingContext2, inErrorRecovery) { const node = currentNode(parsingContext2); @@ -29478,7 +29501,7 @@ case 3 /* SwitchClauseStatements */: return !(token() === 26 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); case 2 /* SwitchClauses */: - return token() === 82 /* CaseKeyword */ || token() === 88 /* DefaultKeyword */; + return token() === 83 /* CaseKeyword */ || token() === 89 /* DefaultKeyword */; case 4 /* TypeMembers */: return lookAhead(isTypeMemberStart); case 5 /* ClassMembers */: @@ -29515,7 +29538,7 @@ case 10 /* ArrayBindingElements */: return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern(); case 19 /* TypeParameters */: - return token() === 101 /* InKeyword */ || token() === 85 /* ConstKeyword */ || isIdentifier2(); + return token() === 102 /* InKeyword */ || token() === 86 /* ConstKeyword */ || isIdentifier2(); case 15 /* ArrayLiteralMembers */: switch (token()) { case 27 /* CommaToken */: @@ -29552,7 +29575,7 @@ Debug.assert(token() === 18 /* OpenBraceToken */); if (nextToken() === 19 /* CloseBraceToken */) { const next = nextToken(); - return next === 27 /* CommaToken */ || next === 18 /* OpenBraceToken */ || next === 94 /* ExtendsKeyword */ || next === 117 /* ImplementsKeyword */; + return next === 27 /* CommaToken */ || next === 18 /* OpenBraceToken */ || next === 95 /* ExtendsKeyword */ || next === 118 /* ImplementsKeyword */; } return true; } @@ -29569,7 +29592,7 @@ return tokenIsIdentifierOrKeywordOrGreaterThan(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 117 /* ImplementsKeyword */ || token() === 94 /* ExtendsKeyword */) { + if (token() === 118 /* ImplementsKeyword */ || token() === 95 /* ExtendsKeyword */) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -29598,13 +29621,13 @@ case 24 /* AssertEntries */: return token() === 19 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: - return token() === 19 /* CloseBraceToken */ || token() === 82 /* CaseKeyword */ || token() === 88 /* DefaultKeyword */; + return token() === 19 /* CloseBraceToken */ || token() === 83 /* CaseKeyword */ || token() === 89 /* DefaultKeyword */; case 7 /* HeritageClauseElement */: - return token() === 18 /* OpenBraceToken */ || token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 18 /* OpenBraceToken */ || token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; case 8 /* VariableDeclarations */: return isVariableDeclaratorListTerminator(); case 19 /* TypeParameters */: - return token() === 31 /* GreaterThanToken */ || token() === 20 /* OpenParenToken */ || token() === 18 /* OpenBraceToken */ || token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 31 /* GreaterThanToken */ || token() === 20 /* OpenParenToken */ || token() === 18 /* OpenBraceToken */ || token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; case 11 /* ArgumentExpressions */: return token() === 21 /* CloseParenToken */ || token() === 26 /* SemicolonToken */; case 15 /* ArrayLiteralMembers */: @@ -29686,7 +29709,7 @@ if (!syntaxCursor || !isReusableParsingContext(parsingContext2) || parseErrorBeforeNextFinishedNode) { return void 0; } - const node = syntaxCursor.currentNode(pos != null ? pos : scanner2.getStartPos()); + const node = syntaxCursor.currentNode(pos != null ? pos : scanner2.getTokenFullStart()); if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { return void 0; } @@ -29703,7 +29726,7 @@ return node; } function consumeNode(node) { - scanner2.setTextPos(node.end); + scanner2.resetTokenState(node.end); nextToken(); return node; } @@ -29748,14 +29771,14 @@ function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 173 /* Constructor */: - case 178 /* IndexSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: - case 237 /* SemicolonClassElement */: + case 174 /* Constructor */: + case 179 /* IndexSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 238 /* SemicolonClassElement */: return true; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -29766,8 +29789,8 @@ function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return true; } } @@ -29776,65 +29799,65 @@ function isReusableStatement(node) { if (node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 240 /* VariableStatement */: - case 238 /* Block */: - case 242 /* IfStatement */: - case 241 /* ExpressionStatement */: - case 254 /* ThrowStatement */: - case 250 /* ReturnStatement */: - case 252 /* SwitchStatement */: - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 239 /* EmptyStatement */: - case 255 /* TryStatement */: - case 253 /* LabeledStatement */: - case 243 /* DoStatement */: - case 256 /* DebuggerStatement */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + case 241 /* VariableStatement */: + case 239 /* Block */: + case 243 /* IfStatement */: + case 242 /* ExpressionStatement */: + case 255 /* ThrowStatement */: + case 251 /* ReturnStatement */: + case 253 /* SwitchStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 240 /* EmptyStatement */: + case 256 /* TryStatement */: + case 254 /* LabeledStatement */: + case 244 /* DoStatement */: + case 257 /* DebuggerStatement */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 302 /* EnumMember */; + return node.kind === 303 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 168 /* PropertySignature */: - case 176 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 169 /* PropertySignature */: + case 177 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 257 /* VariableDeclaration */) { + if (node.kind !== 258 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 166 /* Parameter */) { + if (node.kind !== 167 /* Parameter */) { return false; } const parameter = node; @@ -29851,7 +29874,7 @@ function parsingContextErrors(context) { switch (context) { case 0 /* SourceElements */: - return token() === 88 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(93 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); + return token() === 89 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(94 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); case 1 /* BlockStatements */: return parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); case 2 /* SwitchClauses */: @@ -29917,14 +29940,14 @@ /*inErrorRecovery*/ false )) { - const startPos = scanner2.getStartPos(); + const startPos = scanner2.getTokenFullStart(); const result = parseListElement(kind, parseElement); if (!result) { parsingContext = saveParsingContext; return void 0; } list.push(result); - commaStart = scanner2.getTokenPos(); + commaStart = scanner2.getTokenStart(); if (parseOptional(27 /* CommaToken */)) { continue; } @@ -29936,7 +29959,7 @@ if (considerSemicolonAsDelimiter && token() === 26 /* SemicolonToken */ && !scanner2.hasPrecedingLineBreak()) { nextToken(); } - if (startPos === scanner2.getStartPos()) { + if (startPos === scanner2.getTokenFullStart()) { nextToken(); } continue; @@ -30167,14 +30190,14 @@ } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return nodeIsMissing(node.typeName); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: { + case 182 /* FunctionType */: + case 183 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -30243,7 +30266,7 @@ function parseJSDocParameter() { const pos = getNodePos(); let name; - if (token() === 108 /* ThisKeyword */ || token() === 103 /* NewKeyword */) { + if (token() === 109 /* ThisKeyword */ || token() === 104 /* NewKeyword */) { name = parseIdentifierName(); parseExpected(58 /* ColonToken */); } @@ -30267,7 +30290,7 @@ function parseJSDocType() { scanner2.setInJSDocType(true); const pos = getNodePos(); - if (parseOptional(142 /* ModuleKeyword */)) { + if (parseOptional(143 /* ModuleKeyword */)) { const moduleTag = factory2.createJSDocNamepathType( /*type*/ void 0 @@ -30301,7 +30324,7 @@ } function parseTypeQuery() { const pos = getNodePos(); - parseExpected(112 /* TypeOfKeyword */); + parseExpected(113 /* TypeOfKeyword */); const entityName = parseEntityName( /*allowReservedWords*/ true @@ -30320,7 +30343,7 @@ const name = parseIdentifier(); let constraint; let expression; - if (parseOptional(94 /* ExtendsKeyword */)) { + if (parseOptional(95 /* ExtendsKeyword */)) { if (isStartOfType() || !isStartOfExpression()) { constraint = parseType(); } else { @@ -30373,7 +30396,7 @@ /*allowDecorators*/ true )); - if (token() === 108 /* ThisKeyword */) { + if (token() === 109 /* ThisKeyword */) { const node2 = factory2.createParameterDeclaration( modifiers, /*dotDotDotToken*/ @@ -30466,8 +30489,8 @@ function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 177 /* ConstructSignature */) { - parseExpected(103 /* NewKeyword */); + if (kind === 178 /* ConstructSignature */) { + parseExpected(104 /* NewKeyword */); } const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); @@ -30477,7 +30500,7 @@ true ); parseTypeMemberSemicolon(); - const node = kind === 176 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 177 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -30540,7 +30563,7 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function isTypeMemberStart() { - if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 137 /* GetKeyword */ || token() === 151 /* SetKeyword */) { + if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 138 /* GetKeyword */ || token() === 152 /* SetKeyword */) { return true; } let idToken = false; @@ -30562,10 +30585,10 @@ } function parseTypeMember() { if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) { - return parseSignatureMember(176 /* CallSignature */); + return parseSignatureMember(177 /* CallSignature */); } - if (token() === 103 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(177 /* ConstructSignature */); + if (token() === 104 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { + return parseSignatureMember(178 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -30573,11 +30596,11 @@ /*allowDecorators*/ false ); - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 4 /* Type */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 4 /* Type */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 4 /* Type */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -30617,17 +30640,17 @@ function isStartOfMappedType() { nextToken(); if (token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { - return nextToken() === 146 /* ReadonlyKeyword */; + return nextToken() === 147 /* ReadonlyKeyword */; } - if (token() === 146 /* ReadonlyKeyword */) { + if (token() === 147 /* ReadonlyKeyword */) { nextToken(); } - return token() === 22 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 101 /* InKeyword */; + return token() === 22 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 102 /* InKeyword */; } function parseMappedTypeParameter() { const pos = getNodePos(); const name = parseIdentifierName(); - parseExpected(101 /* InKeyword */); + parseExpected(102 /* InKeyword */); const type = parseType(); return finishNode(factory2.createTypeParameterDeclaration( /*modifiers*/ @@ -30642,15 +30665,15 @@ const pos = getNodePos(); parseExpected(18 /* OpenBraceToken */); let readonlyToken; - if (token() === 146 /* ReadonlyKeyword */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { + if (token() === 147 /* ReadonlyKeyword */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { readonlyToken = parseTokenNode(); - if (readonlyToken.kind !== 146 /* ReadonlyKeyword */) { - parseExpected(146 /* ReadonlyKeyword */); + if (readonlyToken.kind !== 147 /* ReadonlyKeyword */) { + parseExpected(147 /* ReadonlyKeyword */); } } parseExpected(22 /* OpenBracketToken */); const typeParameter = parseMappedTypeParameter(); - const nameType = parseOptional(128 /* AsKeyword */) ? parseType() : void 0; + const nameType = parseOptional(129 /* AsKeyword */) ? parseType() : void 0; parseExpected(23 /* CloseBracketToken */); let questionToken; if (token() === 57 /* QuestionToken */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { @@ -30720,10 +30743,10 @@ } function parseModifiersForConstructorType() { let modifiers; - if (token() === 126 /* AbstractKeyword */) { + if (token() === 127 /* AbstractKeyword */) { const pos = getNodePos(); nextToken(); - const modifier = finishNode(factoryCreateToken(126 /* AbstractKeyword */), pos); + const modifier = finishNode(factoryCreateToken(127 /* AbstractKeyword */), pos); modifiers = createNodeArray([modifier], pos); } return modifiers; @@ -30732,7 +30755,7 @@ const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiersForConstructorType(); - const isConstructorType = parseOptional(103 /* NewKeyword */); + const isConstructorType = parseOptional(104 /* NewKeyword */); Debug.assert(!modifiers || isConstructorType, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers."); const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); @@ -30753,7 +30776,7 @@ if (negative) { nextToken(); } - let expression = token() === 110 /* TrueKeyword */ || token() === 95 /* FalseKeyword */ || token() === 104 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); + let expression = token() === 111 /* TrueKeyword */ || token() === 96 /* FalseKeyword */ || token() === 105 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); if (negative) { expression = finishNode(factory2.createPrefixUnaryExpression(40 /* MinusToken */, expression), pos); } @@ -30761,14 +30784,14 @@ } function isStartOfTypeOfImportType() { nextToken(); - return token() === 100 /* ImportKeyword */; + return token() === 101 /* ImportKeyword */; } function parseImportTypeAssertions() { const pos = getNodePos(); - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); parseExpected(18 /* OpenBraceToken */); const multiLine = scanner2.hasPrecedingLineBreak(); - parseExpected(130 /* AssertKeyword */); + parseExpected(131 /* AssertKeyword */); parseExpected(58 /* ColonToken */); const clause = parseAssertClause( /*skipAssertKeyword*/ @@ -30788,8 +30811,8 @@ function parseImportType() { sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); - const isTypeOf = parseOptional(112 /* TypeOfKeyword */); - parseExpected(100 /* ImportKeyword */); + const isTypeOf = parseOptional(113 /* TypeOfKeyword */); + parseExpected(101 /* ImportKeyword */); parseExpected(20 /* OpenParenToken */); const type = parseType(); let assertions; @@ -30807,16 +30830,16 @@ } function parseNonArrayType() { switch (token()) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 153 /* SymbolKeyword */: - case 134 /* BooleanKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: - case 149 /* ObjectKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 154 /* SymbolKeyword */: + case 135 /* BooleanKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: + case 150 /* ObjectKeyword */: return tryParse(parseKeywordAndNoDot) || parseTypeReference(); case 66 /* AsteriskEqualsToken */: scanner2.reScanAsteriskEqualsToken(); @@ -30826,7 +30849,7 @@ scanner2.reScanQuestionToken(); case 57 /* QuestionToken */: return parseJSDocUnknownOrNullableType(); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseJSDocFunctionType(); case 53 /* ExclamationToken */: return parseJSDocNonNullableType(); @@ -30834,26 +30857,26 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: return parseLiteralTypeNode(); case 40 /* MinusToken */: return lookAhead(nextTokenIsNumericOrBigIntLiteral) ? parseLiteralTypeNode( /*negative*/ true ) : parseTypeReference(); - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return parseTokenNode(); - case 108 /* ThisKeyword */: { + case 109 /* ThisKeyword */: { const thisKeyword = parseThisTypeNode(); - if (token() === 140 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (token() === 141 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - case 112 /* TypeOfKeyword */: + case 113 /* TypeOfKeyword */: return lookAhead(isStartOfTypeOfImportType) ? parseImportType() : parseTypeQuery(); case 18 /* OpenBraceToken */: return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); @@ -30861,9 +30884,9 @@ return parseTupleType(); case 20 /* OpenParenToken */: return parseParenthesizedType(); - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return parseImportType(); - case 129 /* AssertsKeyword */: + case 130 /* AssertsKeyword */: return lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine) ? parseAssertsTypePredicate() : parseTypeReference(); case 15 /* TemplateHead */: return parseTemplateType(); @@ -30873,44 +30896,44 @@ } function isStartOfType(inStartOfParameter) { switch (token()) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 146 /* ReadonlyKeyword */: - case 153 /* SymbolKeyword */: - case 156 /* UniqueKeyword */: - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 104 /* NullKeyword */: - case 108 /* ThisKeyword */: - case 112 /* TypeOfKeyword */: - case 144 /* NeverKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 147 /* ReadonlyKeyword */: + case 154 /* SymbolKeyword */: + case 157 /* UniqueKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 105 /* NullKeyword */: + case 109 /* ThisKeyword */: + case 113 /* TypeOfKeyword */: + case 145 /* NeverKeyword */: case 18 /* OpenBraceToken */: case 22 /* OpenBracketToken */: case 29 /* LessThanToken */: case 51 /* BarToken */: case 50 /* AmpersandToken */: - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 149 /* ObjectKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 150 /* ObjectKeyword */: case 41 /* AsteriskToken */: case 57 /* QuestionToken */: case 53 /* ExclamationToken */: case 25 /* DotDotDotToken */: - case 138 /* InferKeyword */: - case 100 /* ImportKeyword */: - case 129 /* AssertsKeyword */: + case 139 /* InferKeyword */: + case 101 /* ImportKeyword */: + case 130 /* AssertsKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: return true; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return !inStartOfParameter; case 40 /* MinusToken */: return !inStartOfParameter && lookAhead(nextTokenIsNumericOrBigIntLiteral); @@ -30974,7 +30997,7 @@ return finishNode(factory2.createTypeOperatorNode(operator, parseTypeOperatorOrHigher()), pos); } function tryParseConstraintOfInferType() { - if (parseOptional(94 /* ExtendsKeyword */)) { + if (parseOptional(95 /* ExtendsKeyword */)) { const constraint = disallowConditionalTypesAnd(parseType); if (inDisallowConditionalTypesContext() || token() !== 57 /* QuestionToken */) { return constraint; @@ -30995,17 +31018,17 @@ } function parseInferType() { const pos = getNodePos(); - parseExpected(138 /* InferKeyword */); + parseExpected(139 /* InferKeyword */); return finishNode(factory2.createInferTypeNode(parseTypeParameterOfInferType()), pos); } function parseTypeOperatorOrHigher() { const operator = token(); switch (operator) { - case 141 /* KeyOfKeyword */: - case 156 /* UniqueKeyword */: - case 146 /* ReadonlyKeyword */: + case 142 /* KeyOfKeyword */: + case 157 /* UniqueKeyword */: + case 147 /* ReadonlyKeyword */: return parseTypeOperator(operator); - case 138 /* InferKeyword */: + case 139 /* InferKeyword */: return parseInferType(); } return allowConditionalTypesAnd(parsePostfixTypeOrHigher); @@ -31046,7 +31069,7 @@ } function nextTokenIsNewKeyword() { nextToken(); - return token() === 103 /* NewKeyword */; + return token() === 104 /* NewKeyword */; } function isStartOfFunctionTypeOrConstructorType() { if (token() === 29 /* LessThanToken */) { @@ -31055,7 +31078,7 @@ if (token() === 20 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType)) { return true; } - return token() === 103 /* NewKeyword */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); + return token() === 104 /* NewKeyword */ || token() === 127 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); } function skipParameterStart() { if (isModifierKind(token())) { @@ -31064,7 +31087,7 @@ false ); } - if (isIdentifier2() || token() === 108 /* ThisKeyword */) { + if (isIdentifier2() || token() === 109 /* ThisKeyword */) { nextToken(); return true; } @@ -31110,16 +31133,16 @@ } function parseTypePredicatePrefix() { const id = parseIdentifier(); - if (token() === 140 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (token() === 141 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { nextToken(); return id; } } function parseAssertsTypePredicate() { const pos = getNodePos(); - const assertsModifier = parseExpectedToken(129 /* AssertsKeyword */); - const parameterName = token() === 108 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); - const type = parseOptional(140 /* IsKeyword */) ? parseType() : void 0; + const assertsModifier = parseExpectedToken(130 /* AssertsKeyword */); + const parameterName = token() === 109 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); + const type = parseOptional(141 /* IsKeyword */) ? parseType() : void 0; return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); } function parseType() { @@ -31131,7 +31154,7 @@ } const pos = getNodePos(); const type = parseUnionTypeOrHigher(); - if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(94 /* ExtendsKeyword */)) { + if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(95 /* ExtendsKeyword */)) { const extendsType = disallowConditionalTypesAnd(parseType); parseExpected(57 /* QuestionToken */); const trueType = allowConditionalTypesAnd(parseType); @@ -31146,11 +31169,11 @@ } function isStartOfLeftHandSideExpression() { switch (token()) { - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: @@ -31159,14 +31182,14 @@ case 20 /* OpenParenToken */: case 22 /* OpenBracketToken */: case 18 /* OpenBraceToken */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 103 /* NewKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 104 /* NewKeyword */: case 43 /* SlashToken */: case 68 /* SlashEqualsToken */: case 79 /* Identifier */: return true; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return lookAhead(nextTokenIsOpenParenOrLessThanOrDot); default: return isIdentifier2(); @@ -31181,14 +31204,14 @@ case 40 /* MinusToken */: case 54 /* TildeToken */: case 53 /* ExclamationToken */: - case 89 /* DeleteKeyword */: - case 112 /* TypeOfKeyword */: - case 114 /* VoidKeyword */: + case 90 /* DeleteKeyword */: + case 113 /* TypeOfKeyword */: + case 115 /* VoidKeyword */: case 45 /* PlusPlusToken */: case 46 /* MinusMinusToken */: case 29 /* LessThanToken */: - case 133 /* AwaitKeyword */: - case 125 /* YieldKeyword */: + case 134 /* AwaitKeyword */: + case 126 /* YieldKeyword */: case 80 /* PrivateIdentifier */: case 59 /* AtToken */: return true; @@ -31200,7 +31223,7 @@ } } function isStartOfExpressionStatement() { - return token() !== 18 /* OpenBraceToken */ && token() !== 98 /* FunctionKeyword */ && token() !== 84 /* ClassKeyword */ && token() !== 59 /* AtToken */ && isStartOfExpression(); + return token() !== 18 /* OpenBraceToken */ && token() !== 99 /* FunctionKeyword */ && token() !== 85 /* ClassKeyword */ && token() !== 59 /* AtToken */ && isStartOfExpression(); } function parseExpression() { const saveDecoratorContext = inDecoratorContext(); @@ -31261,7 +31284,7 @@ return parseConditionalExpressionRest(expr, pos, allowReturnTypeInArrowFunction); } function isYieldExpression2() { - if (token() === 125 /* YieldKeyword */) { + if (token() === 126 /* YieldKeyword */) { if (inYieldContext()) { return true; } @@ -31344,7 +31367,7 @@ ) : tryParse(() => parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction)); } function isParenthesizedArrowFunctionExpression() { - if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 132 /* AsyncKeyword */) { + if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 133 /* AsyncKeyword */) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } if (token() === 38 /* EqualsGreaterThanToken */) { @@ -31353,7 +31376,7 @@ return 0 /* False */; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { nextToken(); if (scanner2.hasPrecedingLineBreak()) { return 0 /* False */; @@ -31382,13 +31405,13 @@ if (second === 25 /* DotDotDotToken */) { return 1 /* True */; } - if (isModifierKind(second) && second !== 132 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { - if (nextToken() === 128 /* AsKeyword */) { + if (isModifierKind(second) && second !== 133 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { + if (nextToken() === 129 /* AsKeyword */) { return 0 /* False */; } return 1 /* True */; } - if (!isIdentifier2() && second !== 108 /* ThisKeyword */) { + if (!isIdentifier2() && second !== 109 /* ThisKeyword */) { return 0 /* False */; } switch (nextToken()) { @@ -31408,14 +31431,14 @@ return 0 /* False */; } else { Debug.assert(first2 === 29 /* LessThanToken */); - if (!isIdentifier2() && token() !== 85 /* ConstKeyword */) { + if (!isIdentifier2() && token() !== 86 /* ConstKeyword */) { return 0 /* False */; } if (languageVariant === 1 /* JSX */) { const isArrowFunctionInJsx = lookAhead(() => { - parseOptional(85 /* ConstKeyword */); + parseOptional(86 /* ConstKeyword */); const third = nextToken(); - if (third === 94 /* ExtendsKeyword */) { + if (third === 95 /* ExtendsKeyword */) { const fourth = nextToken(); switch (fourth) { case 63 /* EqualsToken */: @@ -31439,7 +31462,7 @@ } } function parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { - const tokenPos = scanner2.getTokenPos(); + const tokenPos = scanner2.getTokenStart(); if (notParenthesizedArrow == null ? void 0 : notParenthesizedArrow.has(tokenPos)) { return void 0; } @@ -31454,7 +31477,7 @@ return result; } function tryParseAsyncSimpleArrowFunctionExpression(allowReturnTypeInArrowFunction) { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { const pos = getNodePos(); const asyncModifier = parseModifiersForArrowFunction(); @@ -31465,7 +31488,7 @@ return void 0; } function isUnParenthesizedAsyncArrowFunctionWorker() { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { nextToken(); if (scanner2.hasPrecedingLineBreak() || token() === 38 /* EqualsGreaterThanToken */) { return 0 /* False */; @@ -31513,7 +31536,7 @@ return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 193 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 194 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -31535,7 +31558,7 @@ if (token() === 18 /* OpenBraceToken */) { return parseFunctionBlock(isAsync ? 2 /* Await */ : 0 /* None */); } - if (token() !== 26 /* SemicolonToken */ && token() !== 98 /* FunctionKeyword */ && token() !== 84 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { + if (token() !== 26 /* SemicolonToken */ && token() !== 99 /* FunctionKeyword */ && token() !== 85 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { return parseFunctionBlock(16 /* IgnoreMissingOpenBrace */ | (isAsync ? 2 /* Await */ : 0 /* None */)); } const savedTopLevel = topLevel; @@ -31576,7 +31599,7 @@ return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 101 /* InKeyword */ || t === 162 /* OfKeyword */; + return t === 102 /* InKeyword */ || t === 163 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -31586,16 +31609,16 @@ if (!consumeCurrentOperator) { break; } - if (token() === 101 /* InKeyword */ && inDisallowInContext()) { + if (token() === 102 /* InKeyword */ && inDisallowInContext()) { break; } - if (token() === 128 /* AsKeyword */ || token() === 150 /* SatisfiesKeyword */) { + if (token() === 129 /* AsKeyword */ || token() === 151 /* SatisfiesKeyword */) { if (scanner2.hasPrecedingLineBreak()) { break; } else { const keywordKind = token(); nextToken(); - leftOperand = keywordKind === 150 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); + leftOperand = keywordKind === 151 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); } } else { leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence), pos); @@ -31604,7 +31627,7 @@ return leftOperand; } function isBinaryOperator2() { - if (inDisallowInContext() && token() === 101 /* InKeyword */) { + if (inDisallowInContext() && token() === 102 /* InKeyword */) { return false; } return getBinaryOperatorPrecedence(token()) > 0; @@ -31635,7 +31658,7 @@ return finishNode(factory2.createVoidExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos); } function isAwaitExpression2() { - if (token() === 133 /* AwaitKeyword */) { + if (token() === 134 /* AwaitKeyword */) { if (inAwaitContext()) { return true; } @@ -31658,7 +31681,7 @@ if (token() === 42 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 213 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 214 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { parseErrorAt(pos, end, Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, tokenToString(unaryOperator)); @@ -31673,11 +31696,11 @@ case 54 /* TildeToken */: case 53 /* ExclamationToken */: return parsePrefixUnaryExpression(); - case 89 /* DeleteKeyword */: + case 90 /* DeleteKeyword */: return parseDeleteExpression(); - case 112 /* TypeOfKeyword */: + case 113 /* TypeOfKeyword */: return parseTypeOfExpression(); - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return parseVoidExpression(); case 29 /* LessThanToken */: if (languageVariant === 1 /* JSX */) { @@ -31687,7 +31710,7 @@ ); } return parseTypeAssertion(); - case 133 /* AwaitKeyword */: + case 134 /* AwaitKeyword */: if (isAwaitExpression2()) { return parseAwaitExpression(); } @@ -31701,10 +31724,10 @@ case 40 /* MinusToken */: case 54 /* TildeToken */: case 53 /* ExclamationToken */: - case 89 /* DeleteKeyword */: - case 112 /* TypeOfKeyword */: - case 114 /* VoidKeyword */: - case 133 /* AwaitKeyword */: + case 90 /* DeleteKeyword */: + case 113 /* TypeOfKeyword */: + case 115 /* VoidKeyword */: + case 134 /* AwaitKeyword */: return false; case 29 /* LessThanToken */: if (languageVariant !== 1 /* JSX */) { @@ -31736,20 +31759,20 @@ function parseLeftHandSideExpressionOrHigher() { const pos = getNodePos(); let expression; - if (token() === 100 /* ImportKeyword */) { + if (token() === 101 /* ImportKeyword */) { if (lookAhead(nextTokenIsOpenParenOrLessThan)) { sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; expression = parseTokenNode(); } else if (lookAhead(nextTokenIsDot)) { nextToken(); nextToken(); - expression = finishNode(factory2.createMetaProperty(100 /* ImportKeyword */, parseIdentifierName()), pos); + expression = finishNode(factory2.createMetaProperty(101 /* ImportKeyword */, parseIdentifierName()), pos); sourceFlags |= 4194304 /* PossiblyContainsImportMeta */; } else { expression = parseMemberExpressionOrHigher(); } } else { - expression = token() === 106 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); + expression = token() === 107 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); } return parseCallExpressionRest(pos, expression); } @@ -31791,11 +31814,11 @@ const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 283 /* JsxOpeningElement */) { + if (opening.kind === 284 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 281 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 282 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -31819,10 +31842,10 @@ } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 286 /* JsxOpeningFragment */) { + } else if (opening.kind === 287 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 282 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 283 /* JsxSelfClosingElement */); result = opening; } if (inExpressionContext && token() === 29 /* LessThanToken */) { @@ -31895,7 +31918,7 @@ if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 281 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 282 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -31942,7 +31965,7 @@ function parseJsxElementName() { const pos = getNodePos(); scanJsxIdentifier(); - let expression = token() === 108 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); + let expression = token() === 109 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); while (parseOptional(24 /* DotToken */)) { expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot( /*allowIdentifierNames*/ @@ -32145,7 +32168,7 @@ continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 230 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 231 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -32205,7 +32228,7 @@ } } if (typeArguments || token() === 20 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 231 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32269,11 +32292,11 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return parseLiteralNode(); - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: return parseTokenNode(); case 20 /* OpenParenToken */: return parseParenthesizedExpression(); @@ -32281,18 +32304,18 @@ return parseArrayLiteralExpression(); case 18 /* OpenBraceToken */: return parseObjectLiteralExpression(); - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { break; } return parseFunctionExpression(); case 59 /* AtToken */: return parseDecoratedExpression(); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassExpression(); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionExpression(); - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: return parseNewExpressionOrNewDotTarget(); case 43 /* SlashToken */: case 68 /* SlashEqualsToken */: @@ -32338,7 +32361,7 @@ } function parseArrayLiteralExpression() { const pos = getNodePos(); - const openBracketPosition = scanner2.getTokenPos(); + const openBracketPosition = scanner2.getTokenStart(); const openBracketParsed = parseExpected(22 /* OpenBracketToken */); const multiLine = scanner2.hasPrecedingLineBreak(); const elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); @@ -32359,11 +32382,11 @@ /*allowDecorators*/ true ); - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 0 /* None */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -32398,7 +32421,7 @@ } function parseObjectLiteralExpression() { const pos = getNodePos(); - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); const openBraceParsed = parseExpected(18 /* OpenBraceToken */); const multiLine = scanner2.hasPrecedingLineBreak(); const properties = parseDelimitedList( @@ -32422,7 +32445,7 @@ /*allowDecorators*/ false ); - parseExpected(98 /* FunctionKeyword */); + parseExpected(99 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */; @@ -32444,10 +32467,10 @@ } function parseNewExpressionOrNewDotTarget() { const pos = getNodePos(); - parseExpected(103 /* NewKeyword */); + parseExpected(104 /* NewKeyword */); if (parseOptional(24 /* DotToken */)) { const name = parseIdentifierName(); - return finishNode(factory2.createMetaProperty(103 /* NewKeyword */, name), pos); + return finishNode(factory2.createMetaProperty(104 /* NewKeyword */, name), pos); } const expressionPos = getNodePos(); let expression = parseMemberExpressionRest( @@ -32457,7 +32480,7 @@ false ); let typeArguments; - if (expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (expression.kind === 231 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32470,7 +32493,7 @@ function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); const openBraceParsed = parseExpected(18 /* OpenBraceToken */, diagnosticMessage); if (openBraceParsed || ignoreMissingOpenBrace) { const multiLine = scanner2.hasPrecedingLineBreak(); @@ -32526,22 +32549,22 @@ function parseIfStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(99 /* IfKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(100 /* IfKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); const thenStatement = parseStatement(); - const elseStatement = parseOptional(91 /* ElseKeyword */) ? parseStatement() : void 0; + const elseStatement = parseOptional(92 /* ElseKeyword */) ? parseStatement() : void 0; return withJSDoc(finishNode(factoryCreateIfStatement(expression, thenStatement, elseStatement), pos), hasJSDoc); } function parseDoStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(90 /* DoKeyword */); + parseExpected(91 /* DoKeyword */); const statement = parseStatement(); - parseExpected(115 /* WhileKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(116 /* WhileKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -32551,8 +32574,8 @@ function parseWhileStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(115 /* WhileKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(116 /* WhileKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -32562,12 +32585,12 @@ function parseForOrForInOrForOfStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(97 /* ForKeyword */); - const awaitToken = parseOptionalToken(133 /* AwaitKeyword */); + parseExpected(98 /* ForKeyword */); + const awaitToken = parseOptionalToken(134 /* AwaitKeyword */); parseExpected(20 /* OpenParenToken */); let initializer; if (token() !== 26 /* SemicolonToken */) { - if (token() === 113 /* VarKeyword */ || token() === 119 /* LetKeyword */ || token() === 85 /* ConstKeyword */) { + if (token() === 114 /* VarKeyword */ || token() === 120 /* LetKeyword */ || token() === 86 /* ConstKeyword */) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -32577,14 +32600,14 @@ } } let node; - if (awaitToken ? parseExpected(162 /* OfKeyword */) : parseOptional(162 /* OfKeyword */)) { + if (awaitToken ? parseExpected(163 /* OfKeyword */) : parseOptional(163 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ true )); parseExpected(21 /* CloseParenToken */); node = factoryCreateForOfStatement(awaitToken, initializer, expression, parseStatement()); - } else if (parseOptional(101 /* InKeyword */)) { + } else if (parseOptional(102 /* InKeyword */)) { const expression = allowInAnd(parseExpression); parseExpected(21 /* CloseParenToken */); node = factory2.createForInStatement(initializer, expression, parseStatement()); @@ -32601,16 +32624,16 @@ function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 249 /* BreakStatement */ ? 81 /* BreakKeyword */ : 86 /* ContinueKeyword */); + parseExpected(kind === 250 /* BreakStatement */ ? 82 /* BreakKeyword */ : 87 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 249 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 250 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(105 /* ReturnKeyword */); + parseExpected(106 /* ReturnKeyword */); const expression = canParseSemicolon() ? void 0 : allowInAnd(parseExpression); parseSemicolon(); return withJSDoc(finishNode(factory2.createReturnStatement(expression), pos), hasJSDoc); @@ -32618,8 +32641,8 @@ function parseWithStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(116 /* WithKeyword */); - const openParenPosition = scanner2.getTokenPos(); + parseExpected(117 /* WithKeyword */); + const openParenPosition = scanner2.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -32629,7 +32652,7 @@ function parseCaseClause() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(82 /* CaseKeyword */); + parseExpected(83 /* CaseKeyword */); const expression = allowInAnd(parseExpression); parseExpected(58 /* ColonToken */); const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); @@ -32637,13 +32660,13 @@ } function parseDefaultClause() { const pos = getNodePos(); - parseExpected(88 /* DefaultKeyword */); + parseExpected(89 /* DefaultKeyword */); parseExpected(58 /* ColonToken */); const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); return finishNode(factory2.createDefaultClause(statements), pos); } function parseCaseOrDefaultClause() { - return token() === 82 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + return token() === 83 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseCaseBlock() { const pos = getNodePos(); @@ -32655,7 +32678,7 @@ function parseSwitchStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(107 /* SwitchKeyword */); + parseExpected(108 /* SwitchKeyword */); parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpected(21 /* CloseParenToken */); @@ -32665,7 +32688,7 @@ function parseThrowStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(109 /* ThrowKeyword */); + parseExpected(110 /* ThrowKeyword */); let expression = scanner2.hasPrecedingLineBreak() ? void 0 : allowInAnd(parseExpression); if (expression === void 0) { identifierCount++; @@ -32679,15 +32702,15 @@ function parseTryStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(111 /* TryKeyword */); + parseExpected(112 /* TryKeyword */); const tryBlock = parseBlock( /*ignoreMissingOpenBrace*/ false ); - const catchClause = token() === 83 /* CatchKeyword */ ? parseCatchClause() : void 0; + const catchClause = token() === 84 /* CatchKeyword */ ? parseCatchClause() : void 0; let finallyBlock; - if (!catchClause || token() === 96 /* FinallyKeyword */) { - parseExpected(96 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); + if (!catchClause || token() === 97 /* FinallyKeyword */) { + parseExpected(97 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); finallyBlock = parseBlock( /*ignoreMissingOpenBrace*/ false @@ -32697,7 +32720,7 @@ } function parseCatchClause() { const pos = getNodePos(); - parseExpected(83 /* CatchKeyword */); + parseExpected(84 /* CatchKeyword */); let variableDeclaration; if (parseOptional(20 /* OpenParenToken */)) { variableDeclaration = parseVariableDeclaration(); @@ -32714,7 +32737,7 @@ function parseDebuggerStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(87 /* DebuggerKeyword */); + parseExpected(88 /* DebuggerKeyword */); parseSemicolon(); return withJSDoc(finishNode(factory2.createDebuggerStatement(), pos), hasJSDoc); } @@ -32743,11 +32766,11 @@ } function nextTokenIsClassKeywordOnSameLine() { nextToken(); - return token() === 84 /* ClassKeyword */ && !scanner2.hasPrecedingLineBreak(); + return token() === 85 /* ClassKeyword */ && !scanner2.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token() === 98 /* FunctionKeyword */ && !scanner2.hasPrecedingLineBreak(); + return token() === 99 /* FunctionKeyword */ && !scanner2.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine() { nextToken(); @@ -32756,48 +32779,48 @@ function isDeclaration2() { while (true) { switch (token()) { - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: return true; - case 118 /* InterfaceKeyword */: - case 154 /* TypeKeyword */: + case 119 /* InterfaceKeyword */: + case 155 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 146 /* ReadonlyKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 147 /* ReadonlyKeyword */: nextToken(); if (scanner2.hasPrecedingLineBreak()) { return false; } continue; - case 159 /* GlobalKeyword */: + case 160 /* GlobalKeyword */: nextToken(); - return token() === 18 /* OpenBraceToken */ || token() === 79 /* Identifier */ || token() === 93 /* ExportKeyword */; - case 100 /* ImportKeyword */: + return token() === 18 /* OpenBraceToken */ || token() === 79 /* Identifier */ || token() === 94 /* ExportKeyword */; + case 101 /* ImportKeyword */: nextToken(); return token() === 10 /* StringLiteral */ || token() === 41 /* AsteriskToken */ || token() === 18 /* OpenBraceToken */ || tokenIsIdentifierOrKeyword(token()); - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: let currentToken2 = nextToken(); - if (currentToken2 === 154 /* TypeKeyword */) { + if (currentToken2 === 155 /* TypeKeyword */) { currentToken2 = lookAhead(nextToken); } - if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 88 /* DefaultKeyword */ || currentToken2 === 128 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) { + if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 89 /* DefaultKeyword */ || currentToken2 === 129 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) { return true; } continue; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: nextToken(); continue; default: @@ -32813,45 +32836,45 @@ case 59 /* AtToken */: case 26 /* SemicolonToken */: case 18 /* OpenBraceToken */: - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: - case 99 /* IfKeyword */: - case 90 /* DoKeyword */: - case 115 /* WhileKeyword */: - case 97 /* ForKeyword */: - case 86 /* ContinueKeyword */: - case 81 /* BreakKeyword */: - case 105 /* ReturnKeyword */: - case 116 /* WithKeyword */: - case 107 /* SwitchKeyword */: - case 109 /* ThrowKeyword */: - case 111 /* TryKeyword */: - case 87 /* DebuggerKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: + case 100 /* IfKeyword */: + case 91 /* DoKeyword */: + case 116 /* WhileKeyword */: + case 98 /* ForKeyword */: + case 87 /* ContinueKeyword */: + case 82 /* BreakKeyword */: + case 106 /* ReturnKeyword */: + case 117 /* WithKeyword */: + case 108 /* SwitchKeyword */: + case 110 /* ThrowKeyword */: + case 112 /* TryKeyword */: + case 88 /* DebuggerKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return true; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThanOrDot); - case 85 /* ConstKeyword */: - case 93 /* ExportKeyword */: + case 86 /* ConstKeyword */: + case 94 /* ExportKeyword */: return isStartOfDeclaration(); - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 118 /* InterfaceKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 154 /* TypeKeyword */: - case 159 /* GlobalKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 119 /* InterfaceKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 155 /* TypeKeyword */: + case 160 /* GlobalKeyword */: return true; - case 127 /* AccessorKeyword */: - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 124 /* StaticKeyword */: - case 146 /* ReadonlyKeyword */: + case 128 /* AccessorKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 125 /* StaticKeyword */: + case 147 /* ReadonlyKeyword */: return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); default: return isStartOfExpression(); @@ -32873,14 +32896,14 @@ /*ignoreMissingOpenBrace*/ false ); - case 113 /* VarKeyword */: + case 114 /* VarKeyword */: return parseVariableStatement( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 119 /* LetKeyword */: + case 120 /* LetKeyword */: if (isLetDeclaration()) { return parseVariableStatement( getNodePos(), @@ -32890,66 +32913,66 @@ ); } break; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionDeclaration( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassDeclaration( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 99 /* IfKeyword */: + case 100 /* IfKeyword */: return parseIfStatement(); - case 90 /* DoKeyword */: + case 91 /* DoKeyword */: return parseDoStatement(); - case 115 /* WhileKeyword */: + case 116 /* WhileKeyword */: return parseWhileStatement(); - case 97 /* ForKeyword */: + case 98 /* ForKeyword */: return parseForOrForInOrForOfStatement(); - case 86 /* ContinueKeyword */: - return parseBreakOrContinueStatement(248 /* ContinueStatement */); - case 81 /* BreakKeyword */: - return parseBreakOrContinueStatement(249 /* BreakStatement */); - case 105 /* ReturnKeyword */: + case 87 /* ContinueKeyword */: + return parseBreakOrContinueStatement(249 /* ContinueStatement */); + case 82 /* BreakKeyword */: + return parseBreakOrContinueStatement(250 /* BreakStatement */); + case 106 /* ReturnKeyword */: return parseReturnStatement(); - case 116 /* WithKeyword */: + case 117 /* WithKeyword */: return parseWithStatement(); - case 107 /* SwitchKeyword */: + case 108 /* SwitchKeyword */: return parseSwitchStatement(); - case 109 /* ThrowKeyword */: + case 110 /* ThrowKeyword */: return parseThrowStatement(); - case 111 /* TryKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 112 /* TryKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return parseTryStatement(); - case 87 /* DebuggerKeyword */: + case 88 /* DebuggerKeyword */: return parseDebuggerStatement(); case 59 /* AtToken */: return parseDeclaration(); - case 132 /* AsyncKeyword */: - case 118 /* InterfaceKeyword */: - case 154 /* TypeKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 136 /* DeclareKeyword */: - case 85 /* ConstKeyword */: - case 92 /* EnumKeyword */: - case 93 /* ExportKeyword */: - case 100 /* ImportKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 124 /* StaticKeyword */: - case 146 /* ReadonlyKeyword */: - case 159 /* GlobalKeyword */: + case 133 /* AsyncKeyword */: + case 119 /* InterfaceKeyword */: + case 155 /* TypeKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 137 /* DeclareKeyword */: + case 86 /* ConstKeyword */: + case 93 /* EnumKeyword */: + case 94 /* ExportKeyword */: + case 101 /* ImportKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 125 /* StaticKeyword */: + case 147 /* ReadonlyKeyword */: + case 160 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -32958,7 +32981,7 @@ return parseExpressionOrLabeledStatement(); } function isDeclareModifier(modifier) { - return modifier.kind === 136 /* DeclareKeyword */; + return modifier.kind === 137 /* DeclareKeyword */; } function parseDeclaration() { const pos = getNodePos(); @@ -32991,33 +33014,33 @@ } function parseDeclarationWorker(pos, hasJSDoc, modifiersIn) { switch (token()) { - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: return parseVariableStatement(pos, hasJSDoc, modifiersIn); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassDeclaration(pos, hasJSDoc, modifiersIn); - case 118 /* InterfaceKeyword */: + case 119 /* InterfaceKeyword */: return parseInterfaceDeclaration(pos, hasJSDoc, modifiersIn); - case 154 /* TypeKeyword */: + case 155 /* TypeKeyword */: return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); - case 92 /* EnumKeyword */: + case 93 /* EnumKeyword */: return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 159 /* GlobalKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: + case 160 /* GlobalKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiersIn); - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: nextToken(); switch (token()) { - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: case 63 /* EqualsToken */: return parseExportAssignment(pos, hasJSDoc, modifiersIn); - case 128 /* AsKeyword */: + case 129 /* AsKeyword */: return parseNamespaceExportDeclaration(pos, hasJSDoc, modifiersIn); default: return parseExportDeclaration(pos, hasJSDoc, modifiersIn); @@ -33025,7 +33048,7 @@ default: if (modifiersIn) { const missing = createMissingNode( - 279 /* MissingDeclaration */, + 280 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -33135,12 +33158,12 @@ const pos = getNodePos(); let flags = 0; switch (token()) { - case 113 /* VarKeyword */: + case 114 /* VarKeyword */: break; - case 119 /* LetKeyword */: + case 120 /* LetKeyword */: flags |= 1 /* Let */; break; - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: flags |= 2 /* Const */; break; default: @@ -33148,7 +33171,7 @@ } nextToken(); let declarations; - if (token() === 162 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 163 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -33176,7 +33199,7 @@ function parseFunctionDeclaration(pos, hasJSDoc, modifiers) { const savedAwaitContext = inAwaitContext(); const modifierFlags = modifiersToFlags(modifiers); - parseExpected(98 /* FunctionKeyword */); + parseExpected(99 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; @@ -33199,8 +33222,8 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseConstructorName() { - if (token() === 135 /* ConstructorKeyword */) { - return parseExpected(135 /* ConstructorKeyword */); + if (token() === 136 /* ConstructorKeyword */) { + return parseExpected(136 /* ConstructorKeyword */); } if (token() === 10 /* StringLiteral */ && lookAhead(nextToken) === 20 /* OpenParenToken */) { return tryParse(() => { @@ -33294,7 +33317,7 @@ false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 174 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 175 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -33323,7 +33346,7 @@ return true; } if (idToken !== void 0) { - if (!isKeyword(idToken) || idToken === 151 /* SetKeyword */ || idToken === 137 /* GetKeyword */) { + if (!isKeyword(idToken) || idToken === 152 /* SetKeyword */ || idToken === 138 /* GetKeyword */) { return true; } switch (token()) { @@ -33341,7 +33364,7 @@ return false; } function parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers) { - parseExpectedToken(124 /* StaticKeyword */); + parseExpectedToken(125 /* StaticKeyword */); const body = parseClassStaticBlockBody(); const node = withJSDoc(finishNode(factory2.createClassStaticBlockDeclaration(body), pos), hasJSDoc); node.modifiers = modifiers; @@ -33361,7 +33384,7 @@ return body; } function parseDecoratorExpression() { - if (inAwaitContext() && token() === 133 /* AwaitKeyword */) { + if (inAwaitContext() && token() === 134 /* AwaitKeyword */) { const pos = getNodePos(); const awaitExpression = parseIdentifier(Diagnostics.Expression_expected); nextToken(); @@ -33386,13 +33409,13 @@ function tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock) { const pos = getNodePos(); const kind = token(); - if (token() === 85 /* ConstKeyword */ && permitConstAsModifier) { + if (token() === 86 /* ConstKeyword */ && permitConstAsModifier) { if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { return void 0; } - } else if (stopOnStartOfClassStaticBlock && token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + } else if (stopOnStartOfClassStaticBlock && token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return void 0; - } else if (hasSeenStaticModifier && token() === 124 /* StaticKeyword */) { + } else if (hasSeenStaticModifier && token() === 125 /* StaticKeyword */) { return void 0; } else { if (!parseAnyContextualModifier()) { @@ -33411,7 +33434,7 @@ } } while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 124 /* StaticKeyword */) + if (modifier.kind === 125 /* StaticKeyword */) hasSeenStaticModifier = true; list = append(list, modifier); hasLeadingModifier = true; @@ -33424,7 +33447,7 @@ } if (hasTrailingDecorator) { while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 124 /* StaticKeyword */) + if (modifier.kind === 125 /* StaticKeyword */) hasSeenStaticModifier = true; list = append(list, modifier); } @@ -33433,10 +33456,10 @@ } function parseModifiersForArrowFunction() { let modifiers; - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { const pos = getNodePos(); nextToken(); - const modifier = finishNode(factoryCreateToken(132 /* AsyncKeyword */), pos); + const modifier = finishNode(factoryCreateToken(133 /* AsyncKeyword */), pos); modifiers = createNodeArray([modifier], pos); } return modifiers; @@ -33456,16 +33479,16 @@ /*stopOnStartOfClassStaticBlock*/ true ); - if (token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 0 /* None */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 0 /* None */); } - if (token() === 135 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); if (constructorDeclaration) { return constructorDeclaration; @@ -33510,11 +33533,11 @@ /*allowDecorators*/ true ); - if (token() === 84 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 228 /* ClassExpression */); + if (token() === 85 /* ClassKeyword */) { + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 229 /* ClassExpression */); } const missing = createMissingNode( - 279 /* MissingDeclaration */, + 280 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -33529,15 +33552,15 @@ hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 228 /* ClassExpression */ + 229 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 260 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 261 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); - parseExpected(84 /* ClassKeyword */); + parseExpected(85 /* ClassKeyword */); const name = parseNameOfClassDeclarationOrExpression(); const typeParameters = parseTypeParameters(); if (some(modifiers, isExportModifier)) @@ -33554,14 +33577,14 @@ members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 260 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 261 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { return isBindingIdentifier() && !isImplementsClause() ? createIdentifier(isBindingIdentifier()) : void 0; } function isImplementsClause() { - return token() === 117 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 118 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses() { if (isHeritageClause2()) { @@ -33572,7 +33595,7 @@ function parseHeritageClause() { const pos = getNodePos(); const tok = token(); - Debug.assert(tok === 94 /* ExtendsKeyword */ || tok === 117 /* ImplementsKeyword */); + Debug.assert(tok === 95 /* ExtendsKeyword */ || tok === 118 /* ImplementsKeyword */); nextToken(); const types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); return finishNode(factory2.createHeritageClause(tok, types), pos); @@ -33580,7 +33603,7 @@ function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (expression.kind === 231 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -33590,13 +33613,13 @@ return token() === 29 /* LessThanToken */ ? parseBracketedList(20 /* TypeArguments */, parseType, 29 /* LessThanToken */, 31 /* GreaterThanToken */) : void 0; } function isHeritageClause2() { - return token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; } function parseClassMembers() { return parseList(5 /* ClassMembers */, parseClassElement); } function parseInterfaceDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(118 /* InterfaceKeyword */); + parseExpected(119 /* InterfaceKeyword */); const name = parseIdentifier(); const typeParameters = parseTypeParameters(); const heritageClauses = parseHeritageClauses(); @@ -33605,11 +33628,11 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(154 /* TypeKeyword */); + parseExpected(155 /* TypeKeyword */); const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(63 /* EqualsToken */); - const type = token() === 139 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); + const type = token() === 140 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); parseSemicolon(); const node = factory2.createTypeAliasDeclaration(modifiers, name, typeParameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -33622,7 +33645,7 @@ return withJSDoc(finishNode(factory2.createEnumMember(name, initializer), pos), hasJSDoc); } function parseEnumDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(92 /* EnumKeyword */); + parseExpected(93 /* EnumKeyword */); const name = parseIdentifier(); let members; if (parseExpected(18 /* OpenBraceToken */)) { @@ -33662,7 +33685,7 @@ function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; let name; - if (token() === 159 /* GlobalKeyword */) { + if (token() === 160 /* GlobalKeyword */) { name = parseIdentifier(); flags |= 1024 /* GlobalAugmentation */; } else { @@ -33680,12 +33703,12 @@ } function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; - if (token() === 159 /* GlobalKeyword */) { + if (token() === 160 /* GlobalKeyword */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); - } else if (parseOptional(143 /* NamespaceKeyword */)) { + } else if (parseOptional(144 /* NamespaceKeyword */)) { flags |= 16 /* Namespace */; } else { - parseExpected(142 /* ModuleKeyword */); + parseExpected(143 /* ModuleKeyword */); if (token() === 10 /* StringLiteral */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); } @@ -33693,7 +33716,7 @@ return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiersIn, flags); } function isExternalModuleReference2() { - return token() === 147 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); + return token() === 148 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { return nextToken() === 20 /* OpenParenToken */; @@ -33705,8 +33728,8 @@ return nextToken() === 43 /* SlashToken */; } function parseNamespaceExportDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(128 /* AsKeyword */); - parseExpected(143 /* NamespaceKeyword */); + parseExpected(129 /* AsKeyword */); + parseExpected(144 /* NamespaceKeyword */); const name = parseIdentifier(); parseSemicolon(); const node = factory2.createNamespaceExportDeclaration(name); @@ -33714,14 +33737,14 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(100 /* ImportKeyword */); - const afterImportPos = scanner2.getStartPos(); + parseExpected(101 /* ImportKeyword */); + const afterImportPos = scanner2.getTokenFullStart(); let identifier; if (isIdentifier2()) { identifier = parseIdentifier(); } let isTypeOnly = false; - if (token() !== 158 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { + if (token() !== 159 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { isTypeOnly = true; identifier = isIdentifier2() ? parseIdentifier() : void 0; } @@ -33733,11 +33756,11 @@ token() === 41 /* AsteriskToken */ || // import * token() === 18 /* OpenBraceToken */) { importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(158 /* FromKeyword */); + parseExpected(159 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); let assertClause; - if (token() === 130 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (token() === 131 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { assertClause = parseAssertClause(); } parseSemicolon(); @@ -33757,9 +33780,9 @@ function parseAssertClause(skipAssertKeyword) { const pos = getNodePos(); if (!skipAssertKeyword) { - parseExpected(130 /* AssertKeyword */); + parseExpected(131 /* AssertKeyword */); } - const openBracePosition = scanner2.getTokenPos(); + const openBracePosition = scanner2.getTokenStart(); if (parseExpected(18 /* OpenBraceToken */)) { const multiLine = scanner2.hasPrecedingLineBreak(); const elements = parseDelimitedList( @@ -33798,7 +33821,7 @@ return token() === 41 /* AsteriskToken */ || token() === 18 /* OpenBraceToken */; } function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 27 /* CommaToken */ || token() === 158 /* FromKeyword */; + return token() === 27 /* CommaToken */ || token() === 159 /* FromKeyword */; } function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { parseExpected(63 /* EqualsToken */); @@ -33811,7 +33834,7 @@ function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(27 /* CommaToken */)) { - namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(272 /* NamedImports */); + namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(273 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -33823,7 +33846,7 @@ } function parseExternalModuleReference() { const pos = getNodePos(); - parseExpected(147 /* RequireKeyword */); + parseExpected(148 /* RequireKeyword */); parseExpected(20 /* OpenParenToken */); const expression = parseModuleSpecifier(); parseExpected(21 /* CloseParenToken */); @@ -33841,35 +33864,35 @@ function parseNamespaceImport() { const pos = getNodePos(); parseExpected(41 /* AsteriskToken */); - parseExpected(128 /* AsKeyword */); + parseExpected(129 /* AsKeyword */); const name = parseIdentifier(); return finishNode(factory2.createNamespaceImport(name), pos); } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 272 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); + const node = kind === 273 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(278 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(279 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(273 /* ImportSpecifier */); + return parseImportOrExportSpecifier(274 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); let checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - let checkIdentifierStart = scanner2.getTokenPos(); - let checkIdentifierEnd = scanner2.getTextPos(); + let checkIdentifierStart = scanner2.getTokenStart(); + let checkIdentifierEnd = scanner2.getTokenEnd(); let isTypeOnly = false; let propertyName; let canParseAsKeyword = true; let name = parseIdentifierName(); if (name.escapedText === "type") { - if (token() === 128 /* AsKeyword */) { + if (token() === 129 /* AsKeyword */) { const firstAs = parseIdentifierName(); - if (token() === 128 /* AsKeyword */) { + if (token() === 129 /* AsKeyword */) { const secondAs = parseIdentifierName(); if (tokenIsIdentifierOrKeyword(token())) { isTypeOnly = true; @@ -33894,20 +33917,20 @@ name = parseNameWithKeywordCheck(); } } - if (canParseAsKeyword && token() === 128 /* AsKeyword */) { + if (canParseAsKeyword && token() === 129 /* AsKeyword */) { propertyName = name; - parseExpected(128 /* AsKeyword */); + parseExpected(129 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 273 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 274 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 273 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 274 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - checkIdentifierStart = scanner2.getTokenPos(); - checkIdentifierEnd = scanner2.getTextPos(); + checkIdentifierStart = scanner2.getTokenStart(); + checkIdentifierEnd = scanner2.getTokenEnd(); return parseIdentifierName(); } } @@ -33923,22 +33946,22 @@ let exportClause; let moduleSpecifier; let assertClause; - const isTypeOnly = parseOptional(154 /* TypeKeyword */); + const isTypeOnly = parseOptional(155 /* TypeKeyword */); const namespaceExportPos = getNodePos(); if (parseOptional(41 /* AsteriskToken */)) { - if (parseOptional(128 /* AsKeyword */)) { + if (parseOptional(129 /* AsKeyword */)) { exportClause = parseNamespaceExport(namespaceExportPos); } - parseExpected(158 /* FromKeyword */); + parseExpected(159 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(276 /* NamedExports */); - if (token() === 158 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { - parseExpected(158 /* FromKeyword */); + exportClause = parseNamedImportsOrExports(277 /* NamedExports */); + if (token() === 159 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { + parseExpected(159 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } } - if (moduleSpecifier && token() === 130 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { + if (moduleSpecifier && token() === 131 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { assertClause = parseAssertClause(); } parseSemicolon(); @@ -33956,7 +33979,7 @@ if (parseOptional(63 /* EqualsToken */)) { isExportEquals = true; } else { - parseExpected(88 /* DefaultKeyword */); + parseExpected(89 /* DefaultKeyword */); } const expression = parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ @@ -34154,16 +34177,12 @@ while (true) { switch (token()) { case 59 /* AtToken */: - if (state === 0 /* BeginningOfLine */ || state === 1 /* SawAsterisk */) { - removeTrailingWhitespace(comments); - if (!commentsPos) - commentsPos = getNodePos(); - addTag(parseTag(indent2)); - state = 0 /* BeginningOfLine */; - margin = void 0; - } else { - pushComment(scanner2.getTokenText()); - } + removeTrailingWhitespace(comments); + if (!commentsPos) + commentsPos = getNodePos(); + addTag(parseTag(indent2)); + state = 0 /* BeginningOfLine */; + margin = void 0; break; case 4 /* NewLineTrivia */: comments.push(scanner2.getTokenText()); @@ -34172,29 +34191,33 @@ break; case 41 /* AsteriskToken */: const asterisk = scanner2.getTokenText(); - if (state === 1 /* SawAsterisk */ || state === 2 /* SavingComments */) { + if (state === 1 /* SawAsterisk */) { state = 2 /* SavingComments */; pushComment(asterisk); } else { + Debug.assert(state === 0 /* BeginningOfLine */); state = 1 /* SawAsterisk */; indent2 += asterisk.length; } break; case 5 /* WhitespaceTrivia */: + Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text"); const whitespace = scanner2.getTokenText(); - if (state === 2 /* SavingComments */) { - comments.push(whitespace); - } else if (margin !== void 0 && indent2 + whitespace.length > margin) { + if (margin !== void 0 && indent2 + whitespace.length > margin) { comments.push(whitespace.slice(margin - indent2)); } indent2 += whitespace.length; break; case 1 /* EndOfFileToken */: break loop; + case 81 /* JSDocCommentTextToken */: + state = 2 /* SavingComments */; + pushComment(scanner2.getTokenValue()); + break; case 18 /* OpenBraceToken */: state = 2 /* SavingComments */; - const commentEnd = scanner2.getStartPos(); - const linkStart = scanner2.getTextPos() - 1; + const commentEnd = scanner2.getTokenFullStart(); + const linkStart = scanner2.getTokenEnd() - 1; const link = parseJSDocLink(linkStart); if (link) { if (!linkEnd) { @@ -34203,7 +34226,7 @@ parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd != null ? linkEnd : start, commentEnd)); parts.push(link); comments = []; - linkEnd = scanner2.getTextPos(); + linkEnd = scanner2.getTokenEnd(); break; } default: @@ -34211,16 +34234,23 @@ pushComment(scanner2.getTokenText()); break; } - nextTokenJSDoc(); + if (state === 2 /* SavingComments */) { + nextJSDocCommentTextToken( + /*inBackticks*/ + false + ); + } else { + nextTokenJSDoc(); + } } - removeTrailingWhitespace(comments); - if (parts.length && comments.length) { - parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd != null ? linkEnd : start, commentsPos)); + const trimmedComments = trimStringEnd(comments.join("")); + if (parts.length && trimmedComments.length) { + parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd != null ? linkEnd : start, commentsPos)); } if (parts.length && tags) Debug.assertIsDefined(commentsPos, "having parsed tags implies that the end of the comment span should be set"); const tagsArray = tags && createNodeArray(tags, tagsPos, tagsEnd); - return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : comments.length ? comments.join("") : void 0, tagsArray), start, end); + return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : trimmedComments.length ? trimmedComments : void 0, tagsArray), start, end); }); function removeLeadingNewlines(comments2) { while (comments2.length && (comments2[0] === "\n" || comments2[0] === "\r")) { @@ -34228,8 +34258,16 @@ } } function removeTrailingWhitespace(comments2) { - while (comments2.length && comments2[comments2.length - 1].trim() === "") { - comments2.pop(); + while (comments2.length) { + const trimmed = trimStringEnd(comments2[comments2.length - 1]); + if (trimmed === "") { + comments2.pop(); + } else if (trimmed.length < comments2[comments2.length - 1].length) { + comments2[comments2.length - 1] = trimmed; + break; + } else { + break; + } } } function isNextNonwhitespaceTokenEndOfFile() { @@ -34277,7 +34315,7 @@ } function parseTag(margin) { Debug.assert(token() === 59 /* AtToken */); - const start2 = scanner2.getTokenPos(); + const start2 = scanner2.getTokenStart(); nextTokenJSDoc(); const tagName = parseJSDocIdentifierName( /*message*/ @@ -34376,7 +34414,6 @@ const parts2 = []; let linkEnd2; let state = 0 /* BeginningOfLine */; - let previousWhitespace = true; let margin; function pushComment(text) { if (!margin) { @@ -34401,34 +34438,29 @@ indent2 = 0; break; case 59 /* AtToken */: - if (state === 3 /* SavingBackticks */ || state === 2 /* SavingComments */ && (!previousWhitespace || lookAhead(isNextJSDocTokenWhitespace))) { - comments2.push(scanner2.getTokenText()); - break; - } - scanner2.setTextPos(scanner2.getTextPos() - 1); + scanner2.resetTokenState(scanner2.getTokenEnd() - 1); + break loop; case 1 /* EndOfFileToken */: break loop; case 5 /* WhitespaceTrivia */: - if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { - pushComment(scanner2.getTokenText()); - } else { - const whitespace = scanner2.getTokenText(); - if (margin !== void 0 && indent2 + whitespace.length > margin) { - comments2.push(whitespace.slice(margin - indent2)); - } - indent2 += whitespace.length; + Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text"); + const whitespace = scanner2.getTokenText(); + if (margin !== void 0 && indent2 + whitespace.length > margin) { + comments2.push(whitespace.slice(margin - indent2)); + state = 2 /* SavingComments */; } + indent2 += whitespace.length; break; case 18 /* OpenBraceToken */: state = 2 /* SavingComments */; - const commentEnd = scanner2.getStartPos(); - const linkStart = scanner2.getTextPos() - 1; + const commentEnd = scanner2.getTokenFullStart(); + const linkStart = scanner2.getTokenEnd() - 1; const link = parseJSDocLink(linkStart); if (link) { parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 != null ? linkEnd2 : commentsPos2, commentEnd)); parts2.push(link); comments2 = []; - linkEnd2 = scanner2.getTextPos(); + linkEnd2 = scanner2.getTokenEnd(); } else { pushComment(scanner2.getTokenText()); } @@ -34441,6 +34473,12 @@ } pushComment(scanner2.getTokenText()); break; + case 81 /* JSDocCommentTextToken */: + if (state !== 3 /* SavingBackticks */) { + state = 2 /* SavingComments */; + } + pushComment(scanner2.getTokenValue()); + break; case 41 /* AsteriskToken */: if (state === 0 /* BeginningOfLine */) { state = 1 /* SawAsterisk */; @@ -34454,24 +34492,23 @@ pushComment(scanner2.getTokenText()); break; } - previousWhitespace = token() === 5 /* WhitespaceTrivia */; - tok = nextTokenJSDoc(); + if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { + tok = nextJSDocCommentTextToken(state === 3 /* SavingBackticks */); + } else { + tok = nextTokenJSDoc(); + } } removeLeadingNewlines(comments2); - removeTrailingWhitespace(comments2); + const trimmedComments = trimStringEnd(comments2.join("")); if (parts2.length) { - if (comments2.length) { - parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 != null ? linkEnd2 : commentsPos2)); + if (trimmedComments.length) { + parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 != null ? linkEnd2 : commentsPos2)); } - return createNodeArray(parts2, commentsPos2, scanner2.getTextPos()); - } else if (comments2.length) { - return comments2.join(""); + return createNodeArray(parts2, commentsPos2, scanner2.getTokenEnd()); + } else if (trimmedComments.length) { + return trimmedComments; } } - function isNextJSDocTokenWhitespace() { - const next = nextTokenJSDoc(); - return next === 5 /* WhitespaceTrivia */ || next === 4 /* NewLineTrivia */; - } function parseJSDocLink(start2) { const linkType = tryParse(parseJSDocLinkPrefix); if (!linkType) { @@ -34497,7 +34534,7 @@ nextTokenJSDoc(); } const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain; - return finishNode(create(name, text.join("")), start2, scanner2.getTextPos()); + return finishNode(create(name, text.join("")), start2, scanner2.getTokenEnd()); } function parseJSDocLinkPrefix() { skipWhitespaceOrAsterisk(); @@ -34550,9 +34587,9 @@ } function isObjectOrObjectArrayTypeReference(node) { switch (node.kind) { - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return true; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -34582,26 +34619,26 @@ let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { - if (child.kind === 344 /* JSDocParameterTag */ || child.kind === 351 /* JSDocPropertyTag */) { + if (child.kind === 345 /* JSDocParameterTag */ || child.kind === 352 /* JSDocPropertyTag */) { children = append(children, child); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 185 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 186 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } } function parseReturnTag(start2, tagName, indent2, indentText) { if (some(tags, isJSDocReturnTag)) { - parseErrorAt(tagName.pos, scanner2.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText); + parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText); } const typeExpression = tryParseTypeExpression(); return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2); } function parseTypeTag(start2, tagName, indent2, indentText) { if (some(tags, isJSDocTypeTag)) { - parseErrorAt(tagName.pos, scanner2.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText); + parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText); } const typeExpression = parseJSDocTypeExpression( /*mayOmitBraces*/ @@ -34624,10 +34661,10 @@ function parseAuthorTag(start2, tagName, indent2, indentText) { const commentStart = getNodePos(); const textOnly = parseAuthorNameAndEmail(); - let commentEnd = scanner2.getStartPos(); + let commentEnd = scanner2.getTokenFullStart(); const comments2 = parseTrailingTagComments(start2, commentEnd, indent2, indentText); if (!comments2) { - commentEnd = scanner2.getStartPos(); + commentEnd = scanner2.getTokenFullStart(); } const allParts = typeof comments2 !== "string" ? createNodeArray(concatenate([finishNode(textOnly, commentStart, commentEnd)], comments2), commentStart) : textOnly.text + comments2; return finishNode(factory2.createJSDocAuthorTag(tagName, allParts), start2); @@ -34643,7 +34680,7 @@ break; } else if (token2 === 31 /* GreaterThanToken */ && inEmail) { comments2.push(scanner2.getTokenText()); - scanner2.setTextPos(scanner2.getTokenPos() + 1); + scanner2.resetTokenState(scanner2.getTokenEnd()); break; } comments2.push(scanner2.getTokenText()); @@ -34722,7 +34759,7 @@ let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent2))) { hasChildren = true; - if (child.kind === 347 /* JSDocTypeTag */) { + if (child.kind === 348 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -34737,7 +34774,7 @@ } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 185 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 186 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -34751,7 +34788,7 @@ return finishNode(typedefTag, start2, end2); } function parseJSDocTypeNameWithNamespace(nested) { - const pos = scanner2.getTokenPos(); + const start2 = scanner2.getTokenStart(); if (!tokenIsIdentifierOrKeyword(token())) { return void 0; } @@ -34768,7 +34805,7 @@ body, nested ? 4 /* NestedNamespace */ : void 0 ); - return finishNode(jsDocNamespaceNode, pos); + return finishNode(jsDocNamespaceNode, start2); } if (nested) { typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */; @@ -34789,7 +34826,7 @@ const returnTag = tryParse(() => { if (parseOptionalJsdoc(59 /* AtToken */)) { const tag = parseTag(indent2); - if (tag && tag.kind === 345 /* JSDocReturnTag */) { + if (tag && tag.kind === 346 /* JSDocReturnTag */) { return tag; } } @@ -34844,7 +34881,7 @@ case 59 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent2); - if (child && (child.kind === 344 /* JSDocParameterTag */ || child.kind === 351 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 345 /* JSDocParameterTag */ || child.kind === 352 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -34871,7 +34908,7 @@ } function tryParseChildTag(target, indent2) { Debug.assert(token() === 59 /* AtToken */); - const start2 = scanner2.getStartPos(); + const start2 = scanner2.getTokenFullStart(); nextTokenJSDoc(); const tagName = parseJSDocIdentifierName(); skipWhitespace(); @@ -34971,11 +35008,11 @@ ); } identifierCount++; - const pos = scanner2.getTokenPos(); - const end2 = scanner2.getTextPos(); + const start2 = scanner2.getTokenStart(); + const end2 = scanner2.getTokenEnd(); const originalKeywordKind = token(); const text = internIdentifier(scanner2.getTokenValue()); - const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), pos, end2); + const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), start2, end2); nextTokenJSDoc(); return result; } @@ -35761,7 +35798,7 @@ var _a2; const rootExpression = (_a2 = sourceFile.statements[0]) == null ? void 0 : _a2.expression; const knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : void 0; - if (rootExpression && rootExpression.kind !== 207 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 208 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -35819,7 +35856,7 @@ function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 299 /* PropertyAssignment */) { + if (element.kind !== 300 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -35877,19 +35914,19 @@ function convertPropertyValueToJson(valueExpression, option) { let invalidReported; switch (valueExpression.kind) { - case 110 /* TrueKeyword */: + case 111 /* TrueKeyword */: reportInvalidOptionValue(option && option.type !== "boolean" && (option.type !== "listOrElement" || option.element.type !== "boolean")); return validateValue( /*value*/ true ); - case 95 /* FalseKeyword */: + case 96 /* FalseKeyword */: reportInvalidOptionValue(option && option.type !== "boolean" && (option.type !== "listOrElement" || option.element.type !== "boolean")); return validateValue( /*value*/ false ); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: reportInvalidOptionValue(option && option.name === "extends"); return validateValue( /*value*/ @@ -35920,13 +35957,13 @@ case 8 /* NumericLiteral */: reportInvalidOptionValue(option && option.type !== "number" && (option.type !== "listOrElement" || option.element.type !== "number")); return validateValue(Number(valueExpression.text)); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: if (valueExpression.operator !== 40 /* MinusToken */ || valueExpression.operand.kind !== 8 /* NumericLiteral */) { break; } reportInvalidOptionValue(option && option.type !== "number" && (option.type !== "listOrElement" || option.element.type !== "number")); return validateValue(-Number(valueExpression.operand.text)); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: reportInvalidOptionValue(option && option.type !== "object" && (option.type !== "listOrElement" || option.element.type !== "object")); const objectLiteralExpression = valueExpression; if (option) { @@ -35948,7 +35985,7 @@ void 0 )); } - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: reportInvalidOptionValue(option && option.type !== "list" && option.type !== "listOrElement"); return validateValue(convertArrayLiteralExpressionToJson( valueExpression.elements, @@ -41204,23 +41241,23 @@ } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 276 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 277 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -41234,7 +41271,7 @@ return state; } break; - case 265 /* ModuleBlock */: { + case 266 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -41253,7 +41290,7 @@ }); return state; } - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 79 /* Identifier */: if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { @@ -41418,7 +41455,7 @@ } } function getDeclarationName(node) { - if (node.kind === 274 /* ExportAssignment */) { + if (node.kind === 275 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -41427,7 +41464,7 @@ const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 164 /* ComputedPropertyName */) { + if (name.kind === 165 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -41449,31 +41486,31 @@ return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return "__constructor" /* Constructor */; - case 181 /* FunctionType */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: + case 182 /* FunctionType */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: return "__call" /* Call */; - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: return "__new" /* New */; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return "__index" /* Index */; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return "export=" /* ExportEquals */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); break; - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 166 /* Parameter */: - Debug.assert(node.parent.kind === 320 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 167 /* Parameter */: + Debug.assert(node.parent.kind === 321 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); const functionType = node.parent; const index = functionType.parameters.indexOf(node); return "arg" + index; @@ -41520,7 +41557,7 @@ messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 274 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 275 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -41559,7 +41596,7 @@ function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 278 /* ExportSpecifier */ || node.kind === 268 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 279 /* ExportSpecifier */ || node.kind === 269 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { Debug.assertNode(container, canHaveLocals); @@ -41626,7 +41663,7 @@ const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 216 /* ArrowFunction */) { + if (node.kind !== 217 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -41648,14 +41685,14 @@ const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 172 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 173 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 173 /* Constructor */ || isInJSFile(node) && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 174 /* Constructor */ || isInJSFile(node) && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; @@ -41669,14 +41706,14 @@ node.flags |= 512 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 173 /* Constructor */ || node.kind === 172 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */)) { + if (node.kind === 174 /* Constructor */ || node.kind === 173 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -41702,8 +41739,8 @@ blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 259 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 259 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 260 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 260 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -41723,59 +41760,59 @@ inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 240 /* FirstStatement */ && node.kind <= 256 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 241 /* FirstStatement */ && node.kind <= 257 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: bindWhileStatement(node); break; - case 243 /* DoStatement */: + case 244 /* DoStatement */: bindDoStatement(node); break; - case 245 /* ForStatement */: + case 246 /* ForStatement */: bindForStatement(node); break; - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 242 /* IfStatement */: + case 243 /* IfStatement */: bindIfStatement(node); break; - case 250 /* ReturnStatement */: - case 254 /* ThrowStatement */: + case 251 /* ReturnStatement */: + case 255 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: bindTryStatement(node); break; - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: bindSwitchStatement(node); break; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: bindCaseBlock(node); break; - case 292 /* CaseClause */: + case 293 /* CaseClause */: bindCaseClause(node); break; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: bindLabeledStatement(node); break; - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -41783,49 +41820,49 @@ } bindBinaryExpressionFlow(node); break; - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: bindCallExpressionFlow(node); break; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 308 /* SourceFile */: { + case 309 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 238 /* Block */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 266 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: bindBindingElementFlow(node); break; - case 166 /* Parameter */: + case 167 /* Parameter */: bindParameterFlow(node); break; - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: - case 299 /* PropertyAssignment */: - case 227 /* SpreadElement */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: + case 300 /* PropertyAssignment */: + case 228 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -41838,20 +41875,20 @@ switch (expr.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 108 /* ThisKeyword */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 109 /* ThisKeyword */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return hasNarrowableArgument(expr); - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return expr.operator === 53 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -41870,7 +41907,7 @@ } } } - if (expr.expression.kind === 208 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 209 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -41890,9 +41927,9 @@ case 36 /* EqualsEqualsEqualsToken */: case 37 /* ExclamationEqualsEqualsToken */: return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return isNarrowableOperand(expr.left); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return isNarrowingExpression(expr.right); case 27 /* CommaToken */: return isNarrowingExpression(expr.right); @@ -41901,9 +41938,9 @@ } function isNarrowableOperand(expr) { switch (expr.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 63 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -41938,7 +41975,7 @@ if (!expression) { return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; } - if ((expression.kind === 110 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || expression.kind === 95 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && !isExpressionOfOptionalChainRoot(expression) && !isNullishCoalesce(expression.parent)) { + if ((expression.kind === 111 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || expression.kind === 96 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && !isExpressionOfOptionalChainRoot(expression) && !isNullishCoalesce(expression.parent)) { return unreachableFlow; } if (!isNarrowingExpression(expression)) { @@ -41976,21 +42013,21 @@ function isStatementCondition(node) { const parent3 = node.parent; switch (parent3.kind) { - case 242 /* IfStatement */: - case 244 /* WhileStatement */: - case 243 /* DoStatement */: + case 243 /* IfStatement */: + case 245 /* WhileStatement */: + case 244 /* DoStatement */: return parent3.expression === node; - case 245 /* ForStatement */: - case 224 /* ConditionalExpression */: + case 246 /* ForStatement */: + case 225 /* ConditionalExpression */: return parent3.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 214 /* ParenthesizedExpression */) { + if (node.kind === 215 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { + } else if (node.kind === 222 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { node = node.operand; } else { return isLogicalOrCoalescingBinaryExpression(node); @@ -42033,7 +42070,7 @@ } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 253 /* LabeledStatement */) { + while (label && node.parent.kind === 254 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -42084,12 +42121,12 @@ bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 247 /* ForOfStatement */) { + if (node.kind === 248 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 258 /* VariableDeclarationList */) { + if (node.initializer.kind !== 259 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -42111,7 +42148,7 @@ } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 250 /* ReturnStatement */) { + if (node.kind === 251 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -42128,7 +42165,7 @@ return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 249 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 250 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -42198,7 +42235,7 @@ preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 293 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 294 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -42241,9 +42278,9 @@ maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { const call = node; - if (call.expression.kind !== 106 /* SuperKeyword */ && isDottedName(call.expression)) { + if (call.expression.kind !== 107 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); } } @@ -42267,7 +42304,7 @@ currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -42276,21 +42313,21 @@ function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 206 /* ArrayLiteralExpression */) { + } else if (node.kind === 207 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 227 /* SpreadElement */) { + if (e.kind === 228 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 207 /* ObjectLiteralExpression */) { + } else if (node.kind === 208 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 299 /* PropertyAssignment */) { + if (p.kind === 300 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 300 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 301 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 301 /* SpreadAssignment */) { + } else if (p.kind === 302 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -42421,7 +42458,7 @@ const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 63 /* EqualsToken */ && node.left.kind === 209 /* ElementAccessExpression */) { + if (operator === 63 /* EqualsToken */ && node.left.kind === 210 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -42449,7 +42486,7 @@ } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 208 /* PropertyAccessExpression */) { + if (node.expression.kind === 209 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -42514,7 +42551,7 @@ } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 343 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 344 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive( node.fullName, @@ -42529,7 +42566,7 @@ function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 171 /* MethodDeclaration */) { + if (host && host.kind !== 172 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -42542,15 +42579,15 @@ } function bindOptionalChainRest(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -42597,18 +42634,18 @@ bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 215 /* FunctionExpression */ || expr.kind === 216 /* ArrowFunction */) { + if (expr.kind === 216 /* FunctionExpression */ || expr.kind === 217 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); } else { bindEachChild(node); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { currentFlow = createFlowCall(currentFlow, node); } } } - if (node.expression.kind === 208 /* PropertyAccessExpression */) { + if (node.expression.kind === 209 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -42623,39 +42660,39 @@ } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 308 /* SourceFile */: + case 309 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 207 /* ObjectLiteralExpression */: - case 261 /* InterfaceDeclaration */: - case 289 /* JsxAttributes */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 208 /* ObjectLiteralExpression */: + case 262 /* InterfaceDeclaration */: + case 290 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 326 /* JSDocSignature */: - case 178 /* IndexSignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 320 /* JSDocFunctionType */: - case 172 /* ClassStaticBlockDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 197 /* MappedType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 327 /* JSDocSignature */: + case 179 /* IndexSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 321 /* JSDocFunctionType */: + case 173 /* ClassStaticBlockDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 198 /* MappedType */: if (container.locals) Debug.assertNode(container, canHaveLocals); return declareSymbol( @@ -42757,10 +42794,10 @@ } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -42855,13 +42892,13 @@ if (originalKeywordKind === void 0) { return; } - if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) { + if (inStrictMode && originalKeywordKind >= 118 /* FirstFutureReservedWord */ && originalKeywordKind <= 126 /* LastFutureReservedWord */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, getStrictModeIdentifierMessage(node), declarationNameToString(node) )); - } else if (originalKeywordKind === 133 /* AwaitKeyword */) { + } else if (originalKeywordKind === 134 /* AwaitKeyword */) { if (isExternalModule(file) && isInTopLevelContext(node)) { file.bindDiagnostics.push(createDiagnosticForNode2( node, @@ -42875,7 +42912,7 @@ declarationNameToString(node) )); } - } else if (originalKeywordKind === 125 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { + } else if (originalKeywordKind === 126 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, @@ -42963,7 +43000,7 @@ } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 308 /* SourceFile */ && blockScopeContainer.kind !== 264 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 309 /* SourceFile */ && blockScopeContainer.kind !== 265 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -43030,7 +43067,7 @@ node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 162 /* LastToken */) { + if (node.kind > 163 /* LastToken */) { const saveParent = parent2; parent2 = node; const containerFlags = getContainerFlags(node); @@ -43095,24 +43132,24 @@ bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); break; } - case 108 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 300 /* ShorthandPropertyAssignment */)) { + case 109 /* ThisKeyword */: + if (currentFlow && (isExpression(node) || parent2.kind === 301 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 233 /* MetaProperty */: - case 106 /* SuperKeyword */: + case 234 /* MetaProperty */: + case 107 /* SuperKeyword */: node.flowNode = currentFlow; break; case 80 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -43131,7 +43168,7 @@ ); } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -43166,83 +43203,83 @@ Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return checkStrictModeCatchClause(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return checkStrictModeWithStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 194 /* ThisType */: + case 195 /* ThisType */: seenThisKeyword = true; return; - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return bindTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return bindParameter(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return bindPropertyWorker(node); - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 302 /* EnumMember */: + case 303 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return declareSymbolAndAddToSymbolTable( node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */ ); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 181 /* FunctionType */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 183 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 197 /* MappedType */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 198 /* MappedType */: return bindAnonymousTypeWorker(node); - case 335 /* JSDocClassTag */: + case 336 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return bindFunctionExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -43260,60 +43297,60 @@ bindCallExpression(node); } break; - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return bindJsxAttributes(node); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 268 /* ImportEqualsDeclaration */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 269 /* ImportEqualsDeclaration */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return bindImportClause(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return bindExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return bindExportAssignment(node); - case 308 /* SourceFile */: + case 309 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 238 /* Block */: + case 239 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 344 /* JSDocParameterTag */: - if (node.parent.kind === 326 /* JSDocSignature */) { + case 345 /* JSDocParameterTag */: + if (node.parent.kind === 327 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 325 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 326 /* JSDocTypeLiteral */) { break; } - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 319 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 320 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return bind(node.typeExpression); } } @@ -43465,8 +43502,8 @@ false ); switch (thisContainer.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 63 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -43484,12 +43521,12 @@ addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -43506,7 +43543,7 @@ ); } break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -43539,9 +43576,9 @@ } } function bindSpecialPropertyDeclaration(node) { - if (node.expression.kind === 108 /* ThisKeyword */) { + if (node.expression.kind === 109 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 308 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 309 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -43590,7 +43627,7 @@ } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 308 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 309 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces( namespaceSymbol, node.arguments[0], @@ -43704,7 +43741,7 @@ declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 308 /* SourceFile */ : propertyAccess.parent.parent.kind === 308 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 309 /* SourceFile */ : propertyAccess.parent.parent.kind === 309 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -43766,7 +43803,7 @@ } } function bindClassLikeDeclaration(node) { - if (node.kind === 260 /* ClassDeclaration */) { + if (node.kind === 261 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -43795,7 +43832,7 @@ checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 257 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 258 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && getEmitModuleResolutionKind(options) !== 100 /* Bundler */ && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -43808,7 +43845,7 @@ } } function bindParameter(node) { - if (node.kind === 344 /* JSDocParameterTag */ && container.kind !== 326 /* JSDocSignature */) { + if (node.kind === 345 /* JSDocParameterTag */ && container.kind !== 327 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { @@ -43882,7 +43919,7 @@ } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 192 /* InferType */) { + } else if (node.parent.kind === 193 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { Debug.assertNode(container2, canHaveLocals); @@ -43913,9 +43950,9 @@ if (currentFlow === unreachableFlow) { const reportError = ( // report error on all statements except empty ones - isStatementButNotDeclaration(node) && node.kind !== 239 /* EmptyStatement */ || // report error on class declarations - node.kind === 260 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - node.kind === 264 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) + isStatementButNotDeclaration(node) && node.kind !== 240 /* EmptyStatement */ || // report error on class declarations + node.kind === 261 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + node.kind === 265 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) ); if (reportError) { currentFlow = reportedUnreachableFlow; @@ -43943,12 +43980,12 @@ } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -43983,54 +44020,54 @@ } function getContainerFlags(node) { switch (node.kind) { - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 289 /* JsxAttributes */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 290 /* JsxAttributes */: return 1 /* IsContainer */; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 197 /* MappedType */: - case 178 /* IndexSignature */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 198 /* MappedType */: + case 179 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: - case 320 /* JSDocFunctionType */: - case 181 /* FunctionType */: - case 177 /* ConstructSignature */: - case 182 /* ConstructorType */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: + case 321 /* JSDocFunctionType */: + case 182 /* FunctionType */: + case 178 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 173 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 295 /* CatchClause */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 266 /* CaseBlock */: + case 296 /* CatchClause */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 267 /* CaseBlock */: return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - case 238 /* Block */: + case 239 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; } return 0 /* None */; @@ -44206,7 +44243,7 @@ symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 183 /* TypeQuery */) { + if (d.type && d.type.kind === 184 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -45324,7 +45361,10 @@ createIndexInfo, getAnyType: () => anyType, getStringType: () => stringType, + getStringLiteralType, getNumberType: () => numberType, + getNumberLiteralType, + getBigIntType: () => bigintType, createPromiseType, createArrayType, getElementTypeOfArrayType, @@ -46238,7 +46278,7 @@ return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 308 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 309 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function getSymbol2(symbols, name, meaning) { if (meaning) { @@ -46282,13 +46322,13 @@ return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 205 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 205 /* BindingElement */); + if (declaration.kind === 206 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 206 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 257 /* VariableDeclaration */), usage); - } else if (declaration.kind === 257 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 258 /* VariableDeclaration */), usage); + } else if (declaration.kind === 258 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -46304,10 +46344,10 @@ } return true; } - if (usage.parent.kind === 278 /* ExportSpecifier */ || usage.parent.kind === 274 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 279 /* ExportSpecifier */ || usage.parent.kind === 275 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 274 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 275 /* ExportAssignment */ && usage.isExportEquals) { return true; } if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { @@ -46328,9 +46368,9 @@ return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 240 /* VariableStatement */: - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: + case 241 /* VariableStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -46355,7 +46395,7 @@ const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 171 /* MethodDeclaration */) { + if (declaration2.kind === 172 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -46369,7 +46409,7 @@ } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 169 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 170 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -46388,15 +46428,15 @@ return "quit"; } switch (node.kind) { - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return true; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 238 /* Block */: + case 239 /* Block */: switch (node.parent.kind) { - case 174 /* GetAccessor */: - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: return true; default: return false; @@ -46426,17 +46466,17 @@ } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 173 /* Constructor */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 174 /* Constructor */: return false; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 299 /* PropertyAssignment */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 300 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (hasStaticModifier(node)) { return target < 99 /* ESNext */ || !useDefineForClassFields; } @@ -46481,17 +46521,17 @@ if (result = lookup(location.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 323 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 166 /* Parameter */ || lastLocation.kind === 344 /* JSDocParameterTag */ || lastLocation.kind === 345 /* JSDocReturnTag */ || lastLocation.kind === 165 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 324 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 167 /* Parameter */ || lastLocation.kind === 345 /* JSDocParameterTag */ || lastLocation.kind === 346 /* JSDocReturnTag */ || lastLocation.kind === 166 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 166 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 167 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 191 /* ConditionalType */) { + } else if (location.kind === 192 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -46503,13 +46543,13 @@ } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const moduleExports = ((_a2 = getSymbolOfDeclaration(location)) == null ? void 0 : _a2.exports) || emptySymbols; - if (location.kind === 308 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 309 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { if (result = moduleExports.get("default" /* Default */)) { const localSymbol = getLocalSymbolForExportDefault(result); if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { @@ -46518,7 +46558,7 @@ result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 278 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 277 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 279 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 278 /* NamespaceExport */))) { break; } } @@ -46530,7 +46570,7 @@ } } break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 16777216 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { error( @@ -46544,7 +46584,7 @@ break loop; } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -46555,9 +46595,9 @@ } } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -46579,8 +46619,8 @@ } } break; - case 230 /* ExpressionWithTypeArguments */: - if (lastLocation === location.expression && location.parent.token === 94 /* ExtendsKeyword */) { + case 231 /* ExpressionWithTypeArguments */: + if (lastLocation === location.expression && location.parent.token === 95 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) { if (nameNotFoundMessage) { @@ -46590,9 +46630,9 @@ } } break; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 261 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 262 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -46601,21 +46641,21 @@ } } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -46628,37 +46668,37 @@ } } break; - case 167 /* Decorator */: - if (location.parent && location.parent.kind === 166 /* Parameter */) { + case 168 /* Decorator */: + if (location.parent && location.parent.kind === 167 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 260 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 261 /* ClassDeclaration */)) { location = location.parent; } break; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 192 /* InferType */: + case 193 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -46786,7 +46826,7 @@ if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */); if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 277 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + const message = typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 278 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; const unescapedName = unescapeLeadingUnderscores(name); addTypeOnlyDeclarationRelatedInfo( error(errorLocation, message, unescapedName), @@ -46806,14 +46846,14 @@ diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 277 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 278 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 216 /* ArrowFunction */ && location.kind !== 215 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 169 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 217 /* ArrowFunction */ && location.kind !== 216 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 170 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -46825,12 +46865,12 @@ } function isSelfReferenceLocation(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 264 /* ModuleDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 265 /* ModuleDeclaration */: return true; default: return false; @@ -46842,7 +46882,7 @@ function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 165 /* TypeParameter */) { + if (decl.kind === 166 /* TypeParameter */) { const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent2 === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -46903,9 +46943,9 @@ function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -46973,7 +47013,7 @@ return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 278 /* ExportSpecifier */) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 279 /* ExportSpecifier */) { error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } @@ -47019,7 +47059,7 @@ const grandparent = node.parent.parent; const parentOfGrandparent = grandparent.parent; if (grandparent && parentOfGrandparent) { - const isExtending = isHeritageClause(grandparent) && grandparent.token === 94 /* ExtendsKeyword */; + const isExtending = isHeritageClause(grandparent) && grandparent.token === 95 /* ExtendsKeyword */; const isInterface = isInterfaceDeclaration(parentOfGrandparent); return isExtending && isInterface; } @@ -47097,7 +47137,7 @@ return; } const declaration = (_a2 = result.declarations) == null ? void 0 : _a2.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 263 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 264 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); @@ -47129,13 +47169,13 @@ } function getAnyImportSyntax(node) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return node; - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.parent; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.parent; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -47145,7 +47185,7 @@ return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); } function isAliasSymbolDeclaration2(node) { - return node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 267 /* NamespaceExportDeclaration */ || node.kind === 270 /* ImportClause */ && !!node.name || node.kind === 271 /* NamespaceImport */ || node.kind === 277 /* NamespaceExport */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 278 /* ExportSpecifier */ || node.kind === 274 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 300 /* ShorthandPropertyAssignment */ || node.kind === 299 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 257 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 205 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 268 /* NamespaceExportDeclaration */ || node.kind === 271 /* ImportClause */ && !!node.name || node.kind === 272 /* NamespaceImport */ || node.kind === 278 /* NamespaceExport */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 279 /* ExportSpecifier */ || node.kind === 275 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 301 /* ShorthandPropertyAssignment */ || node.kind === 300 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 258 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 206 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -47156,7 +47196,7 @@ const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; } - if (isVariableDeclaration(node) || node.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 281 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -47185,10 +47225,10 @@ false ) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node)); - const isExport = typeOnlyDeclaration.kind === 278 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 275 /* ExportDeclaration */; + const isExport = typeOnlyDeclaration.kind === 279 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 276 /* ExportDeclaration */; const message = isExport ? Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; - const name = typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + const name = typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); addRelatedInfo(error(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); } } @@ -47330,15 +47370,15 @@ } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 270 /* ImportClause */: + case 271 /* ImportClause */: return node.parent.moduleSpecifier; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -47671,26 +47711,26 @@ } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: - case 257 /* VariableDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 258 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 273 /* ImportSpecifier */: - case 205 /* BindingElement */: + case 274 /* ImportSpecifier */: + case 206 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 274 /* ExportAssignment */: - case 223 /* BinaryExpression */: + case 275 /* ExportAssignment */: + case 224 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return resolveEntityName( node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -47698,10 +47738,10 @@ true, dontRecursivelyResolve ); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -47802,7 +47842,7 @@ return links.typeOnlyDeclaration || void 0; } if (links.typeOnlyDeclaration) { - const resolved = links.typeOnlyDeclaration.kind === 275 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); + const resolved = links.typeOnlyDeclaration.kind === 276 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; } return void 0; @@ -47845,7 +47885,7 @@ if (entityName.kind === 79 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 163 /* QualifiedName */) { + if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 164 /* QualifiedName */) { return resolveEntityName( entityName, 1920 /* Namespace */, @@ -47854,7 +47894,7 @@ dontResolveAlias ); } else { - Debug.assert(entityName.parent.kind === 268 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 269 /* ImportEqualsDeclaration */); return resolveEntityName( entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -47925,9 +47965,9 @@ if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 163 /* QualifiedName */ || name.kind === 208 /* PropertyAccessExpression */) { - const left = name.kind === 163 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 163 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 164 /* QualifiedName */ || name.kind === 209 /* PropertyAccessExpression */) { + const left = name.kind === 164 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 164 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName( left, namespaceMeaning, @@ -47991,7 +48031,7 @@ throw Debug.assertNever(name, "Unknown entity name kind."); } Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 274 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 275 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly( getAliasDeclarationFromName(name), symbol, @@ -48343,7 +48383,7 @@ var _a2; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 308 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 309 /* SourceFile */)) { const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; error(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); return symbol; @@ -48448,7 +48488,7 @@ return shouldTreatPropertiesOfExternalModuleAsExports(type) ? getPropertyOfType(type, memberName) : void 0; } function shouldTreatPropertiesOfExternalModuleAsExports(resolvedExternalModuleType) { - return !(resolvedExternalModuleType.flags & 134348796 /* Primitive */ || getObjectFlags(resolvedExternalModuleType) & 1 /* Class */ || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path + return !(resolvedExternalModuleType.flags & 402784252 /* Primitive */ || getObjectFlags(resolvedExternalModuleType) & 1 /* Class */ || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path isArrayType(resolvedExternalModuleType) || isTupleType(resolvedExternalModuleType)); } function getExportsOfSymbol(symbol) { @@ -48705,7 +48745,7 @@ function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 173 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 174 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -48823,11 +48863,11 @@ } } switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const sym = getSymbolOfDeclaration(location); if (result = callback( (sym == null ? void 0 : sym.exports) || emptySymbols, @@ -48840,9 +48880,9 @@ return result; } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: let table; (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -48920,7 +48960,7 @@ return [symbol]; } const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => { - if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 278 /* ExportSpecifier */))) { + if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 279 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -48965,7 +49005,7 @@ if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 278 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 279 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { @@ -48980,10 +49020,10 @@ if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: continue; default: return false; @@ -49119,10 +49159,10 @@ return node && getSymbolOfDeclaration(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -49170,9 +49210,9 @@ } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 183 /* TypeQuery */ || entityName.parent.kind === 230 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 164 /* ComputedPropertyName */) { + if (entityName.parent.kind === 184 /* TypeQuery */ || entityName.parent.kind === 231 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 165 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 163 /* QualifiedName */ || entityName.kind === 208 /* PropertyAccessExpression */ || entityName.parent.kind === 268 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 164 /* QualifiedName */ || entityName.kind === 209 /* PropertyAccessExpression */ || entityName.parent.kind === 269 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -49238,7 +49278,7 @@ return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 309 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode( 4 /* Unspecified */, @@ -49255,9 +49295,9 @@ function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 182 /* ConstructorType */ : 181 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 183 /* ConstructorType */ : 182 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 178 /* ConstructSignature */ : 177 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -49403,7 +49443,7 @@ return void 0; } context.approximateLength += 3; - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (!(context.flags & 536870912 /* NoTypeReduction */)) { type = getReducedType(type); @@ -49413,29 +49453,29 @@ return factory.createTypeReferenceNode(symbolToEntityNameNode(type.aliasSymbol), mapToTypeNodes(type.aliasTypeArguments, context)); } if (type === unresolvedType) { - return addSyntheticLeadingComment(factory.createKeywordTypeNode(131 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "unresolved"); + return addSyntheticLeadingComment(factory.createKeywordTypeNode(132 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "unresolved"); } context.approximateLength += 3; - return factory.createKeywordTypeNode(type === intrinsicMarkerType ? 139 /* IntrinsicKeyword */ : 131 /* AnyKeyword */); + return factory.createKeywordTypeNode(type === intrinsicMarkerType ? 140 /* IntrinsicKeyword */ : 132 /* AnyKeyword */); } if (type.flags & 2 /* Unknown */) { - return factory.createKeywordTypeNode(157 /* UnknownKeyword */); + return factory.createKeywordTypeNode(158 /* UnknownKeyword */); } if (type.flags & 4 /* String */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(152 /* StringKeyword */); + return factory.createKeywordTypeNode(153 /* StringKeyword */); } if (type.flags & 8 /* Number */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(148 /* NumberKeyword */); + return factory.createKeywordTypeNode(149 /* NumberKeyword */); } if (type.flags & 64 /* BigInt */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(160 /* BigIntKeyword */); + return factory.createKeywordTypeNode(161 /* BigIntKeyword */); } if (type.flags & 16 /* Boolean */ && !type.aliasSymbol) { context.approximateLength += 7; - return factory.createKeywordTypeNode(134 /* BooleanKeyword */); + return factory.createKeywordTypeNode(135 /* BooleanKeyword */); } if (type.flags & 1056 /* EnumLike */) { if (type.symbol.flags & 8 /* EnumMember */) { @@ -49494,15 +49534,15 @@ } } context.approximateLength += 13; - return factory.createTypeOperatorNode(156 /* UniqueKeyword */, factory.createKeywordTypeNode(153 /* SymbolKeyword */)); + return factory.createTypeOperatorNode(157 /* UniqueKeyword */, factory.createKeywordTypeNode(154 /* SymbolKeyword */)); } if (type.flags & 16384 /* Void */) { context.approximateLength += 4; - return factory.createKeywordTypeNode(114 /* VoidKeyword */); + return factory.createKeywordTypeNode(115 /* VoidKeyword */); } if (type.flags & 32768 /* Undefined */) { context.approximateLength += 9; - return factory.createKeywordTypeNode(155 /* UndefinedKeyword */); + return factory.createKeywordTypeNode(156 /* UndefinedKeyword */); } if (type.flags & 65536 /* Null */) { context.approximateLength += 4; @@ -49510,15 +49550,15 @@ } if (type.flags & 131072 /* Never */) { context.approximateLength += 5; - return factory.createKeywordTypeNode(144 /* NeverKeyword */); + return factory.createKeywordTypeNode(145 /* NeverKeyword */); } if (type.flags & 4096 /* ESSymbol */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(153 /* SymbolKeyword */); + return factory.createKeywordTypeNode(154 /* SymbolKeyword */); } if (type.flags & 67108864 /* NonPrimitive */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(149 /* ObjectKeyword */); + return factory.createKeywordTypeNode(150 /* ObjectKeyword */); } if (isThisTypeParameter(type)) { if (context.flags & 4194304 /* InObjectTypeLiteral */) { @@ -49612,7 +49652,7 @@ const indexedType = type.type; context.approximateLength += 6; const indexTypeNode = typeToTypeNodeHelper(indexedType, context); - return factory.createTypeOperatorNode(141 /* KeyOfKeyword */, indexTypeNode); + return factory.createTypeOperatorNode(142 /* KeyOfKeyword */, indexTypeNode); } if (type.flags & 134217728 /* TemplateLiteral */) { const texts = type.texts; @@ -49670,9 +49710,9 @@ factory.createTypeReferenceNode(factory.cloneNode(name)), typeToTypeNodeHelper(type2.checkType, context), factory.createConditionalTypeNode(newTypeVariable, extendsTypeNode2, trueTypeNode2, falseTypeNode2), - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ), - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ); } const saveInferTypeParameters = context.inferTypeParameters; @@ -49712,7 +49752,7 @@ const name = typeParameterToName(newParam, context); newTypeVariable = factory.createTypeReferenceNode(name); } - appropriateConstraintTypeNode = factory.createTypeOperatorNode(141 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); + appropriateConstraintTypeNode = factory.createTypeOperatorNode(142 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); } else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context); } @@ -49741,7 +49781,7 @@ originalConstraint.flags & 2 /* Unknown */ ? void 0 : typeToTypeNodeHelper(originalConstraint, context) )), result, - factory.createKeywordTypeNode(144 /* NeverKeyword */) + factory.createKeywordTypeNode(145 /* NeverKeyword */) ); } return result; @@ -49794,7 +49834,7 @@ const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method some(symbol.declarations, (declaration) => isStatic(declaration)); const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol - forEach(symbol.declarations, (declaration) => declaration.parent.kind === 308 /* SourceFile */ || declaration.parent.kind === 265 /* ModuleBlock */)); + forEach(symbol.declarations, (declaration) => declaration.parent.kind === 309 /* SourceFile */ || declaration.parent.kind === 266 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a4 = context.visitedTypes) == null ? void 0 : _a4.has(typeId))) && // it is type of the symbol uses itself recursively (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); @@ -49877,12 +49917,12 @@ } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 181 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 182 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 182 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 183 /* ConstructorType */, context); return signatureNode; } } @@ -49915,7 +49955,7 @@ } const elementType = typeToTypeNodeHelper(typeArguments[0], context); const arrayType = factory.createArrayTypeNode(elementType); - return type2.target === globalArrayType ? arrayType : factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, arrayType); + return type2.target === globalArrayType ? arrayType : factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, arrayType); } else if (type2.target.objectFlags & 8 /* Tuple */) { typeArguments = sameMap(typeArguments, (t, i) => removeMissingType(t, !!(type2.target.elementFlags[i] & 2 /* Optional */))); if (typeArguments.length > 0) { @@ -49939,12 +49979,12 @@ } } const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode(tupleConstituentNodes), 1 /* SingleLine */); - return type2.target.readonly ? factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; + return type2.target.readonly ? factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; } } if (context.encounteredError || context.flags & 524288 /* AllowEmptyTuple */) { const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode([]), 1 /* SingleLine */); - return type2.target.readonly ? factory.createTypeOperatorNode(146 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; + return type2.target.readonly ? factory.createTypeOperatorNode(147 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; } context.encounteredError = true; return void 0; @@ -50068,12 +50108,12 @@ } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 176 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 177 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 177 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 178 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -50120,7 +50160,7 @@ void 0 ); } - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } function shouldUsePlaceholderForProperty(propertySymbol, context) { var _a2; @@ -50157,7 +50197,7 @@ if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); for (const signature of signatures) { - const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 170 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 171 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } } else { @@ -50169,12 +50209,12 @@ context.reverseMappedStack || (context.reverseMappedStack = []); context.reverseMappedStack.push(propertySymbol); } - propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(131 /* AnyKeyword */); + propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(132 /* AnyKeyword */); if (propertyIsReverseMapped) { context.reverseMappedStack.pop(); } } - const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(146 /* ReadonlyKeyword */)] : void 0; + const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(147 /* ReadonlyKeyword */)] : void 0; if (modifiers) { context.approximateLength += 9; } @@ -50188,8 +50228,8 @@ } function preserveCommentsOn(node) { var _a3; - if (some(propertySymbol.declarations, (d) => d.kind === 351 /* JSDocPropertyTag */)) { - const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 351 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 352 /* JSDocPropertyTag */)) { + const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 352 /* JSDocPropertyTag */); const commentText = getTextOfJSDocComment(d.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -50289,7 +50329,7 @@ } context.approximateLength += name.length + 4; return factory.createIndexSignature( - indexInfo.isReadonly ? [factory.createToken(146 /* ReadonlyKeyword */)] : void 0, + indexInfo.isReadonly ? [factory.createToken(147 /* ReadonlyKeyword */)] : void 0, [indexingParameter], typeNode ); @@ -50345,7 +50385,7 @@ } } } - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 173 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); + const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 174 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context); if (thisParameter) { parameters.unshift(thisParameter); @@ -50353,7 +50393,7 @@ let returnTypeNode; const typePredicate = getTypePredicateOfSignature(signature); if (typePredicate) { - const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(129 /* AssertsKeyword */) : void 0; + const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(130 /* AssertsKeyword */) : void 0; const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 33554432 /* NoAsciiEscaping */) : factory.createThisTypeNode(); const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context); returnTypeNode = factory.createTypePredicateNode(assertsModifier, parameterName, typeNode); @@ -50362,15 +50402,15 @@ if (returnType && !(suppressAny && isTypeAny(returnType))) { returnTypeNode = serializeReturnTypeForSignature(context, returnType, signature, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports); } else if (!suppressAny) { - returnTypeNode = factory.createKeywordTypeNode(131 /* AnyKeyword */); + returnTypeNode = factory.createKeywordTypeNode(132 /* AnyKeyword */); } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 182 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 183 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 176 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 177 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 170 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 171 /* MethodDeclaration */ ? factory.createMethodDeclaration( + const node = kind === 177 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 178 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 171 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 172 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -50382,25 +50422,25 @@ returnTypeNode, /*body*/ void 0 - ) : kind === 173 /* Constructor */ ? factory.createConstructorDeclaration( + ) : kind === 174 /* Constructor */ ? factory.createConstructorDeclaration( modifiers, parameters, /*body*/ void 0 - ) : kind === 174 /* GetAccessor */ ? factory.createGetAccessorDeclaration( + ) : kind === 175 /* GetAccessor */ ? factory.createGetAccessorDeclaration( modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, returnTypeNode, /*body*/ void 0 - ) : kind === 175 /* SetAccessor */ ? factory.createSetAccessorDeclaration( + ) : kind === 176 /* SetAccessor */ ? factory.createSetAccessorDeclaration( modifiers, (_e = options == null ? void 0 : options.name) != null ? _e : factory.createIdentifier(""), parameters, /*body*/ void 0 - ) : kind === 178 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 320 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 181 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 182 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 259 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( + ) : kind === 179 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 321 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 182 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 183 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 260 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -50410,7 +50450,7 @@ returnTypeNode, /*body*/ void 0 - ) : kind === 215 /* FunctionExpression */ ? factory.createFunctionExpression( + ) : kind === 216 /* FunctionExpression */ ? factory.createFunctionExpression( modifiers, /*asteriskToken*/ void 0, @@ -50419,7 +50459,7 @@ parameters, returnTypeNode, factory.createBlock([]) - ) : kind === 216 /* ArrowFunction */ ? factory.createArrowFunction( + ) : kind === 217 /* ArrowFunction */ ? factory.createArrowFunction( modifiers, typeParameters, parameters, @@ -50469,9 +50509,9 @@ return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 166 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 167 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 344 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 345 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -50481,7 +50521,7 @@ const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(25 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 33554432 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 163 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 33554432 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 33554432 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 164 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 33554432 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(57 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -50662,11 +50702,11 @@ } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { var _a2; - let file = getDeclarationOfKind(symbol, 308 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 309 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 308 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 309 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -51146,17 +51186,17 @@ } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 322 /* JSDocNamepathType */) { - return factory.createKeywordTypeNode(131 /* AnyKeyword */); + if (isJSDocAllType(node) || node.kind === 323 /* JSDocNamepathType */) { + return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { - return factory.createKeywordTypeNode(157 /* UnknownKeyword */); + return factory.createKeywordTypeNode(158 /* UnknownKeyword */); } if (isJSDocNullableType(node)) { return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]); } if (isJSDocOptionalType(node)) { - return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]); + return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(156 /* UndefinedKeyword */)]); } if (isJSDocNonNullableType(node)) { return visitNode(node.type, visitExistingNodeTreeSymbols); @@ -51174,12 +51214,12 @@ void 0, name, t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0, - overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); })); } if (isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "") { - return setOriginalNode(factory.createKeywordTypeNode(131 /* AnyKeyword */), node); + return setOriginalNode(factory.createKeywordTypeNode(132 /* AnyKeyword */), node); } if ((isExpressionWithTypeArguments(node) || isTypeReferenceNode(node)) && isJSDocIndexSignature(node)) { return factory.createTypeLiteralNode([factory.createIndexSignature( @@ -51215,7 +51255,7 @@ /*initializer*/ void 0 )), - visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); } else { return factory.createFunctionTypeNode( @@ -51230,7 +51270,7 @@ /*initializer*/ void 0 )), - visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ); } } @@ -51310,13 +51350,13 @@ function symbolTableToDeclarationStatements(symbolTable, context, bundled) { const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, - 171 /* MethodDeclaration */, + 172 /* MethodDeclaration */, /*useAcessors*/ true ); const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol( (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), - 170 /* MethodSignature */, + 171 /* MethodSignature */, /*useAcessors*/ false ); @@ -51775,10 +51815,10 @@ const baseTypes = getBaseTypes(interfaceType); const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0; const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType)); - const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 176 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 177 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 177 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 178 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); - const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(94 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; + const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(95 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( /*modifiers*/ void 0, @@ -51857,7 +51897,7 @@ function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 259 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 260 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); addResult(setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags); } if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) { @@ -51997,8 +52037,8 @@ const isClass = !!((_b = staticType.symbol) == null ? void 0 : _b.valueDeclaration) && isClassLike(staticType.symbol.valueDeclaration); const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType) : anyType; const heritageClauses = [ - ...!length(baseTypes) ? [] : [factory.createHeritageClause(94 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))], - ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(117 /* ImplementsKeyword */, implementsExpressions)] + ...!length(baseTypes) ? [] : [factory.createHeritageClause(95 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))], + ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(118 /* ImplementsKeyword */, implementsExpressions)] ]; const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType)); const publicSymbolProps = filter(symbolProps, (s) => { @@ -52041,7 +52081,7 @@ [], /*body*/ void 0 - )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 173 /* Constructor */); + )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 174 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -52093,8 +52133,8 @@ const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 205 /* BindingElement */: - if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 257 /* VariableDeclaration */) { + case 206 /* BindingElement */: + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 258 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -52120,15 +52160,15 @@ } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); break; - case 300 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 223 /* BinaryExpression */) { + case 301 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 224 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -52151,7 +52191,7 @@ ), modifierFlags); break; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) { serializeMaybeAliasAssignment(symbol); break; @@ -52172,10 +52212,10 @@ ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 270 /* ImportClause */: { + case 271 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52193,7 +52233,7 @@ ), 0 /* None */); break; } - case 271 /* NamespaceImport */: { + case 272 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52211,7 +52251,7 @@ ), 0 /* None */); break; } - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: addResult(factory.createExportDeclaration( /*modifiers*/ void 0, @@ -52221,7 +52261,7 @@ factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 273 /* ImportSpecifier */: { + case 274 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52246,7 +52286,7 @@ ), 0 /* None */); break; } - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -52254,12 +52294,12 @@ specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 223 /* BinaryExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 224 /* BinaryExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -52675,7 +52715,7 @@ return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker); function typePredicateToStringWorker(writer2) { const predicate = factory.createTypePredicateNode( - typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(129 /* AssertsKeyword */) : void 0, + typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(130 /* AssertsKeyword */) : void 0, typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createIdentifier(typePredicate.parameterName) : factory.createThisTypeNode(), typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */) // TODO: GH#18217 @@ -52738,10 +52778,10 @@ return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 265 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 266 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 308 /* SourceFile */ || isAmbientModule(location); + return location.kind === 309 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -52789,17 +52829,17 @@ if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 257 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 258 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 228 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 229 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -52816,66 +52856,66 @@ return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: - case 343 /* JSDocEnumTag */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 344 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 259 /* FunctionDeclaration */: - case 263 /* EnumDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + case 264 /* EnumDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 268 /* ImportEqualsDeclaration */ && parent2.kind !== 308 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 269 /* ImportEqualsDeclaration */ && parent2.kind !== 309 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 173 /* Constructor */: - case 177 /* ConstructSignature */: - case 176 /* CallSignature */: - case 178 /* IndexSignature */: - case 166 /* Parameter */: - case 265 /* ModuleBlock */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 184 /* TypeLiteral */: - case 180 /* TypeReference */: - case 185 /* ArrayType */: - case 186 /* TupleType */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: + case 174 /* Constructor */: + case 178 /* ConstructSignature */: + case 177 /* CallSignature */: + case 179 /* IndexSignature */: + case 167 /* Parameter */: + case 266 /* ModuleBlock */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 185 /* TypeLiteral */: + case 181 /* TypeReference */: + case 186 /* ArrayType */: + case 187 /* TupleType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: return false; - case 165 /* TypeParameter */: - case 308 /* SourceFile */: - case 267 /* NamespaceExportDeclaration */: + case 166 /* TypeParameter */: + case 309 /* SourceFile */: + case 268 /* NamespaceExportDeclaration */: return true; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return false; default: return false; @@ -52884,7 +52924,7 @@ } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 274 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 275 /* ExportAssignment */) { exportSymbol = resolveName( node, node.escapedText, @@ -52895,7 +52935,7 @@ /*isUse*/ false ); - } else if (node.parent.kind === 278 /* ExportSpecifier */) { + } else if (node.parent.kind === 279 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -52997,12 +53037,12 @@ function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 257 /* VariableDeclaration */: - case 258 /* VariableDeclarationList */: - case 273 /* ImportSpecifier */: - case 272 /* NamedImports */: - case 271 /* NamespaceImport */: - case 270 /* ImportClause */: + case 258 /* VariableDeclaration */: + case 259 /* VariableDeclarationList */: + case 274 /* ImportSpecifier */: + case 273 /* NamedImports */: + case 272 /* NamespaceImport */: + case 271 /* ImportClause */: return false; default: return true; @@ -53120,23 +53160,23 @@ function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return ancestor.initializer; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent2 = node.parent; - if (node.kind === 205 /* BindingElement */ && parent2.kind === 203 /* ObjectBindingPattern */) { + if (node.kind === 206 /* BindingElement */ && parent2.kind === 204 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 299 /* PropertyAssignment */ || node.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.kind === 300 /* PropertyAssignment */ || node.kind === 301 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent2.elements.indexOf(node); @@ -53161,7 +53201,7 @@ parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 203 /* ObjectBindingPattern */) { + if (pattern.kind === 204 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { @@ -53217,7 +53257,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 104 /* NullKeyword */ || expr.kind === 79 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; + return expr.kind === 105 /* NullKeyword */ || expr.kind === 79 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; } function isEmptyArrayLiteral2(node) { const expr = skipParentheses( @@ -53225,13 +53265,13 @@ /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 206 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 207 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, isProperty = false, isOptional = true) { return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type; } function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) { - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 246 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression( declaration.parent.parent.expression, /*checkMode*/ @@ -53239,7 +53279,7 @@ ))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -53268,8 +53308,8 @@ } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 175 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 174 /* GetAccessor */); + if (func.kind === 176 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 175 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -53343,7 +53383,7 @@ const links = getSymbolLinks(symbol); if (links.isConstructorDeclaredProperty === void 0) { links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 209 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 210 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( /*declaredType*/ void 0, declaration, @@ -53371,7 +53411,7 @@ /*includeClassComputedPropertyName*/ false ); - if (container && (container.kind === 173 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 174 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -53641,7 +53681,7 @@ return type; } function containsSameNamedThisProperty(thisProperty, expression) { - return isPropertyAccessExpression(thisProperty) && thisProperty.expression.kind === 108 /* ThisKeyword */ && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); + return isPropertyAccessExpression(thisProperty) && thisProperty.expression.kind === 109 /* ThisKeyword */ && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); } function isDeclarationInConstructor(expression) { const thisContainer = getThisContainer( @@ -53651,7 +53691,7 @@ /*includeClassComputedPropertyName*/ false ); - return thisContainer.kind === 173 /* Constructor */ || thisContainer.kind === 259 /* FunctionDeclaration */ || thisContainer.kind === 215 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 174 /* Constructor */ || thisContainer.kind === 260 /* FunctionDeclaration */ || thisContainer.kind === 216 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -53718,7 +53758,7 @@ function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 205 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 206 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -53734,7 +53774,7 @@ return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 203 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 204 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration( @@ -53775,7 +53815,7 @@ } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 166 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 167 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -53849,7 +53889,7 @@ return reportCircularityError(symbol); } let type; - if (declaration.kind === 274 /* ExportAssignment */) { + if (declaration.kind === 275 /* ExportAssignment */) { type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) { type = getWidenedTypeForAssignmentDeclaration(symbol); @@ -53890,13 +53930,13 @@ function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -53921,9 +53961,9 @@ if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 174 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 175 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 169 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 175 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 176 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration( accessor, /*includeOptionality*/ @@ -53962,7 +54002,7 @@ if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = (_a2 = getDeclarationOfKind(symbol, 175 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 169 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = (_a2 = getDeclarationOfKind(symbol, 176 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { @@ -54002,7 +54042,7 @@ const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 223 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 223 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 224 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 224 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -54066,7 +54106,7 @@ ); return errorType; } - if (noImplicitAny && (declaration.kind !== 166 /* Parameter */ || declaration.initializer)) { + if (noImplicitAny && (declaration.kind !== 167 /* Parameter */ || declaration.initializer)) { error( symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, @@ -54180,43 +54220,43 @@ return void 0; } switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 320 /* JSDocFunctionType */: - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 262 /* TypeAliasDeclaration */: - case 348 /* JSDocTemplateTag */: - case 349 /* JSDocTypedefTag */: - case 343 /* JSDocEnumTag */: - case 341 /* JSDocCallbackTag */: - case 197 /* MappedType */: - case 191 /* ConditionalType */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 321 /* JSDocFunctionType */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 263 /* TypeAliasDeclaration */: + case 349 /* JSDocTemplateTag */: + case 350 /* JSDocTypedefTag */: + case 344 /* JSDocEnumTag */: + case 342 /* JSDocCallbackTag */: + case 198 /* MappedType */: + case 192 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 197 /* MappedType */) { + if (node.kind === 198 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))); - } else if (node.kind === 191 /* ConditionalType */) { + } else if (node.kind === 192 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */ || node.kind === 261 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; + const thisType = includeThisTypes && (node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */ || node.kind === 262 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 323 /* JSDoc */: { + case 324 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -54226,14 +54266,14 @@ function getOuterTypeParametersOfClassOrInterface(symbol) { var _a2; const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a2 = symbol.declarations) == null ? void 0 : _a2.find((decl) => { - if (decl.kind === 261 /* InterfaceDeclaration */) { + if (decl.kind === 262 /* InterfaceDeclaration */) { return true; } - if (decl.kind !== 257 /* VariableDeclaration */) { + if (decl.kind !== 258 /* VariableDeclaration */) { return false; } const initializer = decl.initializer; - return !!initializer && (initializer.kind === 215 /* FunctionExpression */ || initializer.kind === 216 /* ArrowFunction */); + return !!initializer && (initializer.kind === 216 /* FunctionExpression */ || initializer.kind === 217 /* ArrowFunction */); }); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); @@ -54244,7 +54284,7 @@ } let result; for (const node of symbol.declarations) { - if (node.kind === 261 /* InterfaceDeclaration */ || node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 262 /* InterfaceDeclaration */ || node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -54382,7 +54422,7 @@ } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 260 /* ClassDeclaration */ || declaration.kind === 261 /* InterfaceDeclaration */) { + if (declaration.kind === 261 /* ClassDeclaration */ || declaration.kind === 262 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -54471,7 +54511,7 @@ type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 261 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 262 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -54499,7 +54539,7 @@ return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 261 /* InterfaceDeclaration */) { + if (declaration.kind === 262 /* InterfaceDeclaration */) { if (declaration.flags & 128 /* ContainsThis */) { return false; } @@ -54571,7 +54611,7 @@ } } else { type = errorType; - if (declaration.kind === 343 /* JSDocEnumTag */) { + if (declaration.kind === 344 /* JSDocEnumTag */) { error(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } else { error(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); @@ -54590,7 +54630,7 @@ const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 263 /* EnumDeclaration */) { + if (declaration.kind === 264 /* EnumDeclaration */) { for (const member of declaration.members) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); @@ -54671,22 +54711,22 @@ } function isThislessType(node) { switch (node.kind) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 149 /* ObjectKeyword */: - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: - case 198 /* LiteralType */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 150 /* ObjectKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: + case 199 /* LiteralType */: return true; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return isThislessType(node.elementType); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -54702,21 +54742,21 @@ function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 173 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 174 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); } function isThisless(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { const declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -54731,10 +54771,15 @@ return result; } function addInheritedMembers(symbols, baseSymbols) { - for (const s of baseSymbols) { - if (!symbols.has(s.escapedName) && !isStaticPrivateIdentifierProperty(s)) { - symbols.set(s.escapedName, s); + for (const base of baseSymbols) { + if (isStaticPrivateIdentifierProperty(base)) { + continue; } + const derived = symbols.get(base.escapedName); + if (!derived || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration) && !isConstructorDeclaredProperty(derived) && !getContainingClassStaticBlock(derived.valueDeclaration)) { + symbols.set(base.escapedName, base); + symbols.set(base.escapedName, base); + } } } function isStaticPrivateIdentifierProperty(s) { @@ -55675,7 +55720,7 @@ } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 195 /* TypeOperator */ && constraintDeclaration.operator === 141 /* KeyOfKeyword */; + return constraintDeclaration.kind === 196 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -56542,7 +56587,7 @@ } else { parameters.push(paramSymbol); } - if (type && type.kind === 198 /* LiteralType */) { + if (type && type.kind === 199 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -56550,8 +56595,8 @@ minArgumentCount = parameters.length; } } - if ((declaration.kind === 174 /* GetAccessor */ || declaration.kind === 175 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 174 /* GetAccessor */ ? 175 /* SetAccessor */ : 174 /* GetAccessor */; + if ((declaration.kind === 175 /* GetAccessor */ || declaration.kind === 176 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { + const otherKind = declaration.kind === 175 /* GetAccessor */ ? 176 /* SetAccessor */ : 175 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); @@ -56563,7 +56608,7 @@ thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, "this" /* This */), getTypeFromTypeNode(thisTag.typeExpression)); } } - const classType = declaration.kind === 173 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; + const classType = declaration.kind === 174 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { flags |= 1 /* HasRestParameter */; @@ -56641,15 +56686,15 @@ switch (node.kind) { case 79 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - return node.name.kind === 164 /* ComputedPropertyName */ && traverse(node.name); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + return node.name.kind === 165 /* ComputedPropertyName */ && traverse(node.name); + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return traverse(node.expression); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -56736,7 +56781,7 @@ function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 194 /* ThisType */ ? createTypePredicate( + return parameterName.kind === 195 /* ThisType */ ? createTypePredicate( node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, /*parameterName*/ void 0, @@ -56786,7 +56831,7 @@ return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 173 /* Constructor */) { + if (declaration.kind === 174 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } if (isJSDocSignature(declaration)) { @@ -56802,12 +56847,12 @@ if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 174 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 175 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 175 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 176 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -56910,7 +56955,7 @@ var _a2; if (!signature.isolatedSignatureType) { const kind = (_a2 = signature.declaration) == null ? void 0 : _a2.kind; - const isConstructor = kind === void 0 || kind === 173 /* Constructor */ || kind === 177 /* ConstructSignature */ || kind === 182 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 174 /* Constructor */ || kind === 178 /* ConstructSignature */ || kind === 183 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -56969,9 +57014,9 @@ let inferences; if ((_a2 = typeParameter.symbol) == null ? void 0 : _a2.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 192 /* InferType */) { + if (declaration.parent.kind === 193 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 180 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 181 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference); if (typeParameters) { @@ -56989,13 +57034,13 @@ } } } - } else if (grandParent.kind === 166 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 188 /* RestType */ || grandParent.kind === 199 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 167 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 189 /* RestType */ || grandParent.kind === 200 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 201 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 202 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 165 /* TypeParameter */ && grandParent.parent.kind === 197 /* MappedType */) { + } else if (grandParent.kind === 166 /* TypeParameter */ && grandParent.parent.kind === 198 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 197 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 191 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 197 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 198 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 192 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 198 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -57020,7 +57065,7 @@ } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 197 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 198 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -57029,7 +57074,7 @@ return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 165 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 166 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -57114,7 +57159,7 @@ return ((_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 180 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 185 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 181 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 186 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { @@ -57153,7 +57198,7 @@ return errorType; } } - if (node.kind === 180 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 181 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference( type, node, @@ -57244,9 +57289,9 @@ } function getTypeReferenceName(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -57258,10 +57303,10 @@ return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 163 /* QualifiedName */ ? name.right : name.kind === 208 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 164 /* QualifiedName */ ? name.right : name.kind === 209 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 163 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 208 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 164 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 209 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -57313,7 +57358,7 @@ const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 202 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 203 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -57341,7 +57386,7 @@ return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 186 /* TupleType */ && node.elements.length === 1; + return node.kind === 187 /* TupleType */ && node.elements.length === 1; } function getImpliedConstraint(type, checkNode, extendsNode) { return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0; @@ -57349,17 +57394,17 @@ function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 323 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 324 /* JSDoc */) { const parent2 = node.parent; - if (parent2.kind === 166 /* Parameter */) { + if (parent2.kind === 167 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 191 /* ConditionalType */ && node === parent2.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 192 /* ConditionalType */ && node === parent2.trueType) { const constraint = getImpliedConstraint(type, parent2.checkType, parent2.extendsType); if (constraint) { constraints = append(constraints, constraint); } - } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 197 /* MappedType */ && node === parent2.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 198 /* MappedType */ && node === parent2.type) { const mappedType = getTypeFromTypeNode(parent2); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -57376,7 +57421,7 @@ return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 180 /* TypeReference */ || node.kind === 202 /* ImportType */); + return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 181 /* TypeReference */ || node.kind === 203 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { @@ -57492,9 +57537,9 @@ if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: return declaration; } } @@ -57874,11 +57919,11 @@ } function getTupleElementFlags(node) { switch (node.kind) { - case 187 /* OptionalType */: + case 188 /* OptionalType */: return 2 /* Optional */; - case 188 /* RestType */: + case 189 /* RestType */: return getRestTypeElementFlags(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -57894,7 +57939,7 @@ return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 199 /* NamedTupleMember */); + const missingName = some(node.elements, (e) => e.kind !== 200 /* NamedTupleMember */); return getTupleTargetType( elementFlags, readonly, @@ -57903,51 +57948,51 @@ ); } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 185 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 186 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 186 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 187 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent2 = node.parent; switch (parent2.kind) { - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: - case 180 /* TypeReference */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 196 /* IndexedAccessType */: - case 191 /* ConditionalType */: - case 195 /* TypeOperator */: - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: + case 181 /* TypeReference */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 197 /* IndexedAccessType */: + case 192 /* ConditionalType */: + case 196 /* TypeOperator */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return isResolvedByTypeAlias(parent2); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return true; - case 195 /* TypeOperator */: - return node.operator !== 156 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 193 /* ParenthesizedType */: - case 187 /* OptionalType */: - case 199 /* NamedTupleMember */: - case 319 /* JSDocOptionalType */: - case 317 /* JSDocNullableType */: - case 318 /* JSDocNonNullableType */: - case 312 /* JSDocTypeExpression */: + case 196 /* TypeOperator */: + return node.operator !== 157 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); + case 194 /* ParenthesizedType */: + case 188 /* OptionalType */: + case 200 /* NamedTupleMember */: + case 320 /* JSDocOptionalType */: + case 318 /* JSDocNullableType */: + case 319 /* JSDocNonNullableType */: + case 313 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 188 /* RestType */: - return node.type.kind !== 185 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 189 /* RestType */: + return node.type.kind !== 186 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 190 /* UnionType */: + case 191 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -57958,22 +58003,22 @@ const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 186 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 186 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( + } else if (!(node.kind === 187 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 187 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( target, node, /*mapper*/ void 0 ); } else { - const elementTypes = node.kind === 185 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 186 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } return links.resolvedType; } function isReadonlyTypeOperator(node) { - return isTypeOperatorNode(node) && node.operator === 146 /* ReadonlyKeyword */; + return isTypeOperatorNode(node) && node.operator === 147 /* ReadonlyKeyword */; } function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations) { const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, (_) => 1 /* Required */), readonly, namedMemberDeclarations); @@ -58181,7 +58226,7 @@ return addTypesToUnion(typeSet, includes | (isNamedUnionType(type) ? 1048576 /* Union */ : 0), type.types); } if (!(flags & 131072 /* Never */)) { - includes |= flags & 205258751 /* IncludesMask */; + includes |= flags & 473694207 /* IncludesMask */; if (flags & 465829888 /* Instantiable */) includes |= 33554432 /* IncludesInstantiable */; if (type === wildcardType) @@ -58453,7 +58498,7 @@ typeSet.set(type.id.toString(), type); } } - includes |= flags & 205258751 /* IncludesMask */; + includes |= flags & 473694207 /* IncludesMask */; } return includes; } @@ -58656,12 +58701,15 @@ function getConstituentCountOfTypes(types) { return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0); } + function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) { + return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType; + } function getTypeFromIntersectionTypeNode(node) { const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); const types = map(node.types, getTypeFromTypeNode); - const noSupertypeReduction = types.length === 2 && !!(types[0].flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && types[1] === emptyTypeLiteralType; + const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0])); links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction); } return links.resolvedType; @@ -58723,7 +58771,7 @@ const typeVariable = getTypeParameterFromMappedType(mappedType); return isDistributive(getNameTypeFromMappedType(mappedType) || typeVariable); function isDistributive(type) { - return type.flags & (3 /* AnyOrUnknown */ | 134348796 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false; + return type.flags & (3 /* AnyOrUnknown */ | 402784252 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false; } } function getLiteralTypeFromPropertyName(name) { @@ -58792,13 +58840,13 @@ const links = getNodeLinks(node); if (!links.resolvedType) { switch (node.operator) { - case 141 /* KeyOfKeyword */: + case 142 /* KeyOfKeyword */: links.resolvedType = getIndexType(getTypeFromTypeNode(node.type)); break; - case 156 /* UniqueKeyword */: - links.resolvedType = node.type.kind === 153 /* SymbolKeyword */ ? getESSymbolLikeTypeForNode(walkUpParenthesizedTypes(node.parent)) : errorType; + case 157 /* UniqueKeyword */: + links.resolvedType = node.type.kind === 154 /* SymbolKeyword */ ? getESSymbolLikeTypeForNode(walkUpParenthesizedTypes(node.parent)) : errorType; break; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: links.resolvedType = getTypeFromTypeNode(node.type); break; default: @@ -58984,7 +59032,7 @@ } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { var _a2; - const accessExpression = accessNode && accessNode.kind === 209 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 210 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -59182,7 +59230,7 @@ } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 209 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 196 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 164 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 210 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 197 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 165 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); @@ -59319,7 +59367,7 @@ } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 196 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 197 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -59659,7 +59707,7 @@ } function getAliasSymbolForTypeNode(node) { let host2 = node.parent; - while (isParenthesizedTypeNode(host2) || isJSDocTypeExpression(host2) || isTypeOperatorNode(host2) && host2.operator === 146 /* ReadonlyKeyword */) { + while (isParenthesizedTypeNode(host2) || isJSDocTypeExpression(host2) || isTypeOperatorNode(host2) && host2.operator === 147 /* ReadonlyKeyword */) { host2 = host2.parent; } return isTypeAlias(host2) ? getSymbolOfDeclaration(host2) : void 0; @@ -59849,7 +59897,7 @@ return enumLiteralTypes.get(key) || (enumLiteralTypes.set(key, type = createLiteralType(flags, value, symbol)), type); } function getTypeFromLiteralTypeNode(node) { - if (node.literal.kind === 104 /* NullKeyword */) { + if (node.literal.kind === 105 /* NullKeyword */) { return nullType; } const links = getNodeLinks(node); @@ -59882,7 +59930,7 @@ false ); const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 261 /* InterfaceDeclaration */)) { + if (parent2 && (isClassLike(parent2) || parent2.kind === 262 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent2)).thisType; } @@ -59912,17 +59960,17 @@ } function getArrayElementTypeNode(node) { switch (node.kind) { - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 186 /* TupleType */: + case 187 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 188 /* RestType */ || node.kind === 199 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 189 /* RestType */ || node.kind === 200 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return node.elementType; } return void 0; @@ -59941,94 +59989,94 @@ } function getTypeFromTypeNodeWorker(node) { switch (node.kind) { - case 131 /* AnyKeyword */: - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: + case 132 /* AnyKeyword */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: return anyType; - case 157 /* UnknownKeyword */: + case 158 /* UnknownKeyword */: return unknownType; - case 152 /* StringKeyword */: + case 153 /* StringKeyword */: return stringType; - case 148 /* NumberKeyword */: + case 149 /* NumberKeyword */: return numberType; - case 160 /* BigIntKeyword */: + case 161 /* BigIntKeyword */: return bigintType; - case 134 /* BooleanKeyword */: + case 135 /* BooleanKeyword */: return booleanType; - case 153 /* SymbolKeyword */: + case 154 /* SymbolKeyword */: return esSymbolType; - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return voidType; - case 155 /* UndefinedKeyword */: + case 156 /* UndefinedKeyword */: return undefinedType; - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return nullType; - case 144 /* NeverKeyword */: + case 145 /* NeverKeyword */: return neverType; - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; - case 139 /* IntrinsicKeyword */: + case 140 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 194 /* ThisType */: - case 108 /* ThisKeyword */: + case 195 /* ThisType */: + case 109 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return getTypeFromTypeReference(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 187 /* OptionalType */: + case 188 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 189 /* UnionType */: + case 190 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 193 /* ParenthesizedType */: - case 318 /* JSDocNonNullableType */: - case 312 /* JSDocTypeExpression */: + case 194 /* ParenthesizedType */: + case 319 /* JSDocNonNullableType */: + case 313 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 188 /* RestType */: + case 189 /* RestType */: return getTypeFromRestTypeNode(node); - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 184 /* TypeLiteral */: - case 325 /* JSDocTypeLiteral */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 185 /* TypeLiteral */: + case 326 /* JSDocTypeLiteral */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 192 /* InferType */: + case 193 /* InferType */: return getTypeFromInferTypeNode(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return getTypeFromImportTypeNode(node); case 79 /* Identifier */: - case 163 /* QualifiedName */: - case 208 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -60233,13 +60281,13 @@ return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 180 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 202 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 181 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 203 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); } function isTypeParameterPossiblyReferenced(tp, node) { if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { const container = tp.symbol.declarations[0].parent; for (let n = node; n !== container; n = n.parent) { - if (!n || n.kind === 238 /* Block */ || n.kind === 191 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 239 /* Block */ || n.kind === 192 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -60248,17 +60296,17 @@ return true; function containsReference(node2) { switch (node2.kind) { - case 194 /* ThisType */: + case 195 /* ThisType */: return !!tp.isThisType; case 79 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; let tpScope; - if (tpDeclaration.kind === 165 /* TypeParameter */) { + if (tpDeclaration.kind === 166 /* TypeParameter */) { tpScope = tpDeclaration.parent; } else if (tp.isThisType) { tpScope = tpDeclaration; @@ -60269,8 +60317,8 @@ return some(firstIdentifierSymbol.declarations, (idDecl) => isNodeDescendantOf(idDecl, tpScope)) || some(node2.typeArguments, containsReference); } return true; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -60506,13 +60554,13 @@ return type; } function getUniqueLiteralFilledInstantiation(type) { - return type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper)); + return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper)); } function getPermissiveInstantiation(type) { - return type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper)); + return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper)); } function getRestrictiveInstantiation(type) { - if (type.flags & (134348796 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */)) { + if (type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */)) { return type; } if (type.restrictiveInstantiation) { @@ -60526,32 +60574,32 @@ return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return (node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 288 /* JsxAttribute */: { + case 289 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 291 /* JsxExpression */: { + case 292 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -60562,7 +60610,7 @@ return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node); } function hasContextSensitiveReturnExpression(node) { - return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 238 /* Block */ && isContextSensitive(node.body); + return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 239 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func); @@ -60654,23 +60702,23 @@ return true; } switch (node.kind) { - case 291 /* JsxExpression */: - case 214 /* ParenthesizedExpression */: + case 292 /* JsxExpression */: + case 215 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 27 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -60970,16 +61018,16 @@ } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return { errorNode: child, innerExpression: child.expression, nameType }; case 11 /* JsxText */: if (child.containsOnlyTriviaWhiteSpaces) { break; } return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() }; - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -61095,7 +61143,7 @@ } } function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (target.flags & (134348796 /* Primitive */ | 131072 /* Never */)) + if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) return false; if (isTupleLikeType(source)) { return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); @@ -61129,13 +61177,13 @@ continue; } switch (prop.kind) { - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: - case 171 /* MethodDeclaration */: - case 300 /* ShorthandPropertyAssignment */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: + case 172 /* MethodDeclaration */: + case 301 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; break; default: @@ -61144,7 +61192,7 @@ } } function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (target.flags & (134348796 /* Primitive */ | 131072 /* Never */)) + if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) return false; return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer); } @@ -61207,7 +61255,7 @@ void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 171 /* MethodDeclaration */ && kind !== 170 /* MethodSignature */ && kind !== 173 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 172 /* MethodDeclaration */ && kind !== 171 /* MethodSignature */ && kind !== 174 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -61801,7 +61849,7 @@ return isRelatedTo(source2, target2, 3 /* Both */, reportErrors2); } function isRelatedTo(originalSource, originalTarget, recursionFlags = 3 /* Both */, reportErrors2 = false, headMessage2, intersectionState = 0 /* None */) { - if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 134348796 /* Primitive */) { + if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 402784252 /* Primitive */) { if (relation === comparableRelation && !(originalTarget.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(originalTarget, originalSource, relation) || isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors2 ? reportError : void 0)) { return -1 /* True */; } @@ -61865,7 +61913,7 @@ return 0 /* False */; } } - const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (134348796 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2)); + const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (402784252 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2)); const isComparingJsxAttributes = !!(getObjectFlags(source2) & 2048 /* JsxAttributes */); if (isPerformingCommonPropertyChecks && !hasCommonProperties(source2, target2, isComparingJsxAttributes)) { if (reportErrors2) { @@ -61927,7 +61975,7 @@ maybeSuppress = !!errorInfo; } } - if (source2.flags & 524288 /* Object */ && target2.flags & 134348796 /* Primitive */) { + if (source2.flags & 524288 /* Object */ && target2.flags & 402784252 /* Primitive */) { tryElaborateErrorsForPrimitivesAndObjects(source2, target2); } else if (source2.symbol && source2.flags & 524288 /* Object */ && globalObjectType === source2) { reportError(Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead); @@ -62034,8 +62082,8 @@ if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, (d) => d === objectLiteralDeclaration) && getSourceFileOfNode(objectLiteralDeclaration) === getSourceFileOfNode(errorNode)) { const propDeclaration = prop.valueDeclaration; Debug.assertNode(propDeclaration, isObjectLiteralElementLike); - errorNode = propDeclaration; const name = propDeclaration.name; + errorNode = name; if (isIdentifier(name)) { suggestion = getSuggestionForNonexistentProperty(name, errorTarget); } @@ -62073,15 +62121,15 @@ } function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) { if (source2.flags & 1048576 /* Union */) { - return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */), intersectionState); + return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState); } if (target2.flags & 1048576 /* Union */) { - return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source2), target2, reportErrors2 && !(source2.flags & 134348796 /* Primitive */) && !(target2.flags & 134348796 /* Primitive */)); + return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source2), target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */) && !(target2.flags & 402784252 /* Primitive */)); } if (target2.flags & 2097152 /* Intersection */) { return typeRelatedToEachType(source2, target2, reportErrors2, 2 /* Target */); } - if (relation === comparableRelation && target2.flags & 134348796 /* Primitive */) { + if (relation === comparableRelation && target2.flags & 402784252 /* Primitive */) { const constraints = sameMap(source2.types, (t) => t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(t) || unknownType : t); if (constraints !== source2.types) { source2 = getIntersectionType(constraints); @@ -62975,7 +63023,7 @@ } return 0 /* False */; } - const sourceIsPrimitive = !!(sourceFlags & 134348796 /* Primitive */); + const sourceIsPrimitive = !!(sourceFlags & 402784252 /* Primitive */); if (relation !== identityRelation) { source2 = getApparentType(source2); sourceFlags = source2.flags; @@ -63567,7 +63615,7 @@ const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 173 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 173 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 174 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 174 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString( signature, /*enclosingDeclaration*/ @@ -64267,7 +64315,7 @@ const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 208 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 209 /* PropertyAccessExpression */) { return void 0; } } @@ -64667,12 +64715,12 @@ } let diagnostic; switch (declaration.kind) { - case 223 /* BinaryExpression */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 224 /* BinaryExpression */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 166 /* Parameter */: + case 167 /* Parameter */: const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); @@ -64693,27 +64741,27 @@ } diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 326 /* JSDocSignature */: + case 327 /* JSDocSignature */: if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) { error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); } return; - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: if (noImplicitAny && !declaration.name) { if (wideningKind === 3 /* GeneratorYield */) { error(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); @@ -64724,7 +64772,7 @@ } diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; - case 197 /* MappedType */: + case 198 /* MappedType */: if (noImplicitAny) { error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } @@ -64822,7 +64870,7 @@ function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 171 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); + const contextualType = node.kind === 172 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -64874,8 +64922,8 @@ } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 262 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 308 /* SourceFile */ ? true : n.kind === 264 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 263 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 309 /* SourceFile */ ? true : n.kind === 265 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -65690,7 +65738,7 @@ function inferFromSignature(source, target) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 173 /* Constructor */; + bivariant = bivariant || kind === 172 /* MethodDeclaration */ || kind === 171 /* MethodSignature */ || kind === 174 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; applyToReturnTypes(source, target, inferFromTypes); @@ -65733,7 +65781,7 @@ } function hasPrimitiveConstraint(type) { const constraint = getConstraintOfTypeParameter(type); - return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 134348796 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); + return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); } function isObjectLiteralType2(type) { return !!(getObjectFlags(type) & 128 /* ObjectLiteral */); @@ -65847,7 +65895,7 @@ return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 301 /* ShorthandPropertyAssignment */) { return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer; } else { return Diagnostics.Cannot_find_name_0; @@ -65873,7 +65921,7 @@ function isInTypeQuery(node) { return !!findAncestor( node, - (n) => n.kind === 183 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 163 /* QualifiedName */ ? false : "quit" + (n) => n.kind === 184 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 164 /* QualifiedName */ ? false : "quit" ); } function isInAmbientOrTypeNode(node) { @@ -65886,61 +65934,61 @@ const symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? `${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}|${getSymbolId(symbol)}` : void 0; } - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 233 /* MetaProperty */: - return target.kind === 233 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 234 /* MetaProperty */: + return target.kind === 234 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - return isThisInTypeQuery(source) ? target.kind === 108 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); - case 108 /* ThisKeyword */: - return target.kind === 108 /* ThisKeyword */; - case 106 /* SuperKeyword */: - return target.kind === 106 /* SuperKeyword */; - case 232 /* NonNullExpression */: - case 214 /* ParenthesizedExpression */: + return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); + case 109 /* ThisKeyword */: + return target.kind === 109 /* ThisKeyword */; + case 107 /* SuperKeyword */: + return target.kind === 107 /* SuperKeyword */; + case 233 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const sourcePropertyName = getAccessedPropertyName(source); const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0; return sourcePropertyName !== void 0 && targetPropertyName !== void 0 && targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -66095,7 +66143,7 @@ } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 299 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 300 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -66110,7 +66158,7 @@ } } } - if (expression.expression.kind === 208 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 209 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -66215,7 +66263,7 @@ return 83886079 /* UnknownFacts */; } function getIntersectionTypeFacts(type) { - const ignoreObjects = maybeTypeOfKind(type, 134348796 /* Primitive */); + const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */); let oredFacts = 0 /* None */; let andedFacts = 134217727 /* All */; for (const t of type.types) { @@ -66283,11 +66331,11 @@ ) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 206 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 299 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 207 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 300 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 223 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 247 /* ForOfStatement */ && parent2.parent.initializer === parent2; + return parent2.parent.kind === 224 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 248 /* ForOfStatement */ && parent2.parent.initializer === parent2; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -66304,21 +66352,21 @@ function getAssignedType(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return stringType; - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return checkRightHandSideOfForOf(parent2) || errorType; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent2); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return undefinedType; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent2); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent2); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent2); } return errorType; @@ -66326,7 +66374,7 @@ function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 203 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 204 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); return getTypeWithDefault(type, node.initializer); } function getTypeOfInitializer(node) { @@ -66337,25 +66385,25 @@ if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 246 /* ForInStatement */) { + if (node.parent.parent.kind === 247 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 247 /* ForOfStatement */) { + if (node.parent.parent.kind === 248 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 257 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 258 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 257 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 205 /* BindingElement */ && node.parent.kind === 223 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 258 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 206 /* BindingElement */ && node.parent.kind === 224 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 75 /* BarBarEqualsToken */: @@ -66370,10 +66418,10 @@ } function getReferenceRoot(node) { const { parent: parent2 } = node; - return parent2.kind === 214 /* ParenthesizedExpression */ || parent2.kind === 223 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 223 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; + return parent2.kind === 215 /* ParenthesizedExpression */ || parent2.kind === 224 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 224 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -66389,12 +66437,12 @@ return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 292 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 293 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 292 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 293 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -66552,8 +66600,8 @@ function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 210 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 209 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 223 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 63 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); + const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 211 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isElementAssignment = parent2.kind === 210 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 224 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 63 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); return isLengthPushOrUnshift || isElementAssignment; } function isDeclarationWithExplicitTypeAnnotation(node) { @@ -66576,7 +66624,7 @@ if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 247 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName( statement.expression, @@ -66606,11 +66654,11 @@ case 79 /* Identifier */: const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node)); return getExplicitTypeOfSymbol(symbol, diagnostic); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return getExplicitThisType(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 208 /* PropertyAccessExpression */: { + case 209 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -66627,7 +66675,7 @@ } return void 0; } - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -66637,13 +66685,13 @@ let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 241 /* ExpressionStatement */) { + if (node.parent.kind === 242 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ void 0 ); - } else if (node.expression.kind !== 106 /* SuperKeyword */) { + } else if (node.expression.kind !== 107 /* SuperKeyword */) { if (isOptionalChain(node)) { funcType = checkNonNullType( getOptionalExpressionType(checkExpression(node.expression), node.expression), @@ -66691,7 +66739,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 95 /* FalseKeyword */ || node.kind === 223 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + return node.kind === 96 /* FalseKeyword */ || node.kind === 224 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 56 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { @@ -66780,7 +66828,7 @@ if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 128 /* SwitchClause */)) { flow = flow.antecedent; } else if (flags & 512 /* Call */) { - if (flow.node.expression.kind === 106 /* SuperKeyword */) { + if (flow.node.expression.kind === 107 /* SuperKeyword */) { return true; } flow = flow.antecedent; @@ -66816,8 +66864,8 @@ return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } break; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -66837,7 +66885,7 @@ const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode)); sharedFlowCount = sharedFlowStart; const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType); - if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 232 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 233 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -66906,7 +66954,7 @@ target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 208 /* PropertyAccessExpression */ && reference.kind !== 209 /* ElementAccessExpression */ && reference.kind !== 108 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 209 /* PropertyAccessExpression */ && reference.kind !== 210 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { flow = container.flowNode; continue; } @@ -66925,7 +66973,7 @@ } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -66955,13 +67003,13 @@ } if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 215 /* FunctionExpression */ || init.kind === 216 /* ArrowFunction */)) { + if (init && (init.kind === 216 /* FunctionExpression */ || init.kind === 217 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 246 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 247 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -66972,10 +67020,10 @@ /*excludeJSDocTypeAssertions*/ true ); - if (node.kind === 95 /* FalseKeyword */) { + if (node.kind === 96 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 223 /* BinaryExpression */) { + if (node.kind === 224 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -67015,13 +67063,13 @@ function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 210 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 211 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { const flowType = getTypeAtFlowNode(flow.antecedent); const type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { let evolvedType2 = type; - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -67058,7 +67106,7 @@ let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 218 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 219 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -67070,7 +67118,7 @@ flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 218 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 219 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -67333,10 +67381,10 @@ const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 218 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 219 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 218 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 219 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -67367,9 +67415,9 @@ return narrowTypeByConstructor(type, operator, left, assumeTrue); } break; - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return narrowTypeByInstanceof(type, expr, assumeTrue); - case 101 /* InKeyword */: + case 102 /* InKeyword */: if (isPrivateIdentifier(expr.left)) { return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue); } @@ -67478,7 +67526,7 @@ } if (assumeTrue) { if (!doubleEquals && (type.flags & 2 /* Unknown */ || someType(type, isEmptyAnonymousObjectType))) { - if (valueType.flags & (134348796 /* Primitive */ | 67108864 /* NonPrimitive */) || isEmptyAnonymousObjectType(valueType)) { + if (valueType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) || isEmptyAnonymousObjectType(valueType)) { return valueType; } if (valueType.flags & 524288 /* Object */) { @@ -67528,7 +67576,7 @@ let groundClauseTypes; for (let i = 0; i < clauseTypes.length; i += 1) { const t = clauseTypes[i]; - if (t.flags & (134348796 /* Primitive */ | 67108864 /* NonPrimitive */)) { + if (t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) { if (groundClauseTypes !== void 0) { groundClauseTypes.push(t); } @@ -67595,7 +67643,7 @@ if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 293 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 294 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -67770,19 +67818,19 @@ } } } - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 214 /* ParenthesizedExpression */: - case 232 /* NonNullExpression */: + case 215 /* ParenthesizedExpression */: + case 233 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: if (expr.operator === 53 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -67820,7 +67868,7 @@ return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 266 /* ModuleBlock */ || node2.kind === 309 /* SourceFile */ || node2.kind === 170 /* PropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -67871,12 +67919,12 @@ return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 166 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 167 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { const parent2 = node.parent; - return parent2.kind === 208 /* PropertyAccessExpression */ || parent2.kind === 163 /* QualifiedName */ || parent2.kind === 210 /* CallExpression */ && parent2.expression === node || parent2.kind === 209 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); + return parent2.kind === 209 /* PropertyAccessExpression */ || parent2.kind === 164 /* QualifiedName */ || parent2.kind === 211 /* CallExpression */ && parent2.expression === node || parent2.kind === 210 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); } function isGenericTypeWithUnionConstraint(type) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */)); @@ -67937,14 +67985,14 @@ if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent2 = declaration.parent.parent; - if (parent2.kind === 257 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 166 /* Parameter */) { + if (parent2.kind === 258 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 167 /* Parameter */) { const links = getNodeLinks(parent2); if (!(links.flags & 16777216 /* InCheckIdentifier */)) { links.flags |= 16777216 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); links.flags &= ~16777216 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 166 /* Parameter */ && isSymbolAssigned(symbol))) { + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 167 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference( pattern, @@ -68001,7 +68049,7 @@ } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 216 /* ArrowFunction */) { + if (container.kind === 217 /* ArrowFunction */) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (hasSyntacticModifier(container, 512 /* Async */)) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); @@ -68020,7 +68068,7 @@ } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 260 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { + if (declaration.kind === 261 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { let container = getContainingClass(node); while (container !== void 0) { if (container === declaration && container.name !== node) { @@ -68030,7 +68078,7 @@ } container = getContainingClass(container); } - } else if (declaration.kind === 228 /* ClassExpression */) { + } else if (declaration.kind === 229 /* ClassExpression */) { let container = getThisContainer( node, /*includeArrowFunctions*/ @@ -68038,7 +68086,7 @@ /*includeClassComputedPropertyName*/ false ); - while (container.kind !== 308 /* SourceFile */) { + while (container.kind !== 309 /* SourceFile */) { if (container.parent === declaration) { if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; @@ -68088,16 +68136,16 @@ return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 167 /* Parameter */; const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); const isModuleExports = symbol.flags & 134217728 /* ModuleExports */; - while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + while (flowContainer !== declarationContainer && (flowContainer.kind === 216 /* FunctionExpression */ || flowContainer.kind === 217 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } - const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; + const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 279 /* ExportSpecifier */) || node.parent.kind === 233 /* NonNullExpression */ || declaration.kind === 258 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type); const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer); if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) { @@ -68151,7 +68199,7 @@ )); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 295 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 296 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -68161,7 +68209,7 @@ if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 259 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -68180,7 +68228,7 @@ } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 259 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */; } @@ -68197,13 +68245,13 @@ } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 214 /* ParenthesizedExpression */) { + while (current.parent.kind === 215 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 221 /* PrefixUnaryExpression */ || current.parent.kind === 222 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 222 /* PrefixUnaryExpression */ || current.parent.kind === 223 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; } @@ -68214,7 +68262,7 @@ } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 169 /* PropertyDeclaration */ || container.kind === 173 /* Constructor */) { + if (container.kind === 170 /* PropertyDeclaration */ || container.kind === 174 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -68259,11 +68307,11 @@ ); let capturedByArrowFunction = false; let thisInComputedPropertyName = false; - if (container.kind === 173 /* Constructor */) { + if (container.kind === 174 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } while (true) { - if (container.kind === 216 /* ArrowFunction */) { + if (container.kind === 217 /* ArrowFunction */) { container = getThisContainer( container, /* includeArrowFunctions */ @@ -68272,7 +68320,7 @@ ); capturedByArrowFunction = true; } - if (container.kind === 164 /* ComputedPropertyName */) { + if (container.kind === 165 /* ComputedPropertyName */) { container = getThisContainer( container, !capturedByArrowFunction, @@ -68289,13 +68337,13 @@ error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); } else { switch (container.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 173 /* Constructor */: + case 174 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } @@ -68389,13 +68437,13 @@ } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 215 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 216 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 171 /* MethodDeclaration */ && container.parent.kind === 207 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 172 /* MethodDeclaration */ && container.parent.kind === 208 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 215 /* FunctionExpression */ && container.parent.kind === 299 /* PropertyAssignment */ && container.parent.parent.kind === 207 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 216 /* FunctionExpression */ && container.parent.kind === 300 /* PropertyAssignment */ && container.parent.parent.kind === 208 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 215 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { + } else if (container.kind === 216 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.parent.arguments[0].expression; } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.arguments[0].expression; @@ -68403,7 +68451,7 @@ } function getTypeForThisExpressionFromJSDoc(node) { const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 320 /* JSDocFunctionType */) { + if (jsdocType && jsdocType.kind === 321 /* JSDocFunctionType */) { const jsDocFunctionType = jsdocType; if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].name && jsDocFunctionType.parameters[0].name.escapedText === "this" /* This */) { return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); @@ -68415,10 +68463,10 @@ } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 166 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 167 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 210 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 211 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer( node, /*stopOnFunctions*/ @@ -68428,7 +68476,7 @@ let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 216 /* ArrowFunction */) { + while (container && container.kind === 217 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer( @@ -68443,19 +68491,19 @@ } let nodeCheckFlag = 0; if (!container || !isLegalUsageOfSuperExpression(container)) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 164 /* ComputedPropertyName */); - if (current && current.kind === 164 /* ComputedPropertyName */) { + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 165 /* ComputedPropertyName */); + if (current && current.kind === 165 /* ComputedPropertyName */) { error(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression2) { error(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 207 /* ObjectLiteralExpression */)) { + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 208 /* ObjectLiteralExpression */)) { error(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { error(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); } return errorType; } - if (!isCallExpression2 && immediateContainer.kind === 173 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 174 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if (isStatic(container) || isCallExpression2) { @@ -68471,7 +68519,7 @@ nodeCheckFlag = 16 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 171 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 172 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -68481,7 +68529,7 @@ if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 207 /* ObjectLiteralExpression */) { + if (container.parent.kind === 208 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { error(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return errorType; @@ -68499,20 +68547,20 @@ if (!baseClassType) { return errorType; } - if (container.kind === 173 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 174 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType); function isLegalUsageOfSuperExpression(container2) { if (isCallExpression2) { - return container2.kind === 173 /* Constructor */; + return container2.kind === 174 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 207 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 208 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 171 /* MethodDeclaration */ || container2.kind === 170 /* MethodSignature */ || container2.kind === 174 /* GetAccessor */ || container2.kind === 175 /* SetAccessor */ || container2.kind === 169 /* PropertyDeclaration */ || container2.kind === 172 /* ClassStaticBlockDeclaration */; + return container2.kind === 172 /* MethodDeclaration */ || container2.kind === 171 /* MethodSignature */ || container2.kind === 175 /* GetAccessor */ || container2.kind === 176 /* SetAccessor */ || container2.kind === 170 /* PropertyDeclaration */ || container2.kind === 173 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 171 /* MethodDeclaration */ || container2.kind === 170 /* MethodSignature */ || container2.kind === 174 /* GetAccessor */ || container2.kind === 175 /* SetAccessor */ || container2.kind === 169 /* PropertyDeclaration */ || container2.kind === 168 /* PropertySignature */ || container2.kind === 173 /* Constructor */; + return container2.kind === 172 /* MethodDeclaration */ || container2.kind === 171 /* MethodSignature */ || container2.kind === 175 /* GetAccessor */ || container2.kind === 176 /* SetAccessor */ || container2.kind === 170 /* PropertyDeclaration */ || container2.kind === 169 /* PropertySignature */ || container2.kind === 174 /* Constructor */; } } } @@ -68520,7 +68568,7 @@ } } function getContainingObjectLiteral(func) { - return (func.kind === 171 /* MethodDeclaration */ || func.kind === 174 /* GetAccessor */ || func.kind === 175 /* SetAccessor */) && func.parent.kind === 207 /* ObjectLiteralExpression */ ? func.parent : func.kind === 215 /* FunctionExpression */ && func.parent.kind === 299 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 172 /* MethodDeclaration */ || func.kind === 175 /* GetAccessor */ || func.kind === 176 /* SetAccessor */) && func.parent.kind === 208 /* ObjectLiteralExpression */ ? func.parent : func.kind === 216 /* FunctionExpression */ && func.parent.kind === 300 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -68531,7 +68579,7 @@ }); } function getContextualThisParameterType(func) { - if (func.kind === 216 /* ArrowFunction */) { + if (func.kind === 217 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -68559,7 +68607,7 @@ if (thisType) { return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } - if (literal.parent.kind !== 299 /* PropertyAssignment */) { + if (literal.parent.kind !== 300 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -68572,7 +68620,7 @@ return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 223 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 224 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -68627,11 +68675,11 @@ return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 166 /* Parameter */: + case 167 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -68640,10 +68688,10 @@ function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 205 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 206 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent2.name.kind === 204 /* ArrayBindingPattern */) { + if (parent2.name.kind === 205 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -68793,7 +68841,7 @@ return signature ? getOrCreateTypeFromSignature(signature) : void 0; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 212 /* TaggedTemplateExpression */) { + if (template.parent.kind === 213 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -69122,16 +69170,16 @@ case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: case 79 /* Identifier */: - case 155 /* UndefinedKeyword */: + case 156 /* UndefinedKeyword */: return true; - case 208 /* PropertyAccessExpression */: - case 214 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 215 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -69141,7 +69189,7 @@ contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 299 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 300 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -69161,7 +69209,7 @@ contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 288 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 289 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -69229,47 +69277,47 @@ } const { parent: parent2 } = node; switch (parent2.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 206 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 216 /* ArrowFunction */: - case 250 /* ReturnStatement */: + case 217 /* ArrowFunction */: + case 251 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return getContextualTypeForYieldOperand(parent2, contextFlags); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: return getContextualTypeForArgument(parent2, node); - case 167 /* Decorator */: + case 168 /* Decorator */: return getContextualTypeForDecorator(parent2); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return isConstTypeReference(parent2.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(parent2.type); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return getContextualType2(parent2.parent, contextFlags); - case 206 /* ArrayLiteralExpression */: { + case 207 /* ArrayLiteralExpression */: { const arrayLiteral = parent2; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); const spreadIndex = (_b = (_a2 = getNodeLinks(arrayLiteral)).firstSpreadIndex) != null ? _b : _a2.firstSpreadIndex = findIndex(arrayLiteral.elements, isSpreadElement); const elementIndex = indexOfNode(arrayLiteral.elements, node); return getContextualTypeForElementExpression(type, spreadIndex < 0 || elementIndex < spreadIndex ? elementIndex : -1); } - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 236 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 225 /* TemplateExpression */); + case 237 /* TemplateSpan */: + Debug.assert(parent2.parent.kind === 226 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 214 /* ParenthesizedExpression */: { + case 215 /* ParenthesizedExpression */: { if (isInJSFile(parent2)) { if (isJSDocSatisfiesExpression(parent2)) { return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2)); @@ -69281,19 +69329,19 @@ } return getContextualType2(parent2, contextFlags); } - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return getContextualType2(parent2, contextFlags); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return getTypeFromTypeNode(parent2.type); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent2); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return getContextualTypeForJsxExpression(parent2, contextFlags); - case 288 /* JsxAttribute */: - case 290 /* JsxSpreadAttribute */: + case 289 /* JsxAttribute */: + case 291 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent2, contextFlags); } return void 0; @@ -69561,7 +69609,7 @@ return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -69612,7 +69660,7 @@ return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 205 /* BindingElement */ && !!node.initializer || node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; + return node.kind === 206 /* BindingElement */ && !!node.initializer || node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -69631,7 +69679,7 @@ let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 227 /* SpreadElement */) { + if (e.kind === 228 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -69655,7 +69703,7 @@ elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 229 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 230 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(undefinedOrMissingType); elementFlags.push(2 /* Optional */); @@ -69702,7 +69750,7 @@ } function isNumericName(name) { switch (name.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return isNumericComputedName(name); case 79 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -69719,7 +69767,7 @@ function checkComputedPropertyName(node) { const links = getNodeLinks(node.expression); if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 101 /* InKeyword */ && node.parent.kind !== 174 /* GetAccessor */ && node.parent.kind !== 175 /* SetAccessor */) { + if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 102 /* InKeyword */ && node.parent.kind !== 175 /* GetAccessor */ && node.parent.kind !== 176 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -69788,7 +69836,7 @@ /*contextFlags*/ void 0 ); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 203 /* ObjectBindingPattern */ || contextualType.pattern.kind === 207 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 204 /* ObjectBindingPattern */ || contextualType.pattern.kind === 208 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -69807,13 +69855,13 @@ let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfDeclaration(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 164 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 299 /* PropertyAssignment */ || memberDecl.kind === 300 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 299 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( + const computedNameType = memberDecl.name && memberDecl.name.kind === 165 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 300 /* PropertyAssignment */ || memberDecl.kind === 301 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 300 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. // we don't want to say "could not find 'a'". - memberDecl.kind === 300 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) + memberDecl.kind === 301 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) ); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); @@ -69831,7 +69879,7 @@ prop.links.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 299 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 300 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 300 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 301 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -69857,13 +69905,13 @@ prop.links.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 299 /* PropertyAssignment */ || memberDecl.kind === 171 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 300 /* PropertyAssignment */ || memberDecl.kind === 172 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 299 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 300 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } - } else if (memberDecl.kind === 301 /* SpreadAssignment */) { + } else if (memberDecl.kind === 302 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -69892,7 +69940,7 @@ } continue; } else { - Debug.assert(memberDecl.kind === 174 /* GetAccessor */ || memberDecl.kind === 175 /* SetAccessor */); + Debug.assert(memberDecl.kind === 175 /* GetAccessor */ || memberDecl.kind === 176 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -69917,13 +69965,13 @@ if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 257 /* VariableDeclaration */ || n.kind === 223 /* BinaryExpression */ || n.kind === 166 /* Parameter */ + (n) => n.kind === 258 /* VariableDeclaration */ || n.kind === 224 /* BinaryExpression */ || n.kind === 167 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 301 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 302 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 301 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 302 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { @@ -70052,7 +70100,7 @@ } } } else { - Debug.assert(attributeDecl.kind === 290 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 291 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType( spread, @@ -70098,7 +70146,7 @@ ); } } - const parent2 = openingLikeElement.parent.kind === 281 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent2 = openingLikeElement.parent.kind === 282 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { @@ -70157,7 +70205,7 @@ if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 291 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 292 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -70509,7 +70557,7 @@ } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 163 /* QualifiedName */ ? node.right : node.kind === 202 /* ImportType */ ? node : node.kind === 205 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 164 /* QualifiedName */ ? node.right : node.kind === 203 /* ImportType */ ? node : node.kind === 206 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -70644,7 +70692,7 @@ } function reportObjectPossiblyNullOrUndefinedError(node, facts) { const nodeText2 = isEntityNameExpression(node) ? entityNameToString(node) : void 0; - if (node.kind === 104 /* NullKeyword */) { + if (node.kind === 105 /* NullKeyword */) { error(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); return; } @@ -70712,8 +70760,8 @@ } return nonNullType; } - function checkPropertyAccessExpression(node, checkMode) { - return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode); + function checkPropertyAccessExpression(node, checkMode, writeOnly) { + return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); } function checkPropertyAccessChain(node, checkMode) { const leftType = checkExpression(node.expression); @@ -70725,7 +70773,7 @@ return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 214 /* ParenthesizedExpression */) { + while (node.parent.kind === 215 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; @@ -70748,7 +70796,7 @@ if (!isExpressionNode(privId)) { return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression); } - const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 101 /* InKeyword */; + const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 102 /* InKeyword */; if (!getSymbolForPrivateIdentifierExpression(privId) && !isInOperation) { return grammarErrorOnNode(privId, Diagnostics.Cannot_find_name_0, idText(privId)); } @@ -70844,7 +70892,7 @@ false ) === getDeclaringConstructor(prop); } - function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode) { + function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode, writeOnly) { const parentSymbol = getNodeLinks(left).resolvedSymbol; const assignmentKind = getAssignmentTargetKind(node); const apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); @@ -70894,10 +70942,10 @@ /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ - node.kind === 163 /* QualifiedName */ + node.kind === 164 /* QualifiedName */ ); } - if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 302 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 303 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -70943,13 +70991,12 @@ checkPropertyNotUsedBeforeDeclaration(prop, node, right); markPropertyAsReferenced(prop, node, isSelfTypeAccess(left, parentSymbol)); getNodeLinks(node).resolvedSymbol = prop; - const writing = isWriteAccess(node); - checkPropertyAccessibility(node, left.kind === 106 /* SuperKeyword */, writing, apparentType, prop); + checkPropertyAccessibility(node, left.kind === 107 /* SuperKeyword */, isWriteAccess(node), apparentType, prop); if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) { error(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); return errorType; } - propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writing ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); + propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writeOnly || isWriteOnlyAccess(node) ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); } return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode); } @@ -70958,7 +71005,7 @@ if (file) { if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) { const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode); - return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */); + return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */); } } return false; @@ -70976,12 +71023,12 @@ } propType = getNarrowableTypeForReference(propType, node, checkMode); let assumeUninitialized = false; - if (strictNullChecks && strictPropertyInitialization && isAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */) { + if (strictNullChecks && strictPropertyInitialization && isAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */) { const declaration = prop && prop.valueDeclaration; if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 173 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 174 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { assumeUninitialized = true; } } @@ -71005,7 +71052,7 @@ const declarationName = idText(right); if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlags(valueDeclaration) & 32 /* Static */) && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); - } else if (valueDeclaration.kind === 260 /* ClassDeclaration */ && node.parent.kind !== 180 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + } else if (valueDeclaration.kind === 261 /* ClassDeclaration */ && node.parent.kind !== 181 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { @@ -71018,25 +71065,25 @@ function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return true; - case 299 /* PropertyAssignment */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 301 /* SpreadAssignment */: - case 164 /* ComputedPropertyName */: - case 236 /* TemplateSpan */: - case 291 /* JsxExpression */: - case 288 /* JsxAttribute */: - case 289 /* JsxAttributes */: - case 290 /* JsxSpreadAttribute */: - case 283 /* JsxOpeningElement */: - case 230 /* ExpressionWithTypeArguments */: - case 294 /* HeritageClause */: + case 300 /* PropertyAssignment */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 302 /* SpreadAssignment */: + case 165 /* ComputedPropertyName */: + case 237 /* TemplateSpan */: + case 292 /* JsxExpression */: + case 289 /* JsxAttribute */: + case 290 /* JsxAttributes */: + case 291 /* JsxSpreadAttribute */: + case 284 /* JsxOpeningElement */: + case 231 /* ExpressionWithTypeArguments */: + case 295 /* HeritageClause */: return false; - case 216 /* ArrowFunction */: - case 241 /* ExpressionStatement */: + case 217 /* ArrowFunction */: + case 242 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -71069,7 +71116,7 @@ function reportNonexistentProperty(propNode, containingType, isUncheckedJS) { let errorInfo; let relatedInfo; - if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 134348796 /* Primitive */)) { + if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) { for (const subtype of containingType.types) { if (!getPropertyOfType(subtype, propNode.escapedText) && !getApplicableIndexInfoForName(subtype, propNode.escapedText)) { errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(subtype)); @@ -71277,13 +71324,13 @@ (getCheckFlags(prop) & 1 /* Instantiated */ ? getSymbolLinks(prop).target : prop).isReferenced = 67108863 /* All */; } function isSelfTypeAccess(name, parent2) { - return name.kind === 108 /* ThisKeyword */ || !!parent2 && isEntityNameExpression(name) && parent2 === getResolvedSymbol(getFirstIdentifier(name)); + return name.kind === 109 /* ThisKeyword */ || !!parent2 && isEntityNameExpression(name) && parent2 === getResolvedSymbol(getFirstIdentifier(name)); } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: - return isValidPropertyAccessWithType(node, node.expression.kind === 106 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + return isValidPropertyAccessWithType(node, node.expression.kind === 107 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); + case 164 /* QualifiedName */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -71291,7 +71338,7 @@ propertyName, getWidenedType(checkExpression(node.left)) ); - case 202 /* ImportType */: + case 203 /* ImportType */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -71304,7 +71351,7 @@ function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 208 /* PropertyAccessExpression */ && node.expression.kind === 106 /* SuperKeyword */, + node.kind === 209 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, /* isWrite */ false, type, @@ -71337,7 +71384,7 @@ } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 258 /* VariableDeclarationList */) { + if (initializer.kind === 259 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfDeclaration(variable); @@ -71358,7 +71405,7 @@ let child = expr; let node = expr.parent; while (node) { - if (node.kind === 246 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 247 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -71399,11 +71446,11 @@ if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 167 /* Decorator */) { + } else if (node.kind !== 168 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -71448,7 +71495,7 @@ } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 227 /* SpreadElement */ || arg.kind === 234 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 228 /* SpreadElement */ || arg.kind === 235 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -71464,9 +71511,9 @@ let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 225 /* TemplateExpression */) { + if (node.template.kind === 226 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -71474,7 +71521,7 @@ Debug.assert(templateLiteral.kind === 14 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 167 /* Decorator */) { + } else if (node.kind === 168 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -71485,7 +71532,7 @@ effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 211 /* NewExpression */); + Debug.assert(node.kind === 212 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -71581,7 +71628,7 @@ if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 167 /* Decorator */) { + if (node.kind !== 168 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -71618,7 +71665,7 @@ } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 229 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 230 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -71646,11 +71693,11 @@ if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); + const spreadType = arg.kind === 235 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); if (isArrayLikeType(spreadType)) { return getMutableArrayOrTupleType(spreadType); } - return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg), inConstContext); + return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 228 /* SpreadElement */ ? arg.expression : arg), inConstContext); } } const types = []; @@ -71659,22 +71706,22 @@ for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 235 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 228 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { const contextualType = getIndexedAccessType(restType, getNumberLiteralType(i - index), 256 /* Contextual */); const argType = checkExpressionWithContextualType(arg, contextualType, context, checkMode); - const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 134348796 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); + const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 234 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 235 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -71851,7 +71898,7 @@ const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 229 /* OmittedExpression */) { + if (arg.kind !== 230 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType( arg, @@ -71909,7 +71956,7 @@ } } function getThisArgumentOfCall(node) { - const expression = node.kind === 210 /* CallExpression */ ? node.expression : node.kind === 212 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 211 /* CallExpression */ ? node.expression : node.kind === 213 /* TaggedTemplateExpression */ ? node.tag : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -71924,17 +71971,17 @@ return result; } function getEffectiveCallArguments(node) { - if (node.kind === 212 /* TaggedTemplateExpression */) { + if (node.kind === 213 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 225 /* TemplateExpression */) { + if (template.kind === 226 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 167 /* Decorator */) { + if (node.kind === 168 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -71946,7 +71993,7 @@ const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 227 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 228 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getTypeArguments(spreadType), (t, i2) => { var _a2; @@ -71985,16 +72032,16 @@ } function getLegacyDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return 1; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 166 /* Parameter */: + case 167 /* Parameter */: return 3; default: return Debug.fail(); @@ -72201,14 +72248,14 @@ return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) { - const isTaggedTemplate = node.kind === 212 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 167 /* Decorator */; + const isTaggedTemplate = node.kind === 213 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 168 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; if (!isDecorator2 && !isSuperCall(node)) { typeArguments = node.typeArguments; - if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 106 /* SuperKeyword */) { + if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 107 /* SuperKeyword */) { forEach(typeArguments, checkSourceElement); } } @@ -72228,7 +72275,7 @@ let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 210 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 211 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -72579,7 +72626,7 @@ return maxParamsIndex; } function resolveCallExpression(node, candidatesOutArray, checkMode) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { const superType = checkSuperExpression(node.expression); if (isTypeAny(superType)) { for (const arg of node.arguments) { @@ -72756,7 +72803,7 @@ } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 173 /* Constructor */) { + if (!modifiers || declaration.kind !== 174 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -72903,16 +72950,16 @@ } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 166 /* Parameter */: + case 167 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; default: return Debug.fail(); @@ -72974,7 +73021,7 @@ returnNode, /*typeArguments*/ void 0 - ) : factory.createKeywordTypeNode(131 /* AnyKeyword */) + ) : factory.createKeywordTypeNode(132 /* AnyKeyword */) ); const parameterSymbol = createSymbol(1 /* FunctionScopedVariable */, "props"); parameterSymbol.links.type = result; @@ -73035,16 +73082,16 @@ } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 167 /* Decorator */: + case 168 /* Decorator */: return resolveDecorator(node, candidatesOutArray, checkMode); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } throw Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); @@ -73154,7 +73201,7 @@ return false; } let parent2 = node.parent; - while (parent2 && parent2.kind === 208 /* PropertyAccessExpression */) { + while (parent2 && parent2.kind === 209 /* PropertyAccessExpression */) { parent2 = parent2.parent; } if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 63 /* EqualsToken */) { @@ -73175,12 +73222,12 @@ return silentNeverType; } checkDeprecatedSignature(signature, node); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return voidType; } - if (node.kind === 211 /* NewExpression */) { + if (node.kind === 212 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 173 /* Constructor */ && declaration.kind !== 177 /* ConstructSignature */ && declaration.kind !== 182 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a2 = getJSDocRoot(declaration)) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 173 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 174 /* Constructor */ && declaration.kind !== 178 /* ConstructSignature */ && declaration.kind !== 183 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a2 = getJSDocRoot(declaration)) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 174 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -73194,7 +73241,7 @@ if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 210 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 241 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 211 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 242 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { if (!isDottedName(node.expression)) { error(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); } else if (!getEffectsSignature(node)) { @@ -73226,20 +73273,20 @@ function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 210 /* CallExpression */: - case 167 /* Decorator */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 168 /* Decorator */: + case 212 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return node.argumentExpression; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.name; - case 180 /* TypeReference */: + case 181 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -73399,7 +73446,7 @@ if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 259 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 257 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 260 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 258 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); return !!decl && !!(decl.flags & 16777216 /* Ambient */); @@ -73417,7 +73464,7 @@ return getReturnTypeOfSignature(signature); } function checkAssertion(node) { - if (node.kind === 213 /* TypeAssertionExpression */) { + if (node.kind === 214 /* TypeAssertionExpression */) { const file = getSourceFileOfNode(node); if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) { grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); @@ -73431,20 +73478,20 @@ case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 225 /* TemplateExpression */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 226 /* TemplateExpression */: return true; - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const op = node.operator; const arg = node.operand; return op === 40 /* MinusToken */ && (arg.kind === 8 /* NumericLiteral */ || arg.kind === 9 /* BigIntLiteral */) || op === 39 /* PlusToken */ && arg.kind === 8 /* NumericLiteral */; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = skipParentheses(node.expression); const symbol = isEntityNameExpression(expr) ? resolveEntityName( expr, @@ -73493,7 +73540,7 @@ function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); forEach(node.typeArguments, checkSourceElement); - const exprType = node.kind === 230 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 231 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); return getInstantiationExpressionType(exprType, node); } function getInstantiationExpressionType(exprType, node) { @@ -73575,19 +73622,19 @@ } function checkMetaProperty(node) { checkGrammarMetaProperty(node); - if (node.keywordToken === 103 /* NewKeyword */) { + if (node.keywordToken === 104 /* NewKeyword */) { return checkNewTargetMetaProperty(node); } - if (node.keywordToken === 100 /* ImportKeyword */) { + if (node.keywordToken === 101 /* ImportKeyword */) { return checkImportMetaProperty(node); } return Debug.assertNever(node.keywordToken); } function checkMetaPropertyKeyword(node) { switch (node.keywordToken) { - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return getGlobalImportMetaExpressionType(); - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: const type = checkNewTargetMetaProperty(node); return isErrorType(type) ? errorType : createNewTargetExpressionType(type); default: @@ -73599,7 +73646,7 @@ if (!container) { error(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return errorType; - } else if (container.kind === 173 /* Constructor */) { + } else if (container.kind === 174 /* Constructor */) { const symbol = getSymbolOfDeclaration(container.parent); return getTypeOfSymbol(symbol); } else { @@ -73649,7 +73696,7 @@ } function getParameterIdentifierNameAtPosition(signature, pos) { var _a2; - if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 320 /* JSDocFunctionType */) { + if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 321 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -73681,7 +73728,7 @@ return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); } function isValidDeclarationForTupleLabel(d) { - return d.kind === 199 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 200 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -74017,17 +74064,17 @@ if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const contextType = createClassDecoratorContextType(targetType); links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType); break; } - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74039,7 +74086,7 @@ links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); break; } - case 169 /* PropertyDeclaration */: { + case 170 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74061,8 +74108,8 @@ if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: { + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const targetParam = createParameter("target", targetType); @@ -74076,7 +74123,7 @@ ); break; } - case 166 /* Parameter */: { + case 167 /* Parameter */: { const node = parent2; if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { break; @@ -74102,10 +74149,10 @@ ); break; } - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: { + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74200,7 +74247,7 @@ let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 238 /* Block */) { + if (func.body.kind !== 239 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType( @@ -74374,7 +74421,7 @@ return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 218 /* TypeOfExpression */) { + if (node.expression.kind === 219 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -74435,11 +74482,11 @@ } function mayReturnNever(func) { switch (func.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; - case 171 /* MethodDeclaration */: - return func.parent.kind === 207 /* ObjectLiteralExpression */; + case 172 /* MethodDeclaration */: + return func.parent.kind === 208 /* ObjectLiteralExpression */; default: return false; } @@ -74453,7 +74500,7 @@ if (type && maybeTypeOfKind(type, 1 /* Any */ | 16384 /* Void */)) { return; } - if (func.kind === 170 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 238 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 171 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 239 /* Block */ || !functionHasImplicitReturn(func)) { return; } const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; @@ -74479,7 +74526,7 @@ } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -74512,7 +74559,7 @@ return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 215 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 216 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -74556,7 +74603,7 @@ } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 171 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 172 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -74564,7 +74611,7 @@ if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 238 /* Block */) { + if (node.body.kind === 239 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -74634,9 +74681,9 @@ return false; } if (isReadonlySymbol(symbol)) { - if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 108 /* ThisKeyword */) { + if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 109 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 173 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 174 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -74657,7 +74704,7 @@ const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 271 /* NamespaceImport */; + return !!declaration && declaration.kind === 272 /* NamespaceImport */; } } } @@ -74762,7 +74809,7 @@ if (!hasParseDiagnostics(sourceFile)) { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); - if (container && container.kind !== 173 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + if (container && container.kind !== 174 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } @@ -74920,7 +74967,7 @@ if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } - if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 134348796 /* Primitive */)) { + if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { error(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { @@ -74971,7 +75018,7 @@ function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 299 /* PropertyAssignment */ || property.kind === 300 /* ShorthandPropertyAssignment */) { + if (property.kind === 300 /* PropertyAssignment */ || property.kind === 301 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -74992,8 +75039,8 @@ } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 300 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 301 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 301 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 302 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { @@ -75025,7 +75072,7 @@ let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 227 /* SpreadElement */) { + if (node.elements[i].kind === 228 /* SpreadElement */) { type = inBoundsType = inBoundsType != null ? inBoundsType : checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType; } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -75035,8 +75082,8 @@ function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 229 /* OmittedExpression */) { - if (element.kind !== 227 /* SpreadElement */) { + if (element.kind !== 230 /* OmittedExpression */) { + if (element.kind !== 228 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -75051,7 +75098,7 @@ error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 223 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { + if (restExpression.kind === 224 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { error(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); } else { checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); @@ -75064,7 +75111,7 @@ } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 300 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 301 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -75076,25 +75123,25 @@ } else { target = exprOrAssignment; } - if (target.kind === 223 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { + if (target.kind === 224 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 207 /* ObjectLiteralExpression */) { + if (target.kind === 208 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 206 /* ArrayLiteralExpression */) { + if (target.kind === 207 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { const targetType = checkExpression(target, checkMode); - const error2 = target.parent.kind === 301 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; - const optionalError = target.parent.kind === 301 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + const error2 = target.parent.kind === 302 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; + const optionalError = target.parent.kind === 302 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; if (checkReferenceExpression(target, error2, optionalError)) { checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target); } @@ -75109,34 +75156,34 @@ case 79 /* Identifier */: case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: - case 212 /* TaggedTemplateExpression */: - case 225 /* TemplateExpression */: + case 213 /* TaggedTemplateExpression */: + case 226 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: - case 155 /* UndefinedKeyword */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 218 /* TypeOfExpression */: - case 232 /* NonNullExpression */: - case 282 /* JsxSelfClosingElement */: - case 281 /* JsxElement */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 156 /* UndefinedKeyword */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 219 /* TypeOfExpression */: + case 233 /* NonNullExpression */: + case 283 /* JsxSelfClosingElement */: + case 282 /* JsxElement */: return true; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: switch (node.operator) { case 53 /* ExclamationToken */: case 39 /* PlusToken */: @@ -75145,9 +75192,9 @@ return true; } return false; - case 219 /* VoidExpression */: - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 220 /* VoidExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: default: return false; } @@ -75191,9 +75238,9 @@ } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (node.left.kind === 207 /* ObjectLiteralExpression */ || node.left.kind === 206 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (node.left.kind === 208 /* ObjectLiteralExpression */ || node.left.kind === 207 /* ArrayLiteralExpression */)) { state.skip = true; - setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 108 /* ThisKeyword */)); + setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 109 /* ThisKeyword */)); return state; } return state; @@ -75216,7 +75263,7 @@ const operator = operatorToken.kind; if (isLogicalOrCoalescingBinaryOperator(operator)) { let parent2 = node.parent; - while (parent2.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { + while (parent2.kind === 215 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { parent2 = parent2.parent; } if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) { @@ -75292,8 +75339,8 @@ } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (left.kind === 207 /* ObjectLiteralExpression */ || left.kind === 206 /* ArrayLiteralExpression */)) { - return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */); + if (operator === 63 /* EqualsToken */ && (left.kind === 208 /* ObjectLiteralExpression */ || left.kind === 207 /* ArrayLiteralExpression */)) { + return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 109 /* ThisKeyword */); } let leftType; if (isLogicalOrCoalescingBinaryOperator(operator)) { @@ -75468,9 +75515,9 @@ checkNaNEquality(errorNode, operator, left, right); reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); return booleanType; - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return checkInExpression(left, right, leftType, rightType); case 55 /* AmpersandAmpersandToken */: case 76 /* AmpersandAmpersandEqualsToken */: { @@ -75552,7 +75599,7 @@ } } function isIndirectCall(node) { - return node.parent.kind === 214 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 212 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + return node.parent.kind === 215 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 213 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval"); } function checkForDisallowedESSymbolOperand(operator2) { @@ -75583,6 +75630,16 @@ addLazyDiagnostic(checkAssignmentOperatorWorker); } function checkAssignmentOperatorWorker() { + let assigneeType = leftType; + if (isCompoundAssignment(operatorToken.kind) && left.kind === 209 /* PropertyAccessExpression */) { + assigneeType = checkPropertyAccessExpression( + left, + /*checkMode*/ + void 0, + /*writeOnly*/ + true + ); + } if (checkReferenceExpression( left, Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, @@ -75595,7 +75652,7 @@ headMessage = Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target; } } - checkTypeAssignableToAndOptionallyElaborate(valueType, leftType, left, right, headMessage); + checkTypeAssignableToAndOptionallyElaborate(valueType, assigneeType, left, right, headMessage); } } } @@ -75672,7 +75729,7 @@ const err = error( errorNode2, Diagnostics.This_condition_will_always_return_0, - tokenToString(operator2 === 36 /* EqualsEqualsEqualsToken */ || operator2 === 34 /* EqualsEqualsToken */ ? 95 /* FalseKeyword */ : 110 /* TrueKeyword */) + tokenToString(operator2 === 36 /* EqualsEqualsEqualsToken */ || operator2 === 34 /* EqualsEqualsToken */ ? 96 /* FalseKeyword */ : 111 /* TrueKeyword */) ); if (isLeftNaN && isRightNaN) return; @@ -75847,7 +75904,7 @@ /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 213 /* TypeAssertionExpression */ || node.kind === 231 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 214 /* TypeAssertionExpression */ || node.kind === 232 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); @@ -75864,7 +75921,7 @@ void 0, checkMode || 0 /* Normal */ ) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 204 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 205 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; } function padTupleType(type, pattern) { const patternElements = pattern.elements; @@ -75872,7 +75929,7 @@ const elementFlags = type.target.elementFlags.slice(); for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) { const e = patternElements[i]; - if (i < patternElements.length - 1 || !(e.kind === 205 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 206 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement( e, /*includePatternInType*/ @@ -75937,14 +75994,14 @@ )); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -76132,7 +76189,7 @@ const type = getQuickTypeOfExpression(expr.expression); return type ? getAwaitedType(type) : void 0; } - if (isCallExpression(expr) && expr.expression.kind !== 106 /* SuperKeyword */ && !isRequireCall( + if (isCallExpression(expr) && expr.expression.kind !== 107 /* SuperKeyword */ && !isRequireCall( expr, /*checkArgumentIsStringLiteralLike*/ true @@ -76176,7 +76233,7 @@ return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 208 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 209 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 163 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 183 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 278 /* ExportSpecifier */; + const ok = node.parent.kind === 209 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 210 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 164 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 184 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 279 /* ExportSpecifier */; if (!ok) { error(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -76204,9 +76261,9 @@ const kind = node.kind; if (cancellationToken) { switch (kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -76215,15 +76272,15 @@ return checkIdentifier(node, checkMode); case 80 /* PrivateIdentifier */: return checkPrivateIdentifierExpression(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return checkThisExpression(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return nullWideningType; case 14 /* NoSubstitutionTemplateLiteral */: case 10 /* StringLiteral */: - return getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? anyType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 8 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -76233,85 +76290,85 @@ negative: false, base10Value: parsePseudoBigInt(node.text) })); - case 110 /* TrueKeyword */: + case 111 /* TrueKeyword */: return trueType; - case 95 /* FalseKeyword */: + case 96 /* FalseKeyword */: return falseType; - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return checkTemplateExpression(node); case 13 /* RegularExpressionLiteral */: return globalRegExpType; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 210 /* CallExpression */: - if (node.expression.kind === 100 /* ImportKeyword */) { + case 211 /* CallExpression */: + if (node.expression.kind === 101 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 211 /* NewExpression */: + case 212 /* NewExpression */: return checkCallExpression(node, checkMode); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return checkClassExpression(node); - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return checkAssertion(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return checkNonNullAssertion(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return checkMetaProperty(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return checkDeleteExpression(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return checkVoidExpression(node); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return checkAwaitExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 229 /* OmittedExpression */: + case 230 /* OmittedExpression */: return undefinedWideningType; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return checkYieldExpression(node); - case 234 /* SyntheticExpression */: + case 235 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return checkJsxElement(node, checkMode); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return checkJsxFragment(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -76363,10 +76420,10 @@ checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 173 /* Constructor */ && nodeIsPresent(func.body))) { + if (!(func.kind === 174 /* Constructor */ && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 173 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 174 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } @@ -76377,13 +76434,13 @@ if (func.parameters.indexOf(node) !== 0) { error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 173 /* Constructor */ || func.kind === 177 /* ConstructSignature */ || func.kind === 182 /* ConstructorType */) { + if (func.kind === 174 /* Constructor */ || func.kind === 178 /* ConstructSignature */ || func.kind === 183 /* ConstructorType */) { error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 216 /* ArrowFunction */) { + if (func.kind === 217 /* ArrowFunction */) { error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 174 /* GetAccessor */ || func.kind === 175 /* SetAccessor */) { + if (func.kind === 175 /* GetAccessor */ || func.kind === 176 /* SetAccessor */) { error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } @@ -76443,13 +76500,13 @@ } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 216 /* ArrowFunction */: - case 176 /* CallSignature */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 217 /* ArrowFunction */: + case 177 /* CallSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: const parent2 = node.parent; if (node === parent2.type) { return parent2; @@ -76469,7 +76526,7 @@ predicateVariableName ); return true; - } else if (name.kind === 204 /* ArrayBindingPattern */ || name.kind === 203 /* ObjectBindingPattern */) { + } else if (name.kind === 205 /* ArrayBindingPattern */ || name.kind === 204 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -76481,9 +76538,9 @@ } } function checkSignatureDeclaration(node) { - if (node.kind === 178 /* IndexSignature */) { + if (node.kind === 179 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 181 /* FunctionType */ || node.kind === 259 /* FunctionDeclaration */ || node.kind === 182 /* ConstructorType */ || node.kind === 176 /* CallSignature */ || node.kind === 173 /* Constructor */ || node.kind === 177 /* ConstructSignature */) { + } else if (node.kind === 182 /* FunctionType */ || node.kind === 260 /* FunctionDeclaration */ || node.kind === 183 /* ConstructorType */ || node.kind === 177 /* CallSignature */ || node.kind === 174 /* Constructor */ || node.kind === 178 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -76510,10 +76567,10 @@ const returnTypeNode = getEffectiveReturnTypeNode(node); if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -76535,7 +76592,7 @@ checkAsyncFunctionReturnType(node, returnTypeNode); } } - if (node.kind !== 178 /* IndexSignature */ && node.kind !== 320 /* JSDocFunctionType */) { + if (node.kind !== 179 /* IndexSignature */ && node.kind !== 321 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -76545,7 +76602,7 @@ const staticNames = /* @__PURE__ */ new Map(); const privateIdentifiers = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 173 /* Constructor */) { + if (member.kind === 174 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -76563,16 +76620,16 @@ const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -76625,7 +76682,7 @@ function checkObjectTypeForDuplicateDeclarations(node) { const names = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 168 /* PropertySignature */) { + if (member.kind === 169 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -76649,7 +76706,7 @@ } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 261 /* InterfaceDeclaration */) { + if (node.kind === 262 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfDeclaration(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -76684,7 +76741,7 @@ checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 169 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 170 /* PropertyDeclaration */ && node.initializer) { error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } @@ -76701,7 +76758,7 @@ error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* MethodDeclaration */ && node.body) { error(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { @@ -76746,7 +76803,7 @@ if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 169 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 170 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -76789,7 +76846,7 @@ return isExpressionStatement(superCallParent) && superCallParent.parent === body; } function nodeImmediatelyReferencesSuperOrThis(node) { - if (node.kind === 106 /* SuperKeyword */ || node.kind === 108 /* ThisKeyword */) { + if (node.kind === 107 /* SuperKeyword */ || node.kind === 109 /* ThisKeyword */) { return true; } if (isThisContainerOrFunctionBlock(node)) { @@ -76798,7 +76855,7 @@ return !!forEachChild(node, nodeImmediatelyReferencesSuperOrThis); } function checkAccessorDeclaration(node) { - if (isIdentifier(node.name) && idText(node.name) === "constructor") { + if (isIdentifier(node.name) && idText(node.name) === "constructor" && isClassLike(node.parent)) { error(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); } addLazyDiagnostic(checkAccessorDeclarationDiagnostics); @@ -76809,20 +76866,20 @@ checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { if (!(node.flags & 16777216 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 256 /* HasImplicitReturn */) { if (!(node.flags & 512 /* HasExplicitReturn */)) { error(node.name, Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfDeclaration(node); - const getter = getDeclarationOfKind(symbol, 174 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 175 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 175 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 176 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); @@ -76843,7 +76900,7 @@ } } const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node)); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -76904,7 +76961,7 @@ } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 180 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { + if (node.kind === 181 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { const sourceFile = getSourceFileOfNode(node); if (scanTokenAtPosition(sourceFile, node.typeName.end) === 24 /* DotToken */) { grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); @@ -76968,7 +77025,7 @@ let seenRestElement = false; const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 199 /* NamedTupleMember */ && hasNamedElement) { + if (e.kind !== 200 /* NamedTupleMember */ && hasNamedElement) { grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); break; } @@ -77017,7 +77074,7 @@ /*stringsOnly*/ false ))) { - if (accessNode.kind === 209 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + if (accessNode.kind === 210 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } return type; @@ -77078,7 +77135,7 @@ forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 191 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 192 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -77088,7 +77145,7 @@ if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 165 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 166 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { @@ -77126,10 +77183,10 @@ if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 187 /* OptionalType */) { + if (node.type.kind === 188 /* OptionalType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type); } - if (node.type.kind === 188 /* RestType */) { + if (node.type.kind === 189 /* RestType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type); } checkSourceElement(node.type); @@ -77140,7 +77197,7 @@ } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 261 /* InterfaceDeclaration */ && n.parent.kind !== 260 /* ClassDeclaration */ && n.parent.kind !== 228 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { + if (n.parent.kind !== 262 /* InterfaceDeclaration */ && n.parent.kind !== 261 /* ClassDeclaration */ && n.parent.kind !== 229 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } @@ -77217,7 +77274,7 @@ // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) || // Both are literal property names that are the same. isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); if (reportError) { const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; error(errorNode2, diagnostic); @@ -77249,14 +77306,14 @@ for (const current of declarations) { const node = current; const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 261 /* InterfaceDeclaration */ || node.parent.kind === 184 /* TypeLiteral */) || inAmbientContext; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 262 /* InterfaceDeclaration */ || node.parent.kind === 185 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 260 /* ClassDeclaration */ || node.kind === 228 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 261 /* ClassDeclaration */ || node.kind === 229 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 259 /* FunctionDeclaration */ || node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */ || node.kind === 173 /* Constructor */) { + if (node.kind === 260 /* FunctionDeclaration */ || node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */ || node.kind === 174 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -77309,9 +77366,9 @@ }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 260 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 261 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 260 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 259 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 261 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 260 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; if (diagnostic) { addRelatedInfo( error(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), @@ -77391,45 +77448,45 @@ function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return 2 /* ExportType */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 274 /* ExportAssignment */: - case 223 /* BinaryExpression */: + case 275 /* ExportAssignment */: + case 224 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 268 /* ImportEqualsDeclaration */: - case 271 /* NamespaceImport */: - case 270 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 272 /* NamespaceImport */: + case 271 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfDeclaration(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: - case 259 /* FunctionDeclaration */: - case 273 /* ImportSpecifier */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 260 /* FunctionDeclaration */: + case 274 /* ImportSpecifier */: case 79 /* Identifier */: return 1 /* ExportValue */; - case 170 /* MethodSignature */: - case 168 /* PropertySignature */: + case 171 /* MethodSignature */: + case 169 /* PropertySignature */: return 2 /* ExportType */; default: return Debug.failBadSyntaxKind(d); @@ -77454,7 +77511,7 @@ ))) { return typeAsPromise.promisedTypeOfPromise = getTypeArguments(type)[0]; } - if (allTypesAssignableToKind(getBaseConstraintOrType(type), 134348796 /* Primitive */ | 131072 /* Never */)) { + if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) { return void 0; } const thenFunction = getTypeOfPropertyOfType(type, "then"); @@ -77506,7 +77563,7 @@ return awaitedType || errorType; } function isThenableType(type) { - if (allTypesAssignableToKind(getBaseConstraintOrType(type), 134348796 /* Primitive */ | 131072 /* Never */)) { + if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) { return false; } const thenFunction = getTypeOfPropertyOfType(type, "then"); @@ -77716,21 +77773,21 @@ let headMessage; const expectedReturnType = decoratorSignature.resolvedReturnType; switch (node.parent.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!legacyDecorators) { headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; } - case 166 /* Parameter */: + case 167 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; default: @@ -77743,7 +77800,7 @@ /*typeParameters*/ void 0, emptyArray, - factory.createKeywordTypeNode(131 /* AnyKeyword */) + factory.createKeywordTypeNode(132 /* AnyKeyword */) ); return createSignature(decl, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, flags); } @@ -77820,15 +77877,15 @@ function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 190 /* IntersectionType */: - case 189 /* UnionType */: + case 191 /* IntersectionType */: + case 190 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 193 /* ParenthesizedType */: - case 199 /* NamedTupleMember */: + case 194 /* ParenthesizedType */: + case 200 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return node.typeName; } } @@ -77836,13 +77893,13 @@ function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 193 /* ParenthesizedType */ || typeNode.kind === 199 /* NamedTupleMember */) { + while (typeNode.kind === 194 /* ParenthesizedType */ || typeNode.kind === 200 /* NamedTupleMember */) { typeNode = typeNode.type; } - if (typeNode.kind === 144 /* NeverKeyword */) { + if (typeNode.kind === 145 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 198 /* LiteralType */ && typeNode.literal.kind === 104 /* NullKeyword */ || typeNode.kind === 155 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 199 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 156 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -77873,7 +77930,7 @@ } if (legacyDecorators) { checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 166 /* Parameter */) { + if (node.kind === 167 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } } else if (languageVersion < 99 /* ESNext */) { @@ -77899,7 +77956,7 @@ if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -77907,22 +77964,22 @@ } } break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - const otherKind = node.kind === 174 /* GetAccessor */ ? 175 /* SetAccessor */ : 174 /* GetAccessor */; + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + const otherKind = node.kind === 175 /* GetAccessor */ ? 176 /* SetAccessor */ : 175 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 166 /* Parameter */: + case 167 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { @@ -78037,7 +78094,7 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -78048,7 +78105,7 @@ checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -78065,7 +78122,7 @@ checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 170 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 171 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); @@ -78101,42 +78158,42 @@ function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 308 /* SourceFile */: - case 264 /* ModuleDeclaration */: - case 238 /* Block */: - case 266 /* CaseBlock */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 309 /* SourceFile */: + case 265 /* ModuleDeclaration */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 173 /* Constructor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 192 /* InferType */: + case 193 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -78155,11 +78212,11 @@ function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 171 /* MethodDeclaration */: - case 169 /* PropertyDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - if (member.kind === 175 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 172 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + if (member.kind === 176 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfDeclaration(member); @@ -78167,16 +78224,16 @@ addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 173 /* Constructor */: + case 174 /* Constructor */: for (const parameter of member.parameters) { if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } break; - case 178 /* IndexSignature */: - case 237 /* SemicolonClassElement */: - case 172 /* ClassStaticBlockDeclaration */: + case 179 /* IndexSignature */: + case 238 /* SemicolonClassElement */: + case 173 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -78200,7 +78257,7 @@ continue; const name = idText(typeParameter.name); const { parent: parent2 } = typeParameter; - if (parent2.kind !== 192 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { + if (parent2.kind !== 193 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { const sourceFile = getSourceFileOfNode(parent2); const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); @@ -78280,7 +78337,7 @@ }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 271 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 272 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); } else { @@ -78291,7 +78348,7 @@ unusedDestructures.forEach(([bindingPattern, bindingElements]) => { const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */; if (bindingPattern.elements.length === bindingElements.length) { - if (bindingElements.length === 1 && bindingPattern.parent.kind === 257 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 258 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 258 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 259 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); @@ -78304,7 +78361,7 @@ }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 240 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 241 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -78333,21 +78390,21 @@ switch (name.kind) { case 79 /* Identifier */: return idText(name); - case 204 /* ArrayBindingPattern */: - case 203 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 270 /* ImportClause */ || node.kind === 273 /* ImportSpecifier */ || node.kind === 271 /* NamespaceImport */; + return node.kind === 271 /* ImportClause */ || node.kind === 274 /* ImportSpecifier */ || node.kind === 272 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 270 /* ImportClause */ ? decl : decl.kind === 271 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 271 /* ImportClause */ ? decl : decl.kind === 272 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 238 /* Block */) { + if (node.kind === 239 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -78375,7 +78432,7 @@ if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 168 /* PropertySignature */ || node.kind === 171 /* MethodDeclaration */ || node.kind === 170 /* MethodSignature */ || node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */ || node.kind === 299 /* PropertyAssignment */) { + if (node.kind === 170 /* PropertyDeclaration */ || node.kind === 169 /* PropertySignature */ || node.kind === 172 /* MethodDeclaration */ || node.kind === 171 /* MethodSignature */ || node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */ || node.kind === 300 /* PropertyAssignment */) { return false; } if (node.flags & 16777216 /* Ambient */) { @@ -78431,7 +78488,7 @@ return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { + if (parent2.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { errorSkippedOn( "noEmit", name, @@ -78449,7 +78506,7 @@ return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { + if (parent2.kind === 309 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -78526,7 +78583,7 @@ if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } - if (node.kind === 257 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 258 /* VariableDeclaration */ && !node.initializer) { return; } const symbol = getSymbolOfDeclaration(node); @@ -78546,9 +78603,9 @@ ); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 258 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 240 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 238 /* Block */ && isFunctionLike(container.parent) || container.kind === 265 /* ModuleBlock */ || container.kind === 264 /* ModuleDeclaration */ || container.kind === 308 /* SourceFile */); + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 259 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 241 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 239 /* Block */ && isFunctionLike(container.parent) || container.kind === 266 /* ModuleBlock */ || container.kind === 265 /* ModuleDeclaration */ || container.kind === 309 /* SourceFile */); if (!namesShareScope) { const name = symbolToString(localDeclarationSymbol); error(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); @@ -78569,7 +78626,7 @@ if (!node.name) { return; } - if (node.name.kind === 164 /* ComputedPropertyName */) { + if (node.name.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -78583,7 +78640,7 @@ if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 164 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 165 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; @@ -78605,7 +78662,7 @@ ); checkPropertyAccessibility( node, - !!parent2.initializer && parent2.initializer.kind === 106 /* SuperKeyword */, + !!parent2.initializer && parent2.initializer.kind === 107 /* SuperKeyword */, /*writing*/ false, parentType, @@ -78616,7 +78673,7 @@ } } if (isBindingPattern(node.name)) { - if (node.name.kind === 204 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 205 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); @@ -78629,7 +78686,7 @@ if (isInAmbientOrTypeNode(node)) { return; } - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 246 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 247 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -78661,7 +78718,7 @@ const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); if (initializer) { const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a2 = symbol.exports) == null ? void 0 : _a2.size); - if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 246 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 247 /* ForInStatement */) { checkTypeAssignableToAndOptionallyElaborate( checkExpressionCached(initializer), type, @@ -78696,9 +78753,9 @@ error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 168 /* PropertySignature */) { + if (node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 169 /* PropertySignature */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -78706,7 +78763,7 @@ } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 169 /* PropertyDeclaration */ || nextDeclaration.kind === 168 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; + const message = nextDeclaration.kind === 170 /* PropertyDeclaration */ || nextDeclaration.kind === 169 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; const declName = declarationNameToString(nextDeclarationName); const err = error( nextDeclarationName, @@ -78723,7 +78780,7 @@ } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 166 /* Parameter */ && right.kind === 257 /* VariableDeclaration */ || left.kind === 257 /* VariableDeclaration */ && right.kind === 166 /* Parameter */) { + if (left.kind === 167 /* Parameter */ && right.kind === 258 /* VariableDeclaration */ || left.kind === 258 /* VariableDeclaration */ && right.kind === 167 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -78757,7 +78814,7 @@ const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 239 /* EmptyStatement */) { + if (node.thenStatement.kind === 240 /* EmptyStatement */) { error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -78824,7 +78881,7 @@ let testedExpression = testedNode.parent; let childExpression = childNode.parent; while (testedExpression && childExpression) { - if (isIdentifier(testedExpression) && isIdentifier(childExpression) || testedExpression.kind === 108 /* ThisKeyword */ && childExpression.kind === 108 /* ThisKeyword */) { + if (isIdentifier(testedExpression) && isIdentifier(childExpression) || testedExpression.kind === 109 /* ThisKeyword */ && childExpression.kind === 109 /* ThisKeyword */) { return getSymbolAtLocation(testedExpression) === getSymbolAtLocation(childExpression); } else if (isPropertyAccessExpression(testedExpression) && isPropertyAccessExpression(childExpression)) { if (getSymbolAtLocation(testedExpression.name) !== getSymbolAtLocation(childExpression.name)) { @@ -78883,12 +78940,12 @@ } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 259 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { forEach(node.initializer.declarations, checkVariableDeclaration); } else { checkExpression(node.initializer); @@ -78918,12 +78975,12 @@ } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 206 /* ArrayLiteralExpression */ || varExpr.kind === 207 /* ObjectLiteralExpression */) { + if (varExpr.kind === 207 /* ArrayLiteralExpression */ || varExpr.kind === 208 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -78945,7 +79002,7 @@ function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 258 /* VariableDeclarationList */) { + if (node.initializer.kind === 259 /* VariableDeclarationList */) { const variable = node.initializer.declarations[0]; if (variable && isBindingPattern(variable.name)) { error(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -78954,7 +79011,7 @@ } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 206 /* ArrayLiteralExpression */ || varExpr.kind === 207 /* ObjectLiteralExpression */) { + if (varExpr.kind === 207 /* ArrayLiteralExpression */ || varExpr.kind === 208 /* ObjectLiteralExpression */) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); @@ -79639,11 +79696,11 @@ const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 175 /* SetAccessor */) { + if (container.kind === 176 /* SetAccessor */) { if (node.expression) { error(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 173 /* Constructor */) { + } else if (container.kind === 174 /* Constructor */) { if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) { error(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -79660,7 +79717,7 @@ checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 173 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { + } else if (container.kind !== 174 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { error(node, Diagnostics.Not_all_code_paths_return_a_value); } } @@ -79684,7 +79741,7 @@ let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 293 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 294 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -79692,7 +79749,7 @@ hasDuplicateDefaultClause = true; } } - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); @@ -79724,7 +79781,7 @@ if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 253 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 254 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -79814,8 +79871,8 @@ return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 261 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 223 /* BinaryExpression */ || name && name.kind === 164 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 262 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 224 /* BinaryExpression */ || name && name.kind === 165 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -79839,7 +79896,7 @@ function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 261 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 262 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -79945,7 +80002,7 @@ function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 180 /* TypeReference */) { + if (node.kind === 181 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { @@ -80403,7 +80460,7 @@ return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 260 /* ClassDeclaration */ || d.kind === 261 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 261 /* ClassDeclaration */ || d.kind === 262 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a2, _b, _c, _d; @@ -80433,7 +80490,7 @@ continue basePropertyCheck; } } - if (derivedClassDecl.kind === 228 /* ClassExpression */) { + if (derivedClassDecl.kind === 229 /* ClassExpression */) { error( derivedClassDecl, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, @@ -80468,7 +80525,7 @@ const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { - const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 169 /* PropertyDeclaration */ && !d.initializer); + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer); if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; @@ -80578,7 +80635,7 @@ } } function isPropertyWithoutInitializer(node) { - return node.kind === 169 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 170 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -80612,7 +80669,7 @@ checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfDeclaration(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 261 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 262 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -80642,7 +80699,7 @@ checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); - if (node.type.kind === 139 /* IntrinsicKeyword */) { + if (node.type.kind === 140 /* IntrinsicKeyword */) { if (!intrinsicTypeKinds.has(node.name.escapedText) || length(node.typeParameters) !== 1) { error(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); } @@ -80703,7 +80760,7 @@ } function evaluate(expr, location) { switch (expr.kind) { - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: const value = evaluate(expr.operand, location); if (typeof value === "number") { switch (expr.operator) { @@ -80716,7 +80773,7 @@ } } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const left = evaluate(expr.left, location); const right = evaluate(expr.right, location); if (typeof left === "number" && typeof right === "number") { @@ -80753,18 +80810,18 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return expr.text; - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return evaluateTemplateExpression(expr, location); case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return evaluate(expr.expression, location); case 79 /* Identifier */: if (isInfinityOrNaNString(expr.escapedText)) { return +expr.escapedText; } - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: if (isEntityNameExpression(expr)) { const symbol = resolveEntityName( expr, @@ -80785,7 +80842,7 @@ } } break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const root = expr.expression; if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { const rootSymbol = resolveEntityName( @@ -80852,7 +80909,7 @@ } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 263 /* EnumDeclaration */) { + if (declaration.kind !== 264 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -80882,7 +80939,7 @@ const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 260 /* ClassDeclaration */ || declaration.kind === 259 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 261 /* ClassDeclaration */ || declaration.kind === 260 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { return declaration; } } @@ -80943,13 +81000,13 @@ error(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - const mergedClass = getDeclarationOfKind(symbol, 260 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 261 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; } } - if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 308 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { - const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 93 /* ExportKeyword */); + if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 309 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { + const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 94 /* ExportKeyword */); if (exportModifier) { error(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } @@ -80981,21 +81038,21 @@ } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 205 /* BindingElement */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 258 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -81003,12 +81060,12 @@ } break; } - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 259 /* FunctionDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 260 /* FunctionDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 263 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -81019,12 +81076,12 @@ switch (node.kind) { case 79 /* Identifier */: return node; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -81043,9 +81100,9 @@ error(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 265 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 308 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 275 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + const inAmbientExternalModule = node.parent.kind === 266 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 309 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 276 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -81074,8 +81131,8 @@ symbol = getMergedSymbol(symbol.exportSymbol || symbol); if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) { const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node; - Debug.assert(node.kind !== 277 /* NamespaceExport */); - if (node.kind === 278 /* ExportSpecifier */) { + Debug.assert(node.kind !== 278 /* NamespaceExport */); + if (node.kind === 279 /* ExportSpecifier */) { const diag2 = error(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); const alreadyExportedSymbol = (_b = (_a2 = getSourceFileOfNode(node).symbol) == null ? void 0 : _a2.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText); if (alreadyExportedSymbol === target) { @@ -81089,7 +81146,7 @@ } } } else { - Debug.assert(node.kind !== 257 /* VariableDeclaration */); + Debug.assert(node.kind !== 258 /* VariableDeclaration */); const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)); const moduleSpecifier = (_e = importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) != null ? _e : "..."; const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName); @@ -81105,7 +81162,7 @@ const targetFlags = getAllSymbolFlags(target); const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (targetFlags & excludedMeanings) { - const message = node.kind === 278 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + const message = node.kind === 279 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); } if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { @@ -81113,25 +81170,25 @@ const isType = !(targetFlags & 111551 /* Value */); if (isType || typeOnlyAlias) { switch (node.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 268 /* ImportEqualsDeclaration */: { + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 269 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports || compilerOptions.verbatimModuleSyntax) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? compilerOptions.verbatimModuleSyntax ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled : compilerOptions.verbatimModuleSyntax ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled; - const name = idText(node.kind === 273 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 274 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( error(node, message, name), isType ? void 0 : typeOnlyAlias, name ); } - if (isType && node.kind === 268 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType && node.kind === 269 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; } - case 278 /* ExportSpecifier */: { + case 279 /* ExportSpecifier */: { if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const name = idText(node.propertyName || node.name); const diagnostic = isType ? error(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); @@ -81141,7 +81198,7 @@ } } } - if (compilerOptions.verbatimModuleSyntax && node.kind !== 268 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && node.kind !== 269 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } @@ -81186,7 +81243,7 @@ function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 273 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 274 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -81233,7 +81290,7 @@ checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 272 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -81259,7 +81316,7 @@ if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 280 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 281 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfDeclaration(node)); if (target !== unknownSymbol) { const targetFlags = getAllSymbolFlags(target); @@ -81297,9 +81354,9 @@ if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 265 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 265 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 308 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + const inAmbientExternalModule = node.parent.kind === 266 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 266 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; + if (node.parent.kind !== 309 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { @@ -81324,13 +81381,13 @@ } function checkGrammarExportDeclaration(node) { var _a2; - if (node.isTypeOnly && ((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 276 /* NamedExports */) { + if (node.isTypeOnly && ((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 277 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 308 /* SourceFile */ || node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 264 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 309 /* SourceFile */ || node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 265 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -81414,8 +81471,8 @@ if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 308 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 264 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 309 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 265 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { @@ -81556,182 +81613,182 @@ const kind = node.kind; if (cancellationToken) { switch (kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 240 /* FirstStatement */ && kind <= 256 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 241 /* FirstStatement */ && kind <= 257 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return checkTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return checkParameter(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return checkPropertySignature(node); - case 182 /* ConstructorType */: - case 181 /* FunctionType */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: + case 183 /* ConstructorType */: + case 182 /* FunctionType */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: return checkSignatureDeclaration(node); - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return checkMethodDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return checkConstructorDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return checkAccessorDeclaration(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return checkTypeReferenceNode(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return checkTypePredicate(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return checkTypeQuery(node); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return checkTypeLiteral(node); - case 185 /* ArrayType */: + case 186 /* ArrayType */: return checkArrayType(node); - case 186 /* TupleType */: + case 187 /* TupleType */: return checkTupleType(node); - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 193 /* ParenthesizedType */: - case 187 /* OptionalType */: - case 188 /* RestType */: + case 194 /* ParenthesizedType */: + case 188 /* OptionalType */: + case 189 /* RestType */: return checkSourceElement(node.type); - case 194 /* ThisType */: + case 195 /* ThisType */: return checkThisType(node); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return checkTypeOperator(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return checkConditionalType(node); - case 192 /* InferType */: + case 193 /* InferType */: return checkInferType(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return checkImportType(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 343 /* JSDocEnumTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 344 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 327 /* JSDocLink */: - case 328 /* JSDocLinkCode */: - case 329 /* JSDocLinkPlain */: + case 328 /* JSDocLink */: + case 329 /* JSDocLinkCode */: + case 330 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 318 /* JSDocNonNullableType */: - case 317 /* JSDocNullableType */: - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: - case 325 /* JSDocTypeLiteral */: + case 319 /* JSDocNonNullableType */: + case 318 /* JSDocNullableType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: + case 326 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 312 /* JSDocTypeExpression */: + case 313 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 336 /* JSDocPublicTag */: - case 338 /* JSDocProtectedTag */: - case 337 /* JSDocPrivateTag */: + case 337 /* JSDocPublicTag */: + case 339 /* JSDocProtectedTag */: + case 338 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 353 /* JSDocSatisfiesTag */: + case 354 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return checkMappedType(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 238 /* Block */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 266 /* ModuleBlock */: return checkBlock(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return checkVariableStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return checkExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return checkIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return checkDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return checkWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return checkForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return checkForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return checkForOfStatement(node); - case 248 /* ContinueStatement */: - case 249 /* BreakStatement */: + case 249 /* ContinueStatement */: + case 250 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return checkReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return checkWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return checkSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return checkLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return checkThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return checkTryStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return checkBindingElement(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return checkClassDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return checkImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return checkExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return checkExportAssignment(node); - case 239 /* EmptyStatement */: - case 256 /* DebuggerStatement */: + case 240 /* EmptyStatement */: + case 257 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -81830,33 +81887,33 @@ currentNode = node; instantiationCount = 0; switch (node.kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 212 /* TaggedTemplateExpression */: - case 167 /* Decorator */: - case 283 /* JsxOpeningElement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 213 /* TaggedTemplateExpression */: + case 168 /* Decorator */: + case 284 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 281 /* JsxElement */: + case 282 /* JsxElement */: checkJsxElementDeferred(node); break; } @@ -82008,27 +82065,27 @@ copySymbols(location.locals, meaning); } switch (location.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (!isExternalModule(location)) break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */); break; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */); } break; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -82061,7 +82118,7 @@ function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 278 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 277 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 279 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 278 /* NamespaceExport */)) { copySymbol(symbol, meaning2); } }); @@ -82072,16 +82129,16 @@ return name.kind === 79 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 163 /* QualifiedName */) { + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 180 /* TypeReference */; + return node.parent.kind === 181 /* TypeReference */; } function isInNameOfExpressionWithTypeArguments(node) { - while (node.parent.kind === 208 /* PropertyAccessExpression */) { + while (node.parent.kind === 209 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 230 /* ExpressionWithTypeArguments */; + return node.parent.kind === 231 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -82107,13 +82164,13 @@ return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 163 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 164 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 268 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 269 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 274 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 275 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -82139,7 +82196,7 @@ node = parent2; parent2 = parent2.parent; } - if (parent2 && parent2.kind === 202 /* ImportType */ && parent2.qualifier === node) { + if (parent2 && parent2.kind === 203 /* ImportType */ && parent2.qualifier === node) { return parent2; } return void 0; @@ -82148,7 +82205,7 @@ if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 208 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 209 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -82156,7 +82213,7 @@ } } } - if (name.parent.kind === 274 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 275 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, /*all meanings*/ @@ -82168,7 +82225,7 @@ return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 268 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 269 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals( name, @@ -82189,7 +82246,7 @@ } if (isInNameOfExpressionWithTypeArguments(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 230 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 231 /* ExpressionWithTypeArguments */) { meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -82203,10 +82260,10 @@ return entityNameSymbol; } } - if (name.parent.kind === 344 /* JSDocParameterTag */) { + if (name.parent.kind === 345 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 165 /* TypeParameter */ && name.parent.parent.kind === 348 /* JSDocTemplateTag */) { + if (name.parent.kind === 166 /* TypeParameter */ && name.parent.parent.kind === 349 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -82259,12 +82316,12 @@ return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 208 /* PropertyAccessExpression */ || name.kind === 163 /* QualifiedName */) { + } else if (name.kind === 209 /* PropertyAccessExpression */ || name.kind === 164 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 208 /* PropertyAccessExpression */) { + if (name.kind === 209 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -82304,7 +82361,7 @@ return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 180 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 181 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName( name, meaning, @@ -82315,7 +82372,7 @@ ); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 179 /* TypePredicate */) { + if (name.parent.kind === 180 /* TypePredicate */) { return resolveEntityName( name, /*meaning*/ @@ -82368,17 +82425,17 @@ if (node.kind === 79 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 205 /* BindingElement */ && grandParent.kind === 203 /* ObjectBindingPattern */ && node === parent2.propertyName) { + } else if (parent2.kind === 206 /* BindingElement */ && grandParent.kind === 204 /* ObjectBindingPattern */ && node === parent2.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { return propertyDeclaration; } } else if (isMetaProperty(parent2) && parent2.name === node) { - if (parent2.keywordToken === 103 /* NewKeyword */ && idText(node) === "target") { + if (parent2.keywordToken === 104 /* NewKeyword */ && idText(node) === "target") { return checkNewTargetMetaProperty(parent2).symbol; } - if (parent2.keywordToken === 100 /* ImportKeyword */ && idText(node) === "meta") { + if (parent2.keywordToken === 101 /* ImportKeyword */ && idText(node) === "meta") { return getGlobalImportMetaExpressionType().members.get("meta"); } return void 0; @@ -82387,12 +82444,12 @@ switch (node.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 208 /* PropertyAccessExpression */: - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: const container = getThisContainer( node, /*includeArrowFunctions*/ @@ -82409,19 +82466,19 @@ if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 194 /* ThisType */: + case 195 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return checkExpression(node).symbol; - case 135 /* ConstructorKeyword */: + case 136 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 173 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 174 /* Constructor */) { return constructorDeclaration.parent.symbol; } return void 0; case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 269 /* ImportDeclaration */ || node.parent.kind === 275 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 270 /* ImportDeclaration */ || node.parent.kind === 276 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( node.parent, /*checkArgumentIsStringLiteralLike*/ false @@ -82434,19 +82491,19 @@ case 8 /* NumericLiteral */: const objectType = isElementAccessExpression(parent2) ? parent2.argumentExpression === node ? getTypeOfExpression(parent2.expression) : void 0 : isLiteralTypeNode(parent2) && isIndexedAccessTypeNode(grandParent) ? getTypeFromTypeNode(grandParent.objectType) : void 0; return objectType && getPropertyOfType(objectType, escapeLeadingUnderscores(node.text)); - case 88 /* DefaultKeyword */: - case 98 /* FunctionKeyword */: + case 89 /* DefaultKeyword */: + case 99 /* FunctionKeyword */: case 38 /* EqualsGreaterThanToken */: - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 202 /* ImportType */: + case 203 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; - case 100 /* ImportKeyword */: - case 103 /* NewKeyword */: + case 101 /* ImportKeyword */: + case 104 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return checkExpression(node).symbol; default: return void 0; @@ -82462,7 +82519,7 @@ return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 300 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 301 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); } return void 0; @@ -82534,16 +82591,16 @@ return errorType; } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 207 /* ObjectLiteralExpression */ || expr.kind === 206 /* ArrayLiteralExpression */); - if (expr.parent.kind === 247 /* ForOfStatement */) { + Debug.assert(expr.kind === 208 /* ObjectLiteralExpression */ || expr.kind === 207 /* ArrayLiteralExpression */); + if (expr.parent.kind === 248 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 223 /* BinaryExpression */) { + if (expr.parent.kind === 224 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 299 /* PropertyAssignment */) { + if (expr.parent.kind === 300 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -82576,7 +82633,7 @@ case 8 /* NumericLiteral */: case 10 /* StringLiteral */: return getStringLiteralType(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -82671,7 +82728,7 @@ } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 308 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 309 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -82701,7 +82758,7 @@ return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 295 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 296 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -82729,7 +82786,7 @@ /*lookInLabeledStatements*/ false ); - const inLoopBodyBlock = container.kind === 238 /* Block */ && isIterationStatement( + const inLoopBodyBlock = container.kind === 239 /* Block */ && isIterationStatement( container.parent, /*lookInLabeledStatements*/ false @@ -82769,25 +82826,25 @@ function isValueAliasDeclaration(node) { Debug.assert(!compilerOptions.verbatimModuleSyntax); switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfDeclaration(node)); - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: const symbol = getSymbolOfDeclaration(node); return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return node.expression && node.expression.kind === 79 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfDeclaration(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 308 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 309 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node)); @@ -82878,15 +82935,15 @@ } function canHaveConstantValue(node) { switch (node.kind) { - case 302 /* EnumMember */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 303 /* EnumMember */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 302 /* EnumMember */) { + if (node.kind === 303 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -82990,7 +83047,7 @@ function createTypeOfDeclaration(declarationIn, enclosingDeclaration, flags, tracker, addUndefined) { const declaration = getParseTreeNode(declarationIn, isVariableLikeOrAccessor); if (!declaration) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const symbol = getSymbolOfDeclaration(declaration); let type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? getWidenedLiteralType(getTypeOfSymbol(symbol)) : errorType; @@ -83005,7 +83062,7 @@ function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn, enclosingDeclaration, flags, tracker) { const signatureDeclaration = getParseTreeNode(signatureDeclarationIn, isFunctionLike); if (!signatureDeclaration) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const signature = getSignatureFromDeclaration(signatureDeclaration); return nodeBuilder.typeToTypeNode(getReturnTypeOfSignature(signature), enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); @@ -83013,7 +83070,7 @@ function createTypeOfExpression(exprIn, enclosingDeclaration, flags, tracker) { const expr = getParseTreeNode(exprIn, isExpression); if (!expr) { - return factory.createToken(131 /* AnyKeyword */); + return factory.createToken(132 /* AnyKeyword */); } const type = getWidenedType(getRegularTypeOfExpression(expr)); return nodeBuilder.typeToTypeNode(type, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); @@ -83196,12 +83253,12 @@ getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 175 /* SetAccessor */ ? 174 /* GetAccessor */ : 175 /* SetAccessor */; + const otherKind = accessor.kind === 176 /* SetAccessor */ ? 175 /* GetAccessor */ : 176 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 175 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 174 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 176 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 175 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -83222,7 +83279,7 @@ }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 308 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 309 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfDeclaration(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -83257,18 +83314,18 @@ return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 230 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 294 /* HeritageClause */; + return node.parent && node.parent.kind === 231 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 295 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 164 /* ComputedPropertyName */) { + if (node.parent.kind === 165 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 208 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 209 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -83311,7 +83368,7 @@ break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 308 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 309 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -83336,7 +83393,7 @@ } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 264 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 265 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker( specifier, specifier, @@ -83346,7 +83403,7 @@ if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 308 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 309 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -83632,12 +83689,12 @@ for (const modifier of node.modifiers) { if (isDecorator(modifier)) { if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - if (node.kind === 171 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { + if (node.kind === 172 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); } - } else if (legacyDecorators && (node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */)) { + } else if (legacyDecorators && (node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */)) { const accessors = getAllAccessorDeclarations(node.parent.members, node); if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -83666,30 +83723,30 @@ } firstDecorator != null ? firstDecorator : firstDecorator = modifier; } else { - if (modifier.kind !== 146 /* ReadonlyKeyword */) { - if (node.kind === 168 /* PropertySignature */ || node.kind === 170 /* MethodSignature */) { + if (modifier.kind !== 147 /* ReadonlyKeyword */) { + if (node.kind === 169 /* PropertySignature */ || node.kind === 171 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 178 /* IndexSignature */ && (modifier.kind !== 124 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 179 /* IndexSignature */ && (modifier.kind !== 125 /* StaticKeyword */ || !isClassLike(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); } } - if (modifier.kind !== 101 /* InKeyword */ && modifier.kind !== 145 /* OutKeyword */ && modifier.kind !== 85 /* ConstKeyword */) { - if (node.kind === 165 /* TypeParameter */) { + if (modifier.kind !== 102 /* InKeyword */ && modifier.kind !== 146 /* OutKeyword */ && modifier.kind !== 86 /* ConstKeyword */) { + if (node.kind === 166 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { - case 85 /* ConstKeyword */: - if (node.kind !== 263 /* EnumDeclaration */ && node.kind !== 165 /* TypeParameter */) { - return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(85 /* ConstKeyword */)); + case 86 /* ConstKeyword */: + if (node.kind !== 264 /* EnumDeclaration */ && node.kind !== 166 /* TypeParameter */) { + return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(86 /* ConstKeyword */)); } const parent2 = node.parent; - if (node.kind === 165 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { + if (node.kind === 166 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind)); } break; - case 161 /* OverrideKeyword */: + case 162 /* OverrideKeyword */: if (flags & 16384 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); } else if (flags & 2 /* Ambient */) { @@ -83704,9 +83761,9 @@ flags |= 16384 /* Override */; lastOverride = modifier; break; - case 123 /* PublicKeyword */: - case 122 /* ProtectedKeyword */: - case 121 /* PrivateKeyword */: + case 124 /* PublicKeyword */: + case 123 /* ProtectedKeyword */: + case 122 /* PrivateKeyword */: const text = visibilityToString(modifierToFlag(modifier.kind)); if (flags & 28 /* AccessibilityModifier */) { return grammarErrorOnNode(modifier, Diagnostics.Accessibility_modifier_already_seen); @@ -83720,10 +83777,10 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); } else if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); - } else if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + } else if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { - if (modifier.kind === 121 /* PrivateKeyword */) { + if (modifier.kind === 122 /* PrivateKeyword */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); @@ -83733,7 +83790,7 @@ } flags |= modifierToFlag(modifier.kind); break; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: if (flags & 32 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static"); } else if (flags & 64 /* Readonly */) { @@ -83742,9 +83799,9 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); - } else if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + } else if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); @@ -83754,31 +83811,31 @@ flags |= 32 /* Static */; lastStatic = modifier; break; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "accessor"); } else if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); } else if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); - } else if (node.kind !== 169 /* PropertyDeclaration */) { + } else if (node.kind !== 170 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; break; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 168 /* PropertySignature */ && node.kind !== 178 /* IndexSignature */ && node.kind !== 166 /* Parameter */) { + } else if (node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 169 /* PropertySignature */ && node.kind !== 179 /* IndexSignature */ && node.kind !== 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); } flags |= 64 /* Readonly */; break; - case 93 /* ExportKeyword */: - if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 262 /* TypeAliasDeclaration */ && node.kind !== 261 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later - node.kind !== 264 /* ModuleDeclaration */ && node.parent.kind === 308 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + case 94 /* ExportKeyword */: + if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 263 /* TypeAliasDeclaration */ && node.kind !== 262 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later + node.kind !== 265 /* ModuleDeclaration */ && node.parent.kind === 309 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } if (flags & 1 /* Export */) { @@ -83791,14 +83848,14 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1 /* Export */; break; - case 88 /* DefaultKeyword */: - const container = node.parent.kind === 308 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 264 /* ModuleDeclaration */ && !isAmbientModule(container)) { + case 89 /* DefaultKeyword */: + const container = node.parent.kind === 309 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 265 /* ModuleDeclaration */ && !isAmbientModule(container)) { return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); } else if (!(flags & 1 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); @@ -83807,7 +83864,7 @@ } flags |= 1024 /* Default */; break; - case 136 /* DeclareKeyword */: + case 137 /* DeclareKeyword */: if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "declare"); } else if (flags & 512 /* Async */) { @@ -83816,9 +83873,9 @@ return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 265 /* ModuleBlock */) { + } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 266 /* ModuleBlock */) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); @@ -83828,15 +83885,15 @@ flags |= 2 /* Ambient */; lastDeclare = modifier; break; - case 126 /* AbstractKeyword */: + case 127 /* AbstractKeyword */: if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 260 /* ClassDeclaration */ && node.kind !== 182 /* ConstructorType */) { - if (node.kind !== 171 /* MethodDeclaration */ && node.kind !== 169 /* PropertyDeclaration */ && node.kind !== 174 /* GetAccessor */ && node.kind !== 175 /* SetAccessor */) { + if (node.kind !== 261 /* ClassDeclaration */ && node.kind !== 183 /* ConstructorType */) { + if (node.kind !== 172 /* MethodDeclaration */ && node.kind !== 170 /* PropertyDeclaration */ && node.kind !== 175 /* GetAccessor */ && node.kind !== 176 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 260 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 261 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { return grammarErrorOnNode(modifier, Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32 /* Static */) { @@ -83860,12 +83917,12 @@ } flags |= 256 /* Abstract */; break; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); } else if (flags & 2 /* Ambient */ || node.parent.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (node.kind === 166 /* Parameter */) { + } else if (node.kind === 167 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -83874,11 +83931,11 @@ flags |= 512 /* Async */; lastAsync = modifier; break; - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - const inOutFlag = modifier.kind === 101 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; - const inOutText = modifier.kind === 101 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 165 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + const inOutFlag = modifier.kind === 102 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; + const inOutText = modifier.kind === 102 /* InKeyword */ ? "in" : "out"; + if (node.kind !== 166 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); } if (flags & inOutFlag) { @@ -83892,7 +83949,7 @@ } } } - if (node.kind === 173 /* Constructor */) { + if (node.kind === 174 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -83903,11 +83960,11 @@ return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 269 /* ImportDeclaration */ || node.kind === 268 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 270 /* ImportDeclaration */ || node.kind === 269 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 166 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 167 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 166 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 167 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -83927,47 +83984,47 @@ } function findFirstIllegalModifier(node) { switch (node.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 264 /* ModuleDeclaration */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 166 /* Parameter */: - case 165 /* TypeParameter */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 265 /* ModuleDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 167 /* Parameter */: + case 166 /* TypeParameter */: return void 0; - case 172 /* ClassStaticBlockDeclaration */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 267 /* NamespaceExportDeclaration */: - case 279 /* MissingDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 268 /* NamespaceExportDeclaration */: + case 280 /* MissingDeclaration */: return find(node.modifiers, isModifier); default: - if (node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + if (node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { return void 0; } switch (node.kind) { - case 259 /* FunctionDeclaration */: - return findFirstModifierExcept(node, 132 /* AsyncKeyword */); - case 260 /* ClassDeclaration */: - case 182 /* ConstructorType */: - return findFirstModifierExcept(node, 126 /* AbstractKeyword */); - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 240 /* VariableStatement */: - case 262 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + return findFirstModifierExcept(node, 133 /* AsyncKeyword */); + case 261 /* ClassDeclaration */: + case 183 /* ConstructorType */: + return findFirstModifierExcept(node, 127 /* AbstractKeyword */); + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 241 /* VariableStatement */: + case 263 /* TypeAliasDeclaration */: return find(node.modifiers, isModifier); - case 263 /* EnumDeclaration */: - return findFirstModifierExcept(node, 85 /* ConstKeyword */); + case 264 /* EnumDeclaration */: + return findFirstModifierExcept(node, 86 /* ConstKeyword */); default: Debug.assertNever(node); } @@ -83982,10 +84039,10 @@ } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -84157,7 +84214,7 @@ let seenImplementsClause = false; if (!checkGrammarModifiers(node) && node.heritageClauses) { for (const heritageClause of node.heritageClauses) { - if (heritageClause.token === 94 /* ExtendsKeyword */) { + if (heritageClause.token === 95 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); } @@ -84169,7 +84226,7 @@ } seenExtendsClause = true; } else { - Debug.assert(heritageClause.token === 117 /* ImplementsKeyword */); + Debug.assert(heritageClause.token === 118 /* ImplementsKeyword */); if (seenImplementsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.implements_clause_already_seen); } @@ -84183,13 +84240,13 @@ let seenExtendsClause = false; if (node.heritageClauses) { for (const heritageClause of node.heritageClauses) { - if (heritageClause.token === 94 /* ExtendsKeyword */) { + if (heritageClause.token === 95 /* ExtendsKeyword */) { if (seenExtendsClause) { return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); } seenExtendsClause = true; } else { - Debug.assert(heritageClause.token === 117 /* ImplementsKeyword */); + Debug.assert(heritageClause.token === 118 /* ImplementsKeyword */); return grammarErrorOnFirstToken(heritageClause, Diagnostics.Interface_declaration_cannot_have_implements_clause); } checkGrammarHeritageClause(heritageClause); @@ -84198,11 +84255,11 @@ return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 164 /* ComputedPropertyName */) { + if (node.kind !== 165 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 223 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { + if (computedPropertyName.expression.kind === 224 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } return false; @@ -84210,7 +84267,7 @@ function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */ || node.kind === 171 /* MethodDeclaration */ + node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */ || node.kind === 172 /* MethodDeclaration */ ); if (node.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); @@ -84229,7 +84286,7 @@ function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = /* @__PURE__ */ new Map(); for (const prop of node.properties) { - if (prop.kind === 301 /* SpreadAssignment */) { + if (prop.kind === 302 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -84239,10 +84296,10 @@ continue; } const name = prop.name; - if (name.kind === 164 /* ComputedPropertyName */) { + if (name.kind === 165 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 300 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 301 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { grammarErrorOnNode(prop.equalsToken, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern); } if (name.kind === 80 /* PrivateIdentifier */) { @@ -84250,7 +84307,7 @@ } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 132 /* AsyncKeyword */ || prop.kind !== 171 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 172 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -84263,8 +84320,8 @@ } let currentKind; switch (prop.kind) { - case 300 /* ShorthandPropertyAssignment */: - case 299 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 8 /* NumericLiteral */) { @@ -84272,13 +84329,13 @@ } currentKind = 4 /* PropertyAssignment */; break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -84315,7 +84372,7 @@ checkGrammarTypeArguments(node, node.typeArguments); const seen = /* @__PURE__ */ new Map(); for (const attr of node.attributes.properties) { - if (attr.kind === 290 /* JsxSpreadAttribute */) { + if (attr.kind === 291 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -84324,7 +84381,7 @@ } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 291 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 292 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -84359,7 +84416,7 @@ if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 247 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 248 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { @@ -84399,7 +84456,7 @@ if (!hasParseDiagnostics(sourceFile)) { const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); const func = getContainingFunction(forInOrOfStatement); - if (func && func.kind !== 173 /* Constructor */) { + if (func && func.kind !== 174 /* Constructor */) { Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); @@ -84415,7 +84472,7 @@ grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 258 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 259 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -84423,16 +84480,16 @@ return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } const firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - const diagnostic = forInOrOfStatement.kind === 246 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + const diagnostic = forInOrOfStatement.kind === 247 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); } } @@ -84440,7 +84497,7 @@ return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 184 /* TypeLiteral */ && accessor.parent.kind !== 261 /* InterfaceDeclaration */) { + if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 185 /* TypeLiteral */ && accessor.parent.kind !== 262 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -84455,7 +84512,7 @@ if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 184 /* TypeLiteral */ || accessor.parent.kind === 261 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 185 /* TypeLiteral */ || accessor.parent.kind === 262 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -84465,10 +84522,10 @@ if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 174 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 175 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 175 /* SetAccessor */) { + if (accessor.kind === 176 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -84486,17 +84543,17 @@ return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 174 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 175 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 174 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 175 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } function checkGrammarTypeOperatorNode(node) { - if (node.operator === 156 /* UniqueKeyword */) { - if (node.type.kind !== 153 /* SymbolKeyword */) { - return grammarErrorOnNode(node.type, Diagnostics._0_expected, tokenToString(153 /* SymbolKeyword */)); + if (node.operator === 157 /* UniqueKeyword */) { + if (node.type.kind !== 154 /* SymbolKeyword */) { + return grammarErrorOnNode(node.type, Diagnostics._0_expected, tokenToString(154 /* SymbolKeyword */)); } let parent2 = walkUpParenthesizedTypes(node.parent); if (isInJSFile(parent2) && isJSDocTypeExpression(parent2)) { @@ -84506,7 +84563,7 @@ } } switch (parent2.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: const decl = parent2; if (decl.name.kind !== 79 /* Identifier */) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); @@ -84518,12 +84575,12 @@ return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (!isStatic(parent2) || !hasEffectiveReadonlyModifier(parent2)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); } break; - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (!hasSyntacticModifier(parent2, 64 /* Readonly */)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } @@ -84531,9 +84588,9 @@ default: return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } - } else if (node.operator === 146 /* ReadonlyKeyword */) { - if (node.type.kind !== 185 /* ArrayType */ && node.type.kind !== 186 /* TupleType */) { - return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(153 /* SymbolKeyword */)); + } else if (node.operator === 147 /* ReadonlyKeyword */) { + if (node.type.kind !== 186 /* ArrayType */ && node.type.kind !== 187 /* TupleType */) { + return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(154 /* SymbolKeyword */)); } } } @@ -84546,9 +84603,9 @@ if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 171 /* MethodDeclaration */) { - if (node.parent.kind === 207 /* ObjectLiteralExpression */) { - if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 132 /* AsyncKeyword */)) { + if (node.kind === 172 /* MethodDeclaration */) { + if (node.parent.kind === 208 /* ObjectLiteralExpression */) { + if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 133 /* AsyncKeyword */)) { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) { return true; @@ -84568,12 +84625,12 @@ } if (node.flags & 16777216 /* Ambient */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.kind === 171 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 172 /* MethodDeclaration */ && !node.body) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } - } else if (node.parent.kind === 261 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 262 /* InterfaceDeclaration */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.parent.kind === 184 /* TypeLiteral */) { + } else if (node.parent.kind === 185 /* TypeLiteral */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } } @@ -84584,9 +84641,9 @@ return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 248 /* ContinueStatement */ && !isIterationStatement( + const isMisplacedContinueLabel = node.kind === 249 /* ContinueStatement */ && !isIterationStatement( current.statement, /*lookInLabeledStatement*/ true @@ -84597,8 +84654,8 @@ return false; } break; - case 252 /* SwitchStatement */: - if (node.kind === 249 /* BreakStatement */ && !node.label) { + case 253 /* SwitchStatement */: + if (node.kind === 250 /* BreakStatement */ && !node.label) { return false; } break; @@ -84615,10 +84672,10 @@ current = current.parent; } if (node.label) { - const message = node.kind === 249 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + const message = node.kind === 250 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - const message = node.kind === 249 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + const message = node.kind === 250 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } } @@ -84638,10 +84695,10 @@ } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 221 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 222 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 221 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; + return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 222 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -84651,7 +84708,7 @@ function checkAmbientInitializer(node) { const initializer = node.initializer; if (initializer) { - const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 110 /* TrueKeyword */ || initializer.kind === 95 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); + const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 111 /* TrueKeyword */ || initializer.kind === 96 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { @@ -84663,7 +84720,7 @@ } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 246 /* ForInStatement */ && node.parent.parent.kind !== 247 /* ForOfStatement */) { + if (node.parent.parent.kind !== 247 /* ForInStatement */ && node.parent.parent.kind !== 248 /* ForOfStatement */) { if (node.flags & 16777216 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { @@ -84675,7 +84732,7 @@ } } } - if (node.exclamationToken && (node.parent.parent.kind !== 240 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 241 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } @@ -84727,15 +84784,15 @@ } function allowLetAndConstDeclarations(parent2) { switch (parent2.kind) { - case 242 /* IfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 243 /* IfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: return false; - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return allowLetAndConstDeclarations(parent2.parent); } return true; @@ -84752,12 +84809,12 @@ function checkGrammarMetaProperty(node) { const escapedText = node.name.escapedText; switch (node.keywordToken) { - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: if (escapedText !== "target") { return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.escapedText, tokenToString(node.keywordToken), "target"); } break; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: if (escapedText !== "meta") { return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.escapedText, tokenToString(node.keywordToken), "meta"); } @@ -84815,7 +84872,7 @@ } } function checkGrammarProperty(node) { - if (isComputedPropertyName(node.name) && isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 101 /* InKeyword */) { + if (isComputedPropertyName(node.name) && isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 102 /* InKeyword */) { return grammarErrorOnNode(node.parent.members[0], Diagnostics.A_mapped_type_may_not_declare_properties_or_methods); } if (isClassLike(node.parent)) { @@ -84834,7 +84891,7 @@ if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 261 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 262 /* InterfaceDeclaration */) { if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } @@ -84860,14 +84917,14 @@ } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 261 /* InterfaceDeclaration */ || node.kind === 262 /* TypeAliasDeclaration */ || node.kind === 269 /* ImportDeclaration */ || node.kind === 268 /* ImportEqualsDeclaration */ || node.kind === 275 /* ExportDeclaration */ || node.kind === 274 /* ExportAssignment */ || node.kind === 267 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 262 /* InterfaceDeclaration */ || node.kind === 263 /* TypeAliasDeclaration */ || node.kind === 270 /* ImportDeclaration */ || node.kind === 269 /* ImportEqualsDeclaration */ || node.kind === 276 /* ExportDeclaration */ || node.kind === 275 /* ExportAssignment */ || node.kind === 268 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (const decl of file.statements) { - if (isDeclaration(decl) || decl.kind === 240 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 241 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -84884,7 +84941,7 @@ if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 238 /* Block */ || node.parent.kind === 265 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { + if (node.parent.kind === 239 /* Block */ || node.parent.kind === 266 /* ModuleBlock */ || node.parent.kind === 309 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -84899,9 +84956,9 @@ let diagnosticMessage; if (languageVersion >= 1 /* ES5 */) { diagnosticMessage = Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 198 /* LiteralType */)) { + } else if (isChildOfNodeWithKind(node, 199 /* LiteralType */)) { diagnosticMessage = Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 302 /* EnumMember */)) { + } else if (isChildOfNodeWithKind(node, 303 /* EnumMember */)) { diagnosticMessage = Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { @@ -84974,7 +85031,7 @@ if (node.isTypeOnly && node.name && node.namedBindings) { return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); } - if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 272 /* NamedImports */) { + if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 273 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -84984,7 +85041,7 @@ if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 273 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + specifier.kind === 274 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement ); } }); @@ -85047,10 +85104,10 @@ } function findMostOverlappyType(source, unionTarget) { let bestMatch; - if (!(source.flags & (134348796 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { + if (!(source.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { let matchingCount = 0; for (const target of unionTarget.types) { - if (!(target.flags & (134348796 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { + if (!(target.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { const overlap = getIntersectionType([getIndexType(source), getIndexType(target)]); if (overlap.flags & 4194304 /* Index */) { return target; @@ -85068,7 +85125,7 @@ } function filterPrimitivesIfContainsNonPrimitive(type) { if (maybeTypeOfKind(type, 67108864 /* NonPrimitive */)) { - const result = filterType(type, (t) => !(t.flags & 134348796 /* Primitive */)); + const result = filterType(type, (t) => !(t.flags & 402784252 /* Primitive */)); if (!(result.flags & 131072 /* Never */)) { return result; } @@ -85103,12 +85160,12 @@ return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 259 /* FunctionDeclaration */ && declaration.kind !== 171 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 260 /* FunctionDeclaration */ && declaration.kind !== 172 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -85666,21 +85723,21 @@ "use strict"; init_ts2(); visitEachChildTable = { - [163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [164 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [165 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [165 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -85689,7 +85746,7 @@ nodeVisitor(node.default, visitor, isTypeNode) ); }, - [166 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [167 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85700,14 +85757,14 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [168 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -85716,7 +85773,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [170 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { var _a2, _b; return context.factory.updatePropertyDeclaration( node, @@ -85728,7 +85785,7 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [170 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -85739,7 +85796,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85752,7 +85809,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [173 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [174 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85760,7 +85817,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [174 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [175 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85770,7 +85827,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85779,7 +85836,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [172 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [173 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -85787,7 +85844,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -85795,7 +85852,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [177 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -85803,7 +85860,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [178 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -85812,7 +85869,7 @@ ); }, // Types - [179 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -85820,14 +85877,14 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [181 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -85835,7 +85892,7 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -85844,56 +85901,56 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [185 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [187 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [189 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [190 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [190 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [191 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -85902,13 +85959,13 @@ Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [193 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -85918,14 +85975,14 @@ node.isTypeOf ); }, - [298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [200 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -85934,26 +85991,26 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [194 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [198 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -85964,20 +86021,20 @@ nodesVisitor(node.members, visitor, isTypeElement) ); }, - [198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [202 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -85985,19 +86042,19 @@ ); }, // Binding patterns - [203 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [204 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [204 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [205 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [206 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -86007,19 +86064,19 @@ ); }, // Expression - [206 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [207 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [209 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86031,7 +86088,7 @@ Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [210 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86043,7 +86100,7 @@ Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [211 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86057,7 +86114,7 @@ nodesVisitor(node.arguments, visitor, isExpression) ); }, - [211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [212 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86065,7 +86122,7 @@ nodesVisitor(node.arguments, visitor, isExpression) ); }, - [212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [213 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -86073,20 +86130,20 @@ Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [214 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [216 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86098,7 +86155,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [216 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [217 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86109,43 +86166,43 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [219 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [220 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [224 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -86153,7 +86210,7 @@ Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [225 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -86163,27 +86220,27 @@ Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [229 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86193,28 +86250,28 @@ nodesVisitor(node.members, visitor, isClassElement) ); }, - [230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [232 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -86223,14 +86280,14 @@ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86238,26 +86295,26 @@ ); }, // Element - [238 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [239 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [240 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [241 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [242 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [243 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86265,21 +86322,21 @@ nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [243 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [245 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -86288,7 +86345,7 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -86296,7 +86353,7 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [248 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -86305,52 +86362,52 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [249 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [250 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -86358,7 +86415,7 @@ nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [258 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -86367,13 +86424,13 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [258 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [259 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [259 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [260 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86385,7 +86442,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [260 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [261 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86395,7 +86452,7 @@ nodesVisitor(node.members, visitor, isClassElement) ); }, - [261 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [262 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86405,7 +86462,7 @@ nodesVisitor(node.members, visitor, isTypeElement) ); }, - [262 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [263 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86414,7 +86471,7 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86422,7 +86479,7 @@ nodesVisitor(node.members, visitor, isEnumMember) ); }, - [264 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86430,25 +86487,25 @@ nodeVisitor(node.body, visitor, isModuleBody) ); }, - [265 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [266 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [266 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [267 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [269 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86457,7 +86514,7 @@ Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [270 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86466,21 +86523,21 @@ nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [296 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [297 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [298 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -86488,25 +86545,25 @@ nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [273 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [273 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -86514,14 +86571,14 @@ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [275 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86531,13 +86588,13 @@ nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [276 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [277 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [278 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -86546,14 +86603,14 @@ ); }, // Module references - [280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -86561,7 +86618,7 @@ Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -86569,7 +86626,7 @@ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -86577,13 +86634,13 @@ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -86591,52 +86648,52 @@ Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [289 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [290 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [293 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [294 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [294 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [295 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [295 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -86644,28 +86701,28 @@ ); }, // Property assignments - [299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -86673,20 +86730,20 @@ ); }, // Top-level nodes - [308 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [309 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [357 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [358 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -87287,7 +87344,7 @@ function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 308 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 309 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -87330,7 +87387,7 @@ let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -87339,12 +87396,12 @@ hasImportDefault = true; } break; - case 268 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 280 /* ExternalModuleReference */) { + case 269 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 281 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -87367,19 +87424,19 @@ addExportedNamesForExportDeclaration(node); } break; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames); } } break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -87396,7 +87453,7 @@ } } break; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -87537,7 +87594,7 @@ return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 169 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 170 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -87574,15 +87631,15 @@ } function getAllDecoratorsOfClassElement(member, parent2, useLegacyDecorators) { switch (member.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (!useLegacyDecorators) { return getAllDecoratorsOfMethod(member); } return getAllDecoratorsOfAccessors(member, parent2); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -88228,8 +88285,8 @@ const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -88240,14 +88297,14 @@ let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 309 /* Bundle */) { + if (node.kind === 310 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 311 /* InputFiles */) { + if (prepend.kind === 312 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -88278,22 +88335,22 @@ } function onBeforeVisitNode(node) { switch (node.kind) { - case 308 /* SourceFile */: - case 266 /* CaseBlock */: - case 265 /* ModuleBlock */: - case 238 /* Block */: + case 309 /* SourceFile */: + case 267 /* CaseBlock */: + case 266 /* ModuleBlock */: + case 239 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 260 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 261 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -88312,10 +88369,10 @@ } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -88330,13 +88387,13 @@ return node; } switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -88346,7 +88403,7 @@ return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 275 /* ExportDeclaration */ || node.kind === 269 /* ImportDeclaration */ || node.kind === 270 /* ImportClause */ || node.kind === 268 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (node.kind === 276 /* ExportDeclaration */ || node.kind === 270 /* ImportDeclaration */ || node.kind === 271 /* ImportClause */ || node.kind === 269 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 281 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -88358,21 +88415,21 @@ } function classElementVisitorWorker(node, parent2) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructor(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent2); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return node; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -88383,15 +88440,15 @@ } function objectLiteralElementVisitorWorker(node, parent2) { switch (node.kind) { - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return visitor(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); default: return Debug.failBadSyntaxKind(node); @@ -88408,7 +88465,7 @@ return void 0; if (modifierToFlag(node.kind) & 117086 /* TypeScriptModifier */) { return void 0; - } else if (currentNamespace && node.kind === 93 /* ExportKeyword */) { + } else if (currentNamespace && node.kind === 94 /* ExportKeyword */) { return void 0; } return node; @@ -88418,108 +88475,108 @@ return factory2.createNotEmittedStatement(node); } switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return currentNamespace ? void 0 : node; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 126 /* AbstractKeyword */: - case 161 /* OverrideKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 146 /* ReadonlyKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - case 185 /* ArrayType */: - case 186 /* TupleType */: - case 187 /* OptionalType */: - case 188 /* RestType */: - case 184 /* TypeLiteral */: - case 179 /* TypePredicate */: - case 165 /* TypeParameter */: - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 134 /* BooleanKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 144 /* NeverKeyword */: - case 114 /* VoidKeyword */: - case 153 /* SymbolKeyword */: - case 182 /* ConstructorType */: - case 181 /* FunctionType */: - case 183 /* TypeQuery */: - case 180 /* TypeReference */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 191 /* ConditionalType */: - case 193 /* ParenthesizedType */: - case 194 /* ThisType */: - case 195 /* TypeOperator */: - case 196 /* IndexedAccessType */: - case 197 /* MappedType */: - case 198 /* LiteralType */: - case 178 /* IndexSignature */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 127 /* AbstractKeyword */: + case 162 /* OverrideKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 147 /* ReadonlyKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + case 186 /* ArrayType */: + case 187 /* TupleType */: + case 188 /* OptionalType */: + case 189 /* RestType */: + case 185 /* TypeLiteral */: + case 180 /* TypePredicate */: + case 166 /* TypeParameter */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 135 /* BooleanKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 145 /* NeverKeyword */: + case 115 /* VoidKeyword */: + case 154 /* SymbolKeyword */: + case 183 /* ConstructorType */: + case 182 /* FunctionType */: + case 184 /* TypeQuery */: + case 181 /* TypeReference */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 192 /* ConditionalType */: + case 194 /* ParenthesizedType */: + case 195 /* ThisType */: + case 196 /* TypeOperator */: + case 197 /* IndexedAccessType */: + case 198 /* MappedType */: + case 199 /* LiteralType */: + case 179 /* IndexSignature */: return void 0; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return void 0; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return visitHeritageClause(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 173 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return visitArrowFunction(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: return visitAssertionExpression(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return visitNonNullExpression(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -88556,7 +88613,7 @@ ))) facts |= 1 /* HasStaticInitializedProperties */; const extendsClauseElement = getEffectiveBaseTypeNode(node); - if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */) + if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */) facts |= 64 /* IsDerivedClass */; if (classOrConstructorParameterIsDecorated(legacyDecorators, node)) facts |= 2 /* HasClassOrConstructorParameterDecorators */; @@ -88852,19 +88909,19 @@ } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 169 /* PropertyDeclaration */; + return kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 170 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 171 /* MethodDeclaration */; + return node.kind === 172 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; } return false; @@ -88896,7 +88953,7 @@ return Debug.checkDefined(visitNode(name, visitor, isPropertyName)); } function visitHeritageClause(node) { - if (node.token === 117 /* ImplementsKeyword */) { + if (node.token === 118 /* ImplementsKeyword */) { return void 0; } return visitEachChild(node, visitor, context); @@ -89492,12 +89549,12 @@ true ) ) - ], currentLexicalScope.kind === 308 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) + ], currentLexicalScope.kind === 309 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) ); setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 263 /* EnumDeclaration */) { + if (node.kind === 264 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -89610,7 +89667,7 @@ let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 265 /* ModuleBlock */) { + if (node.body.kind === 266 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -89641,13 +89698,13 @@ true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 265 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 266 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 264 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 265 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -89682,7 +89739,7 @@ ) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 271 /* NamespaceImport */) { + if (node.kind === 272 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.verbatimModuleSyntax || compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -89880,15 +89937,15 @@ if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(264 /* ModuleDeclaration */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(265 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 264 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 265 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 263 /* EnumDeclaration */; + return getOriginalNode(node).kind === 264 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -89933,9 +89990,9 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -89950,8 +90007,8 @@ /*prefixLocals*/ false ); - if (container && container.kind !== 308 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 264 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 263 /* EnumDeclaration */; + if (container && container.kind !== 309 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 265 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 264 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -90059,7 +90116,7 @@ } function modifierVisitor(node) { switch (node.kind) { - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return shouldTransformAutoAccessorsInCurrentClass() ? void 0 : node; default: return tryCast(node, isModifier); @@ -90070,51 +90127,51 @@ return node; } switch (node.kind) { - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return Debug.fail("Use `modifierVisitor` instead."); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression( node, /*referencedName*/ void 0 ); - case 172 /* ClassStaticBlockDeclaration */: - case 169 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: + case 170 /* PropertyDeclaration */: return Debug.fail("Use `classElementVisitor` instead."); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return visitBindingElement(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); case 80 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -90122,20 +90179,20 @@ /*referencedName*/ void 0 ); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, @@ -90152,21 +90209,21 @@ } function namedEvaluationVisitor(node, referencedName) { switch (node.kind) { - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ false, referencedName ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ false, referencedName ); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node, referencedName); default: return visitor(node); @@ -90174,26 +90231,26 @@ } function discardedValueVisitor(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -90207,9 +90264,9 @@ } function heritageClauseVisitor(node) { switch (node.kind) { - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -90217,8 +90274,8 @@ } function assignmentTargetVisitor(node) { switch (node.kind) { - case 207 /* ObjectLiteralExpression */: - case 206 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -90226,29 +90283,29 @@ } function classElementVisitor(node) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, visitMethodOrAccessorDeclaration, node ); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( /*current*/ void 0, visitPropertyDeclaration, node ); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return node; default: return isModifierLike(node) ? modifierVisitor(node) : visitor(node); @@ -90256,7 +90313,7 @@ } function propertyNameVisitor(node) { switch (node.kind) { - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); default: return visitor(node); @@ -90264,10 +90321,10 @@ } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -91444,7 +91501,7 @@ return constructor; } const extendsClauseElement = getEffectiveBaseTypeNode(container); - const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */); + const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */); const parameters = visitParameterList(constructor ? constructor.parameters : void 0, visitor, context); const body = transformConstructorBody(container, constructor, isDerivedClass); if (!body) { @@ -91738,15 +91795,15 @@ function enableSubstitutionForClassStaticThisOrSuperReference() { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; - context.enableSubstitution(108 /* ThisKeyword */); - context.enableEmitNotification(259 /* FunctionDeclaration */); - context.enableEmitNotification(215 /* FunctionExpression */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(169 /* PropertyDeclaration */); - context.enableEmitNotification(164 /* ComputedPropertyName */); + context.enableSubstitution(109 /* ThisKeyword */); + context.enableEmitNotification(260 /* FunctionDeclaration */); + context.enableEmitNotification(216 /* FunctionExpression */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(170 /* PropertyDeclaration */); + context.enableEmitNotification(165 /* ComputedPropertyName */); } } function addInstanceMethodStatements(statements, methods, receiver) { @@ -92120,16 +92177,16 @@ return; } switch (node.kind) { - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) { break; } - case 259 /* FunctionDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - case 169 /* PropertyDeclaration */: { + case 260 /* FunctionDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: { const savedLexicalEnvironment = lexicalEnvironment; const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; lexicalEnvironment = void 0; @@ -92141,7 +92198,7 @@ lexicalEnvironment = savedLexicalEnvironment; return; } - case 164 /* ComputedPropertyName */: { + case 165 /* ComputedPropertyName */: { const savedLexicalEnvironment = lexicalEnvironment; const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; @@ -92165,7 +92222,7 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return substituteThisExpression(node); } return node; @@ -92238,7 +92295,7 @@ return !isGeneratedPrivateIdentifier(node) && node.escapedText === "#constructor"; } function isPrivateIdentifierInExpression(node) { - return isPrivateIdentifier(node.left) && node.operatorToken.kind === 101 /* InKeyword */; + return isPrivateIdentifier(node.left) && node.operatorToken.kind === 102 /* InKeyword */; } var init_classFields = __esm({ "src/compiler/transformers/classFields.ts"() { @@ -92281,15 +92338,15 @@ } function serializeTypeOfNode(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: - case 166 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 167 /* Parameter */: return serializeTypeNode(node.type); - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 171 /* MethodDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 172 /* MethodDeclaration */: return factory2.createIdentifier("Function"); default: return factory2.createVoidZero(); @@ -92316,7 +92373,7 @@ return factory2.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 174 /* GetAccessor */) { + if (container && node.kind === 175 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -92338,76 +92395,76 @@ } node = skipTypeParentheses(node); switch (node.kind) { - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: return factory2.createVoidZero(); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return factory2.createIdentifier("Function"); - case 185 /* ArrayType */: - case 186 /* TupleType */: + case 186 /* ArrayType */: + case 187 /* TupleType */: return factory2.createIdentifier("Array"); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean"); - case 134 /* BooleanKeyword */: + case 135 /* BooleanKeyword */: return factory2.createIdentifier("Boolean"); - case 200 /* TemplateLiteralType */: - case 152 /* StringKeyword */: + case 201 /* TemplateLiteralType */: + case 153 /* StringKeyword */: return factory2.createIdentifier("String"); - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return factory2.createIdentifier("Object"); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); - case 148 /* NumberKeyword */: + case 149 /* NumberKeyword */: return factory2.createIdentifier("Number"); - case 160 /* BigIntKeyword */: + case 161 /* BigIntKeyword */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 153 /* SymbolKeyword */: + case 154 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return serializeTypeReferenceNode(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ true ); - case 189 /* UnionType */: + case 190 /* UnionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ false ); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return serializeUnionOrIntersectionConstituents( [node.trueType, node.falseType], /*isIntersection*/ false ); - case 195 /* TypeOperator */: - if (node.operator === 146 /* ReadonlyKeyword */) { + case 196 /* TypeOperator */: + if (node.operator === 147 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 183 /* TypeQuery */: - case 196 /* IndexedAccessType */: - case 197 /* MappedType */: - case 184 /* TypeLiteral */: - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 194 /* ThisType */: - case 202 /* ImportType */: + case 184 /* TypeQuery */: + case 197 /* IndexedAccessType */: + case 198 /* MappedType */: + case 185 /* TypeLiteral */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 195 /* ThisType */: + case 203 /* ImportType */: break; - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: - case 320 /* JSDocFunctionType */: - case 321 /* JSDocVariadicType */: - case 322 /* JSDocNamepathType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: + case 321 /* JSDocFunctionType */: + case 322 /* JSDocVariadicType */: + case 323 /* JSDocNamepathType */: break; - case 317 /* JSDocNullableType */: - case 318 /* JSDocNonNullableType */: - case 319 /* JSDocOptionalType */: + case 318 /* JSDocNullableType */: + case 319 /* JSDocNonNullableType */: + case 320 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -92419,7 +92476,7 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return factory2.createIdentifier("String"); - case 221 /* PrefixUnaryExpression */: { + case 222 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 8 /* NumericLiteral */: @@ -92433,10 +92490,10 @@ return factory2.createIdentifier("Number"); case 9 /* BigIntLiteral */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: return factory2.createIdentifier("Boolean"); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return factory2.createVoidZero(); default: return Debug.failBadSyntaxKind(node); @@ -92446,20 +92503,20 @@ let serializedType; for (let typeNode of types) { typeNode = skipTypeParentheses(typeNode); - if (typeNode.kind === 144 /* NeverKeyword */) { + if (typeNode.kind === 145 /* NeverKeyword */) { if (isIntersection) return factory2.createVoidZero(); continue; } - if (typeNode.kind === 157 /* UnknownKeyword */) { + if (typeNode.kind === 158 /* UnknownKeyword */) { if (!isIntersection) return factory2.createIdentifier("Object"); continue; } - if (typeNode.kind === 131 /* AnyKeyword */) { + if (typeNode.kind === 132 /* AnyKeyword */) { return factory2.createIdentifier("Object"); } - if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 104 /* NullKeyword */ || typeNode.kind === 155 /* UndefinedKeyword */)) { + if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 156 /* UndefinedKeyword */)) { continue; } const serializedConstituent = serializeTypeNode(typeNode); @@ -92578,7 +92635,7 @@ name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -92634,23 +92691,23 @@ return node; } switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -93209,49 +93266,49 @@ return node; } switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return Debug.fail("Use `modifierVisitor` instead."); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression( node, /*referencedName*/ void 0 ); - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return Debug.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameterDeclaration(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return visitBindingElement(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return visitThisExpression(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ false ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -93259,7 +93316,7 @@ /*referencedName*/ void 0 ); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ @@ -93267,28 +93324,28 @@ /*referencedName*/ void 0 ); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discard*/ false ); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 171 /* MethodDeclaration */: - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: { + case 172 /* MethodDeclaration */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: { enterOther(); const result = visitEachChild(node, fallbackVisitor, context); exitOther(); @@ -93300,7 +93357,7 @@ } function fallbackVisitor(node) { switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; default: return visitor(node); @@ -93308,7 +93365,7 @@ } function modifierVisitor(node) { switch (node.kind) { - case 167 /* Decorator */: + case 168 /* Decorator */: return void 0; default: return node; @@ -93316,17 +93373,17 @@ } function classElementVisitor(node) { switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return visitConstructorDeclaration(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); default: return visitor(node); @@ -93334,21 +93391,21 @@ } function namedEvaluationVisitor(node, referencedName) { switch (node.kind) { - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ false, referencedName ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ false, referencedName ); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node, referencedName); default: return visitor(node); @@ -93356,26 +93413,26 @@ } function discardedValueVisitor(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -93501,7 +93558,7 @@ } } if (classDecorators && containsLexicalSuperInStaticInitializer(node)) { - const extendsClause = getHeritageClause(node.heritageClauses, 94 /* ExtendsKeyword */); + const extendsClause = getHeritageClause(node.heritageClauses, 95 /* ExtendsKeyword */); const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); if (extendsExpression) { @@ -93537,7 +93594,7 @@ return node2; } switch (node2.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: if (!outerThis) { outerThis = factory2.createUniqueName("_outerThis", 16 /* Optimistic */); classDefinitionStatements.unshift(createLet(outerThis, factory2.createThis())); @@ -93557,7 +93614,7 @@ const initializerStatements = prepareConstructor(node, classInfo2); if (initializerStatements) { const extendsClauseElement = getEffectiveBaseTypeNode(node); - const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */); + const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */); const constructorStatements = []; if (isDerivedClass) { const spreadArguments = factory2.createSpreadElement(factory2.createIdentifier("arguments")); @@ -94145,7 +94202,7 @@ setterName = factory2.updateComputedPropertyName(name2, temp); } } - const modifiersWithoutAccessor = visitNodes2(modifiers, (node2) => node2.kind !== 127 /* AccessorKeyword */ ? node2 : void 0, isModifier); + const modifiersWithoutAccessor = visitNodes2(modifiers, (node2) => node2.kind !== 128 /* AccessorKeyword */ ? node2 : void 0, isModifier); const backingField = createAccessorPropertyBackingField(factory2, node, modifiersWithoutAccessor, initializer); setOriginalNode(backingField, node); setEmitFlags(backingField, 3072 /* NoComments */); @@ -94874,36 +94931,36 @@ return node; } switch (node.kind) { - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return void 0; - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return visitAwaitExpression(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 208 /* PropertyAccessExpression */: - if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 106 /* SuperKeyword */) { + case 209 /* PropertyAccessExpression */: + if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 209 /* ElementAccessExpression */: - if (capturedSuperProperties && node.expression.kind === 106 /* SuperKeyword */) { + case 210 /* ElementAccessExpression */: + if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 173 /* Constructor */: + case 174 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -94912,27 +94969,27 @@ function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 238 /* Block */: - case 252 /* SwitchStatement */: - case 266 /* CaseBlock */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: - case 255 /* TryStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 242 /* IfStatement */: - case 251 /* WithStatement */: - case 253 /* LabeledStatement */: + case 239 /* Block */: + case 253 /* SwitchStatement */: + case 267 /* CaseBlock */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: + case 256 /* TryStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 243 /* IfStatement */: + case 252 /* WithStatement */: + case 254 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -95209,7 +95266,7 @@ const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 216 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 217 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = /* @__PURE__ */ new Set(); @@ -95308,15 +95365,15 @@ function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); - context.enableEmitNotification(260 /* ClassDeclaration */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(240 /* VariableStatement */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); + context.enableEmitNotification(261 /* ClassDeclaration */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(241 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -95347,17 +95404,17 @@ } function substituteExpression(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), @@ -95369,7 +95426,7 @@ return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return createSuperElementAccessInAsyncMethod( node.argumentExpression, node @@ -95395,7 +95452,7 @@ } function isSuperContainer(node) { const kind = node.kind; - return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 261 /* ClassDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -95619,7 +95676,7 @@ ); } function visitorNoAsyncModifier(node) { - if (node.kind === 132 /* AsyncKeyword */) { + if (node.kind === 133 /* AsyncKeyword */) { return void 0; } return node; @@ -95641,119 +95698,119 @@ return node; } switch (node.kind) { - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return visitAwaitExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 246 /* ForInStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 247 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return visitVoidExpression(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 208 /* PropertyAccessExpression */: - if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 106 /* SuperKeyword */) { + case 209 /* PropertyAccessExpression */: + if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 209 /* ElementAccessExpression */: - if (capturedSuperProperties && node.expression.kind === 106 /* SuperKeyword */) { + case 210 /* ElementAccessExpression */: + if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -95838,7 +95895,7 @@ function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 247 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 248 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -95849,7 +95906,7 @@ let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 301 /* SpreadAssignment */) { + if (e.kind === 302 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -95857,7 +95914,7 @@ const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 299 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 300 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -95868,7 +95925,7 @@ function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 207 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 208 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -96656,15 +96713,15 @@ function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(209 /* ElementAccessExpression */); - context.enableEmitNotification(260 /* ClassDeclaration */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(240 /* VariableStatement */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(210 /* ElementAccessExpression */); + context.enableEmitNotification(261 /* ClassDeclaration */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(241 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -96695,17 +96752,17 @@ } function substituteExpression(node) { switch (node.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); } return node; } function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), @@ -96717,7 +96774,7 @@ return node; } function substituteElementAccessExpression(node) { - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { return createSuperElementAccessInAsyncMethod( node.argumentExpression, node @@ -96743,7 +96800,7 @@ } function isSuperContainer(node) { const kind = node.kind; - return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 261 /* ClassDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -96794,7 +96851,7 @@ return node; } switch (node.kind) { - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -96839,7 +96896,7 @@ return node; } switch (node.kind) { - case 210 /* CallExpression */: { + case 211 /* CallExpression */: { const updated = visitNonOptionalCallExpression( node, /*captureThisArg*/ @@ -96848,8 +96905,8 @@ Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression( node, @@ -96862,12 +96919,12 @@ return updated; } return visitEachChild(node, visitor, context); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (node.operatorToken.kind === 60 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -96905,7 +96962,7 @@ thisArg = expression; } } - expression = node.kind === 208 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 209 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -96941,12 +96998,12 @@ } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -96972,8 +97029,8 @@ for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -96982,9 +97039,9 @@ thisArg = rightExpression; } } - rightExpression = segment.kind === 208 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 209 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -96992,7 +97049,7 @@ } rightExpression = factory2.createFunctionCallCall( rightExpression, - leftThisArg.kind === 106 /* SuperKeyword */ ? factory2.createThis() : leftThisArg, + leftThisArg.kind === 107 /* SuperKeyword */ ? factory2.createThis() : leftThisArg, visitNodes2(segment.arguments, visitor, isExpression) ); } else { @@ -97342,25 +97399,25 @@ } function visitorWorker(node) { switch (node.kind) { - case 281 /* JsxElement */: + case 282 /* JsxElement */: return visitJsxElement( node, /*isChild*/ false ); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ false ); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ false ); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -97370,21 +97427,21 @@ switch (node.kind) { case 11 /* JsxText */: return visitJsxText(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return visitJsxExpression(node); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return visitJsxElement( node, /*isChild*/ true ); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ true ); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ @@ -97610,7 +97667,7 @@ const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 291 /* JsxExpression */) { + if (node.kind === 292 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -97684,7 +97741,7 @@ return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 281 /* JsxElement */) { + if (node.kind === 282 /* JsxElement */) { return getTagName(node.openingElement); } else { const name = node.tagName; @@ -97990,7 +98047,7 @@ return node; } switch (node.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -98124,7 +98181,7 @@ hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 250 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 251 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -98179,7 +98236,7 @@ return node; } function callExpressionVisitor(node) { - if (node.kind === 106 /* SuperKeyword */) { + if (node.kind === 107 /* SuperKeyword */) { return visitSuperKeyword( /*isExpressionOfCall*/ true @@ -98189,87 +98246,87 @@ } function visitorWorker(node, expressionResultIsUnused2) { switch (node.kind) { - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: return void 0; - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return visitClassExpression(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return visitParameter(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return visitArrowFunction(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return visitVariableDeclaration(node); case 79 /* Identifier */: return visitIdentifier(node); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return visitCaseBlock(node); - case 238 /* Block */: + case 239 /* Block */: return visitBlock( node, /*isFunctionBody*/ false ); - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return visitDoOrWhileStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: @@ -98280,33 +98337,33 @@ return visitStringLiteral(node); case 8 /* NumericLiteral */: return visitNumericLiteral(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return visitTemplateExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return visitSpreadElement(node); - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: return visitSuperKeyword( /*isExpressionOfCall*/ false ); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return visitThisKeyword(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return visitMetaProperty(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return visitAccessorDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -98414,13 +98471,13 @@ } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 249 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 250 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump; if (!canUseBreakOrContinue) { let labelMarker; const label = node.label; if (!label) { - if (node.kind === 249 /* BreakStatement */) { + if (node.kind === 250 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -98428,7 +98485,7 @@ labelMarker = "continue"; } } else { - if (node.kind === 249 /* BreakStatement */) { + if (node.kind === 250 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump( convertedLoopState, @@ -98640,7 +98697,7 @@ return block; } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { - const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 104 /* NullKeyword */; + const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 105 /* NullKeyword */; if (!constructor) return createDefaultConstructorBody(node, isDerivedClass); const prologue = []; @@ -98749,14 +98806,14 @@ }; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 250 /* ReturnStatement */) { + if (statement.kind === 251 /* ReturnStatement */) { return true; - } else if (statement.kind === 242 /* IfStatement */) { + } else if (statement.kind === 243 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 238 /* Block */) { + } else if (statement.kind === 239 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -99030,7 +99087,7 @@ return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 216 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 217 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } @@ -99072,27 +99129,27 @@ if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return statements; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 173 /* Constructor */: + case 174 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), "constructor" ); break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), factory2.createBinaryExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), - 102 /* InstanceOfKeyword */, + 103 /* InstanceOfKeyword */, factory2.getLocalName(node) ) ), @@ -99135,21 +99192,21 @@ function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 173 /* Constructor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 173 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -99356,7 +99413,7 @@ const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 259 /* FunctionDeclaration */ || node.kind === 215 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 260 /* FunctionDeclaration */ || node.kind === 216 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -99417,7 +99474,7 @@ multiLine = true; } } else { - Debug.assert(node.kind === 216 /* ArrowFunction */); + Debug.assert(node.kind === 217 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -99643,14 +99700,14 @@ } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -100000,7 +100057,7 @@ let numInitialProperties = -1, hasComputed = false; for (let i = 0; i < properties.length; i++) { const property = properties[i]; - if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 164 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 165 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -100122,15 +100179,15 @@ } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -100182,11 +100239,11 @@ function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 258 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 259 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -100625,20 +100682,20 @@ for (let i = start; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -100764,7 +100821,7 @@ let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (node.kind === 174 /* GetAccessor */) { + if (node.kind === 175 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -100807,7 +100864,7 @@ return visitTypeScriptClassWrapper(node); } const expression = skipOuterExpressions(node.expression); - if (expression.kind === 106 /* SuperKeyword */ || isSuperProperty(expression) || some(node.arguments, isSpreadElement)) { + if (expression.kind === 107 /* SuperKeyword */ || isSuperProperty(expression) || some(node.arguments, isSpreadElement)) { return visitCallExpressionWithPotentialCapturedThisAssignment( node, /*assignToCapturedThis*/ @@ -100927,16 +100984,16 @@ ); } function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { - if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 106 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { + if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 107 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { const { target, thisArg } = factory2.createCallBinding(node.expression, hoistVariableDeclaration); - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { setEmitFlags(thisArg, 8 /* NoSubstitution */); } let resultingCall; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { resultingCall = factory2.createFunctionApplyCall( Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)), - node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), + node.expression.kind === 107 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), transformAndSpreadElements( node.arguments, /*isArgumentList*/ @@ -100951,13 +101008,13 @@ resultingCall = setTextRange( factory2.createFunctionCallCall( Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)), - node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), + node.expression.kind === 107 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), visitNodes2(node.arguments, visitor, isExpression) ), node ); } - if (node.expression.kind === 106 /* SuperKeyword */) { + if (node.expression.kind === 107 /* SuperKeyword */) { const initializer = factory2.createLogicalOr( resultingCall, createActualThis() @@ -101100,7 +101157,7 @@ return hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), "prototype") : factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); } function visitMetaProperty(node) { - if (node.keywordToken === 103 /* NewKeyword */ && node.name.escapedText === "target") { + if (node.keywordToken === 104 /* NewKeyword */ && node.name.escapedText === "target") { hierarchyFacts |= 32768 /* NewTarget */; return factory2.createUniqueName("_newTarget", 16 /* Optimistic */ | 32 /* FileLevel */); } @@ -101127,14 +101184,14 @@ function enableSubstitutionsForCapturedThis() { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; - context.enableSubstitution(108 /* ThisKeyword */); - context.enableEmitNotification(173 /* Constructor */); - context.enableEmitNotification(171 /* MethodDeclaration */); - context.enableEmitNotification(174 /* GetAccessor */); - context.enableEmitNotification(175 /* SetAccessor */); - context.enableEmitNotification(216 /* ArrowFunction */); - context.enableEmitNotification(215 /* FunctionExpression */); - context.enableEmitNotification(259 /* FunctionDeclaration */); + context.enableSubstitution(109 /* ThisKeyword */); + context.enableEmitNotification(174 /* Constructor */); + context.enableEmitNotification(172 /* MethodDeclaration */); + context.enableEmitNotification(175 /* GetAccessor */); + context.enableEmitNotification(176 /* SetAccessor */); + context.enableEmitNotification(217 /* ArrowFunction */); + context.enableEmitNotification(216 /* FunctionExpression */); + context.enableEmitNotification(260 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -101158,10 +101215,10 @@ } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 258 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -101170,7 +101227,7 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return substituteThisKeyword(node); } return node; @@ -101218,19 +101275,19 @@ return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 241 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 242 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 210 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 211 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; - if (!nodeIsSynthesized(callTarget) || callTarget.kind !== 106 /* SuperKeyword */) { + if (!nodeIsSynthesized(callTarget) || callTarget.kind !== 107 /* SuperKeyword */) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 227 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 228 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -101253,24 +101310,24 @@ if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(283 /* JsxOpeningElement */); - context.enableEmitNotification(284 /* JsxClosingElement */); - context.enableEmitNotification(282 /* JsxSelfClosingElement */); + context.enableEmitNotification(284 /* JsxOpeningElement */); + context.enableEmitNotification(285 /* JsxClosingElement */); + context.enableEmitNotification(283 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(208 /* PropertyAccessExpression */); - context.enableSubstitution(299 /* PropertyAssignment */); + context.enableSubstitution(209 /* PropertyAccessExpression */); + context.enableSubstitution(300 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: + case 283 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -101308,7 +101365,7 @@ } function trySubstituteReservedName(name) { const token = identifierToKeywordKind(name); - if (token !== void 0 && token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */) { + if (token !== void 0 && token >= 82 /* FirstReservedWord */ && token <= 117 /* LastReservedWord */) { return setTextRange(factory2.createStringLiteralFromNode(name), name); } return void 0; @@ -101402,13 +101459,13 @@ } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 243 /* DoStatement */: + case 244 /* DoStatement */: return visitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return visitWhileStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -101416,24 +101473,24 @@ } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return visitAccessorDeclaration(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return visitBreakStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return visitContinueStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -101447,23 +101504,23 @@ } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return visitBinaryExpression(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return visitCommaListExpression(node); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return visitConditionalExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return visitYieldExpression(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return visitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -101471,9 +101528,9 @@ } function visitGenerator(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -101658,14 +101715,14 @@ if (containsYield(right)) { let target; switch (left.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), left.name ); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), @@ -101998,35 +102055,35 @@ } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 238 /* Block */: + case 239 /* Block */: return transformAndEmitBlock(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return transformAndEmitIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return transformAndEmitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return transformAndEmitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return transformAndEmitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -102250,7 +102307,7 @@ markLabel(conditionLabel); emitBreakWhenFalse(endLoopLabel, factory2.createLessThan(keysIndex, factory2.createPropertyAccessExpression(keysArray, "length"))); emitAssignment(key, factory2.createElementAccessExpression(keysArray, keysIndex)); - emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key, 101 /* InKeyword */, obj)); + emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key, 102 /* InKeyword */, obj)); let variable; if (isVariableDeclarationList(initializer)) { for (const variable2 of initializer.declarations) { @@ -102378,7 +102435,7 @@ for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 293 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 294 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -102388,7 +102445,7 @@ let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 292 /* CaseClause */) { + if (clause.kind === 293 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -103362,12 +103419,12 @@ const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(210 /* CallExpression */); - context.enableSubstitution(212 /* TaggedTemplateExpression */); + context.enableSubstitution(211 /* CallExpression */); + context.enableSubstitution(213 /* TaggedTemplateExpression */); context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(223 /* BinaryExpression */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(224 /* BinaryExpression */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(309 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; let currentSourceFile; @@ -103780,23 +103837,23 @@ } function topLevelVisitor(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 358 /* MergeDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 359 /* EndOfDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -103807,26 +103864,26 @@ return node; } switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement(node); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -103849,24 +103906,24 @@ if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -104699,7 +104756,7 @@ } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 240 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 241 /* VariableStatement */) { const id = getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -104731,10 +104788,10 @@ const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration( statements, @@ -104905,14 +104962,14 @@ } function modifierVisitor(node) { switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return void 0; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -104950,11 +105007,11 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return substituteCallExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -105007,7 +105064,7 @@ return node; } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 308 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 309 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -105101,10 +105158,10 @@ context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(300 /* ShorthandPropertyAssignment */); - context.enableSubstitution(223 /* BinaryExpression */); - context.enableSubstitution(233 /* MetaProperty */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(301 /* ShorthandPropertyAssignment */); + context.enableSubstitution(224 /* BinaryExpression */); + context.enableSubstitution(234 /* MetaProperty */); + context.enableEmitNotification(309 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; const exportFunctionsMap = []; @@ -105292,7 +105349,7 @@ if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 275 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 276 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -105440,11 +105497,11 @@ for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -105467,7 +105524,7 @@ ); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -105562,13 +105619,13 @@ } function topLevelVisitor(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return visitImportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return visitExportDeclaration(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -105738,7 +105795,7 @@ } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 308 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 309 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -105775,7 +105832,7 @@ return isExportedDeclaration ? createExportExpression(name, preventSubstitution(setTextRange(factory2.createAssignment(name, value), location))) : preventSubstitution(setTextRange(factory2.createAssignment(name, value), location)); } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 240 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 241 /* VariableStatement */) { const id = getOriginalNodeId(node); const isExportedDeclaration = hasSyntacticModifier(node.original, 1 /* Export */); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -105813,10 +105870,10 @@ const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -105916,47 +105973,47 @@ } function topLevelNestedVisitor(node) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return visitClassDeclaration(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return visitForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return visitForOfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return visitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return visitWhileStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return visitLabeledStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return visitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return visitSwitchStatement(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return visitCaseBlock(node); - case 292 /* CaseClause */: + case 293 /* CaseClause */: return visitCaseClause(node); - case 293 /* DefaultClause */: + case 294 /* DefaultClause */: return visitDefaultClause(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return visitTryStatement(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return visitCatchClause(node); - case 238 /* Block */: + case 239 /* Block */: return visitBlock(node); - case 358 /* MergeDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 359 /* EndOfDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -106102,30 +106159,30 @@ return node; } switch (node.kind) { - case 245 /* ForStatement */: + case 246 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -106198,7 +106255,7 @@ return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 308 /* SourceFile */; + return container !== void 0 && container.kind === 309 /* SourceFile */; } else { return false; } @@ -106235,14 +106292,14 @@ } function modifierVisitor(node) { switch (node.kind) { - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: return void 0; } return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -106276,7 +106333,7 @@ } function substituteUnspecified(node) { switch (node.kind) { - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -106320,9 +106377,9 @@ switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return substituteBinaryExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -106391,7 +106448,7 @@ /*prefixLocals*/ false ); - if (exportContainer && exportContainer.kind === 308 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 309 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); @@ -106430,7 +106487,7 @@ const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(308 /* SourceFile */); + context.enableEmitNotification(309 /* SourceFile */); context.enableSubstitution(79 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -106478,11 +106535,11 @@ } function visitor(node) { switch (node.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return visitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -106532,7 +106589,7 @@ /*typeArguments*/ void 0, [ - factory2.createPropertyAccessExpression(factory2.createMetaProperty(100 /* ImportKeyword */, factory2.createIdentifier("meta")), factory2.createIdentifier("url")) + factory2.createPropertyAccessExpression(factory2.createMetaProperty(101 /* ImportKeyword */, factory2.createIdentifier("meta")), factory2.createIdentifier("url")) ] ) ) @@ -106693,8 +106750,8 @@ const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(308 /* SourceFile */); - context.enableEmitNotification(308 /* SourceFile */); + context.enableSubstitution(309 /* SourceFile */); + context.enableEmitNotification(309 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -106737,7 +106794,7 @@ return result; } function transformSourceFileOrBundle(node) { - return node.kind === 308 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 309 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -106773,7 +106830,7 @@ function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -106790,7 +106847,7 @@ function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; @@ -106821,12 +106878,12 @@ return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`); } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 170 /* PropertyDeclaration */ || node.kind === 209 /* PropertyAccessExpression */ || node.kind === 169 /* PropertySignature */ || node.kind === 167 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 260 /* ClassDeclaration */ || node.kind === 166 /* Parameter */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */ || node.kind === 167 /* Parameter */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -106843,7 +106900,7 @@ } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 175 /* SetAccessor */) { + if (node.kind === 176 /* SetAccessor */) { if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1; } else { @@ -106865,26 +106922,26 @@ function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } else if (node.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.kind === 261 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -106905,29 +106962,29 @@ } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 177 /* ConstructSignature */: - case 182 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 183 /* ConstructorType */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 176 /* CallSignature */: + case 177 /* CallSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node.parent)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 261 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 259 /* FunctionDeclaration */: - case 181 /* FunctionType */: + case 260 /* FunctionDeclaration */: + case 182 /* FunctionType */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - case 175 /* SetAccessor */: - case 174 /* GetAccessor */: + case 176 /* SetAccessor */: + case 175 /* GetAccessor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1; default: return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`); @@ -106936,40 +106993,40 @@ function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 197 /* MappedType */: + case 198 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 176 /* CallSignature */: + case 177 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isStatic(node.parent)) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 260 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 261 /* ClassDeclaration */) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 181 /* FunctionType */: - case 259 /* FunctionDeclaration */: + case 182 /* FunctionType */: + case 260 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 192 /* InferType */: + case 193 /* InferType */: diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; break; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -106984,7 +107041,7 @@ function getHeritageClauseVisibilityError() { let diagnosticMessage; if (isClassDeclaration(node.parent.parent)) { - diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 117 /* ImplementsKeyword */ ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; + diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 118 /* ImplementsKeyword */ ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; } @@ -107037,7 +107094,7 @@ } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 166 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 167 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -107268,10 +107325,10 @@ return result; } function transformRoot(node) { - if (node.kind === 308 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 309 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 309 /* Bundle */) { + if (node.kind === 310 /* Bundle */) { isBundledEmit = true; refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); @@ -107303,7 +107360,7 @@ const newFile = factory2.updateSourceFile( sourceFile, [factory2.createModuleDeclaration( - [factory2.createModifier(136 /* DeclareKeyword */)], + [factory2.createModifier(137 /* DeclareKeyword */)], factory2.createStringLiteral(getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), factory2.createModuleBlock(setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)) )], @@ -107338,7 +107395,7 @@ ); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 311 /* InputFiles */) { + if (prepend.kind === 312 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -107506,14 +107563,14 @@ if (name.kind === 79 /* Identifier */) { return name; } else { - if (name.kind === 204 /* ArrayBindingPattern */) { + if (name.kind === 205 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 229 /* OmittedExpression */) { + if (elem.kind === 230 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { @@ -107577,15 +107634,15 @@ if (shouldPrintWithInitializer(node)) { return; } - const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 167 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } if (!getParseTreeNode(node)) { - return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */); + return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(132 /* AnyKeyword */); } - if (node.kind === 175 /* SetAccessor */) { - return factory2.createKeywordTypeNode(131 /* AnyKeyword */); + if (node.kind === 176 /* SetAccessor */) { + return factory2.createKeywordTypeNode(132 /* AnyKeyword */); } errorNameNode = node.name; let oldDiag; @@ -107593,10 +107650,10 @@ oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) { + if (node.kind === 258 /* VariableDeclaration */ || node.kind === 206 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 166 /* Parameter */ || node.kind === 169 /* PropertyDeclaration */ || node.kind === 168 /* PropertySignature */) { + if (node.kind === 167 /* Parameter */ || node.kind === 170 /* PropertyDeclaration */ || node.kind === 169 /* PropertySignature */) { if (isPropertySignature(node) || !node.initializer) return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); @@ -107607,27 +107664,27 @@ if (!suppressNewDiagnosticContexts) { getSymbolAccessibilityDiagnostic = oldDiag; } - return returnValue || factory2.createKeywordTypeNode(131 /* AnyKeyword */); + return returnValue || factory2.createKeywordTypeNode(132 /* AnyKeyword */); } } function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: return !resolver.isDeclarationVisible(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: return false; - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -107715,7 +107772,7 @@ function rewriteModuleSpecifier(parent2, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 264 /* ModuleDeclaration */ && parent2.kind !== 202 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 265 /* ModuleDeclaration */ && parent2.kind !== 203 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); @@ -107734,7 +107791,7 @@ function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 280 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 281 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -107771,7 +107828,7 @@ void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 272 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 @@ -107874,7 +107931,7 @@ const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 184 /* TypeLiteral */ || input.kind === 197 /* MappedType */) && input.parent.kind !== 262 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 185 /* TypeLiteral */ || input.kind === 198 /* MappedType */) && input.parent.kind !== 263 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -107902,26 +107959,26 @@ } if (isProcessedComponent(input)) { switch (input.kind) { - case 230 /* ExpressionWithTypeArguments */: { + case 231 /* ExpressionWithTypeArguments */: { if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) { checkEntityNameVisibility(input.expression, enclosingDeclaration); } const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); } - case 180 /* TypeReference */: { + case 181 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 173 /* Constructor */: { + case 174 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( /*modifiers*/ ensureModifiers(input), @@ -107931,7 +107988,7 @@ ); return cleanup(ctor); } - case 171 /* MethodDeclaration */: { + case 172 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -107952,7 +108009,7 @@ ); return cleanup(sig); } - case 174 /* GetAccessor */: { + case 175 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -107970,7 +108027,7 @@ void 0 )); } - case 175 /* SetAccessor */: { + case 176 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -107986,7 +108043,7 @@ void 0 )); } - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108001,7 +108058,7 @@ ensureType(input, input.type), ensureNoInitializer(input) )); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108015,7 +108072,7 @@ input.questionToken, ensureType(input, input.type) )); - case 170 /* MethodSignature */: { + case 171 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108032,7 +108089,7 @@ ensureType(input, input.type) )); } - case 176 /* CallSignature */: { + case 177 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -108040,15 +108097,15 @@ ensureType(input, input.type) )); } - case 178 /* IndexSignature */: { + case 179 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), updateParamsList(input, input.parameters), - visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */) + visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(132 /* AnyKeyword */) )); } - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -108063,7 +108120,7 @@ ensureNoInitializer(input) )); } - case 165 /* TypeParameter */: { + case 166 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration( input, @@ -108077,7 +108134,7 @@ } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 191 /* ConditionalType */: { + case 192 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); const oldEnclosingDecl = enclosingDeclaration; @@ -108091,13 +108148,13 @@ Debug.assert(falseType); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 181 /* FunctionType */: { + case 182 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 182 /* ConstructorType */: { + case 183 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 202 /* ImportType */: { + case 203 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -108137,7 +108194,7 @@ } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 171 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 172 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -108146,7 +108203,7 @@ if (shouldStripInternal(input)) return; switch (input.kind) { - case 275 /* ExportDeclaration */: { + case 276 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -108160,7 +108217,7 @@ getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -108183,7 +108240,7 @@ void 0 ); errorFallbackNode = void 0; - const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(136 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); + const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(137 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); preserveJsDoc(statement, input); removeAllComments(input); return [statement, factory2.updateExportAssignment(input, input.modifiers, newId)]; @@ -108209,10 +108266,10 @@ if (shouldStripInternal(input)) return; switch (input.kind) { - case 268 /* ImportEqualsDeclaration */: { + case 269 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 269 /* ImportDeclaration */: { + case 270 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -108232,7 +108289,7 @@ } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 262 /* TypeAliasDeclaration */: { + case 263 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -108244,7 +108301,7 @@ needsDeclare = previousNeedsDeclare; return clean2; } - case 261 /* InterfaceDeclaration */: { + case 262 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -108254,7 +108311,7 @@ visitNodes2(input.members, visitDeclarationSubtree, isTypeElement) )); } - case 259 /* FunctionDeclaration */: { + case 260 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -108301,7 +108358,7 @@ /*initializer*/ void 0 ); - return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(93 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); + return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(94 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); }); if (!exportMappings.length) { declarations = mapDefined(declarations, (declaration) => factory2.updateModifiers(declaration, 0 /* None */)); @@ -108360,10 +108417,10 @@ return clean2; } } - case 264 /* ModuleDeclaration */: { + case 265 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 265 /* ModuleBlock */) { + if (inner && inner.kind === 266 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; @@ -108407,7 +108464,7 @@ )); } } - case 260 /* ClassDeclaration */: { + case 261 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -108476,7 +108533,7 @@ const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement)); const members = factory2.createNodeArray(memberNodes); const extendsClause = getEffectiveBaseTypeNode(input); - if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) { + if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 105 /* NullKeyword */) { const oldId = input.name ? unescapeLeadingUnderscores(input.name.escapedText) : "default"; const newId = factory2.createUniqueName(`${oldId}_base`, 16 /* Optimistic */); getSymbolAccessibilityDiagnostic = () => ({ @@ -108492,16 +108549,16 @@ /*initializer*/ void 0 ); - const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(136 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); + const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(137 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); const heritageClauses = factory2.createNodeArray(map(input.heritageClauses, (clause) => { - if (clause.token === 94 /* ExtendsKeyword */) { + if (clause.token === 95 /* ExtendsKeyword */) { const oldDiag2 = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]); const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode)))); getSymbolAccessibilityDiagnostic = oldDiag2; return newClause; } - return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); + return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 105 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); })); return [statement, cleanup(factory2.updateClassDeclaration( input, @@ -108523,10 +108580,10 @@ )); } } - case 240 /* VariableStatement */: { + case 241 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 263 /* EnumDeclaration */: { + case 264 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -108543,7 +108600,7 @@ if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 264 /* ModuleDeclaration */) { + if (input.kind === 265 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -108566,7 +108623,7 @@ return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 229 /* OmittedExpression */) { + if (e.kind === 230 /* OmittedExpression */) { return; } if (e.name) { @@ -108626,7 +108683,7 @@ function ensureModifierFlags(node) { let mask2 = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; - const parentIsFile = node.parent.kind === 308 /* SourceFile */; + const parentIsFile = node.parent.kind === 309 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask2 ^= 2 /* Ambient */; additions = 0 /* None */; @@ -108647,12 +108704,12 @@ } function transformHeritageClauses(nodes) { return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => { - return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */; + return isEntityNameExpression(t.expression) || clause.token === 95 /* ExtendsKeyword */ && t.expression.kind === 105 /* NullKeyword */; })), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length)); } } function isAlwaysType(node) { - if (node.kind === 261 /* InterfaceDeclaration */) { + if (node.kind === 262 /* InterfaceDeclaration */) { return true; } return false; @@ -108672,57 +108729,57 @@ } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 174 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 175 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 166 /* Parameter */: - case 257 /* VariableDeclaration */: + case 167 /* Parameter */: + case 258 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 264 /* ModuleDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 261 /* InterfaceDeclaration */: - case 260 /* ClassDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 240 /* VariableStatement */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: + case 260 /* FunctionDeclaration */: + case 265 /* ModuleDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 262 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 241 /* VariableStatement */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 177 /* ConstructSignature */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 178 /* IndexSignature */: - case 257 /* VariableDeclaration */: - case 165 /* TypeParameter */: - case 230 /* ExpressionWithTypeArguments */: - case 180 /* TypeReference */: - case 191 /* ConditionalType */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 202 /* ImportType */: + case 178 /* ConstructSignature */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 179 /* IndexSignature */: + case 258 /* VariableDeclaration */: + case 166 /* TypeParameter */: + case 231 /* ExpressionWithTypeArguments */: + case 181 /* TypeReference */: + case 192 /* ConditionalType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 203 /* ImportType */: return true; } return false; @@ -108839,7 +108896,7 @@ } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a2, _b; - const enabledSyntaxKindFeatures = new Array(361 /* Count */); + const enabledSyntaxKindFeatures = new Array(362 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -108918,7 +108975,7 @@ state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 308 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); + (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 309 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); (_b = tracing) == null ? void 0 : _b.pop(); } @@ -109246,7 +109303,7 @@ } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 309 /* Bundle */) { + if (sourceFile.kind === 310 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -109638,8 +109695,8 @@ } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, mapOptions) { const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 309 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 308 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 310 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 309 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -109701,7 +109758,7 @@ writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 308 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 309 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -110023,11 +110080,11 @@ break; } switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return printFile(node); - case 309 /* Bundle */: + case 310 /* Bundle */: return printBundle(node); - case 310 /* UnparsedSource */: + case 311 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -110406,301 +110463,301 @@ return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: return emitQualifiedName(node); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return emitTypeParameter(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return emitParameter(node); - case 167 /* Decorator */: + case 168 /* Decorator */: return emitDecorator(node); - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return emitPropertySignature(node); - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 170 /* MethodSignature */: + case 171 /* MethodSignature */: return emitMethodSignature(node); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return emitConstructor(node); - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return emitAccessorDeclaration(node); - case 176 /* CallSignature */: + case 177 /* CallSignature */: return emitCallSignature(node); - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return emitConstructSignature(node); - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return emitIndexSignature(node); - case 179 /* TypePredicate */: + case 180 /* TypePredicate */: return emitTypePredicate(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return emitTypeReference(node); - case 181 /* FunctionType */: + case 182 /* FunctionType */: return emitFunctionType(node); - case 182 /* ConstructorType */: + case 183 /* ConstructorType */: return emitConstructorType(node); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return emitTypeQuery(node); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return emitTypeLiteral(node); - case 185 /* ArrayType */: + case 186 /* ArrayType */: return emitArrayType(node); - case 186 /* TupleType */: + case 187 /* TupleType */: return emitTupleType(node); - case 187 /* OptionalType */: + case 188 /* OptionalType */: return emitOptionalType(node); - case 189 /* UnionType */: + case 190 /* UnionType */: return emitUnionType(node); - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return emitIntersectionType(node); - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return emitConditionalType(node); - case 192 /* InferType */: + case 193 /* InferType */: return emitInferType(node); - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return emitParenthesizedType(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 194 /* ThisType */: + case 195 /* ThisType */: return emitThisType(); - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return emitTypeOperator(node); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 197 /* MappedType */: + case 198 /* MappedType */: return emitMappedType(node); - case 198 /* LiteralType */: + case 199 /* LiteralType */: return emitLiteralType(node); - case 199 /* NamedTupleMember */: + case 200 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 200 /* TemplateLiteralType */: + case 201 /* TemplateLiteralType */: return emitTemplateType(node); - case 201 /* TemplateLiteralTypeSpan */: + case 202 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 202 /* ImportType */: + case 203 /* ImportType */: return emitImportTypeNode(node); - case 203 /* ObjectBindingPattern */: + case 204 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return emitBindingElement(node); - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return emitTemplateSpan(node); - case 237 /* SemicolonClassElement */: + case 238 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 238 /* Block */: + case 239 /* Block */: return emitBlock(node); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return emitVariableStatement(node); - case 239 /* EmptyStatement */: + case 240 /* EmptyStatement */: return emitEmptyStatement( /*isEmbeddedStatement*/ false ); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return emitExpressionStatement(node); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return emitIfStatement(node); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return emitDoStatement(node); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return emitWhileStatement(node); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return emitForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return emitForInStatement(node); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return emitForOfStatement(node); - case 248 /* ContinueStatement */: + case 249 /* ContinueStatement */: return emitContinueStatement(node); - case 249 /* BreakStatement */: + case 250 /* BreakStatement */: return emitBreakStatement(node); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return emitReturnStatement(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return emitWithStatement(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return emitSwitchStatement(node); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return emitLabeledStatement(node); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return emitThrowStatement(node); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return emitTryStatement(node); - case 256 /* DebuggerStatement */: + case 257 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: return emitClassDeclaration(node); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return emitModuleBlock(node); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return emitCaseBlock(node); - case 267 /* NamespaceExportDeclaration */: + case 268 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return emitImportDeclaration(node); - case 270 /* ImportClause */: + case 271 /* ImportClause */: return emitImportClause(node); - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: return emitNamespaceImport(node); - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: return emitNamespaceExport(node); - case 272 /* NamedImports */: + case 273 /* NamedImports */: return emitNamedImports(node); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return emitImportSpecifier(node); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return emitExportAssignment(node); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return emitExportDeclaration(node); - case 276 /* NamedExports */: + case 277 /* NamedExports */: return emitNamedExports(node); - case 278 /* ExportSpecifier */: + case 279 /* ExportSpecifier */: return emitExportSpecifier(node); - case 296 /* AssertClause */: + case 297 /* AssertClause */: return emitAssertClause(node); - case 297 /* AssertEntry */: + case 298 /* AssertEntry */: return emitAssertEntry(node); - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return; - case 280 /* ExternalModuleReference */: + case 281 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 11 /* JsxText */: return emitJsxText(node); - case 283 /* JsxOpeningElement */: - case 286 /* JsxOpeningFragment */: + case 284 /* JsxOpeningElement */: + case 287 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 284 /* JsxClosingElement */: - case 287 /* JsxClosingFragment */: + case 285 /* JsxClosingElement */: + case 288 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return emitJsxAttribute(node); - case 289 /* JsxAttributes */: + case 290 /* JsxAttributes */: return emitJsxAttributes(node); - case 290 /* JsxSpreadAttribute */: + case 291 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 291 /* JsxExpression */: + case 292 /* JsxExpression */: return emitJsxExpression(node); - case 292 /* CaseClause */: + case 293 /* CaseClause */: return emitCaseClause(node); - case 293 /* DefaultClause */: + case 294 /* DefaultClause */: return emitDefaultClause(node); - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: return emitHeritageClause(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return emitCatchClause(node); - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 302 /* EnumMember */: + case 303 /* EnumMember */: return emitEnumMember(node); - case 303 /* UnparsedPrologue */: + case 304 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 310 /* UnparsedSource */: - case 304 /* UnparsedPrepend */: + case 311 /* UnparsedSource */: + case 305 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 305 /* UnparsedText */: - case 306 /* UnparsedInternalText */: + case 306 /* UnparsedText */: + case 307 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 307 /* UnparsedSyntheticReference */: + case 308 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 308 /* SourceFile */: + case 309 /* SourceFile */: return emitSourceFile(node); - case 309 /* Bundle */: + case 310 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 311 /* InputFiles */: + case 312 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 312 /* JSDocTypeExpression */: + case 313 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 313 /* JSDocNameReference */: + case 314 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 315 /* JSDocAllType */: + case 316 /* JSDocAllType */: return writePunctuation("*"); - case 316 /* JSDocUnknownType */: + case 317 /* JSDocUnknownType */: return writePunctuation("?"); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 318 /* JSDocNonNullableType */: + case 319 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 188 /* RestType */: - case 321 /* JSDocVariadicType */: + case 189 /* RestType */: + case 322 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 322 /* JSDocNamepathType */: + case 323 /* JSDocNamepathType */: return; - case 323 /* JSDoc */: + case 324 /* JSDoc */: return emitJSDoc(node); - case 325 /* JSDocTypeLiteral */: + case 326 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 326 /* JSDocSignature */: + case 327 /* JSDocSignature */: return emitJSDocSignature(node); - case 330 /* JSDocTag */: - case 335 /* JSDocClassTag */: - case 340 /* JSDocOverrideTag */: + case 331 /* JSDocTag */: + case 336 /* JSDocClassTag */: + case 341 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 331 /* JSDocAugmentsTag */: - case 332 /* JSDocImplementsTag */: + case 332 /* JSDocAugmentsTag */: + case 333 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 333 /* JSDocAuthorTag */: - case 334 /* JSDocDeprecatedTag */: + case 334 /* JSDocAuthorTag */: + case 335 /* JSDocDeprecatedTag */: return; - case 336 /* JSDocPublicTag */: - case 337 /* JSDocPrivateTag */: - case 338 /* JSDocProtectedTag */: - case 339 /* JSDocReadonlyTag */: + case 337 /* JSDocPublicTag */: + case 338 /* JSDocPrivateTag */: + case 339 /* JSDocProtectedTag */: + case 340 /* JSDocReadonlyTag */: return; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return emitJSDocOverloadTag(node); - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 343 /* JSDocEnumTag */: - case 345 /* JSDocReturnTag */: - case 346 /* JSDocThisTag */: - case 347 /* JSDocTypeTag */: - case 352 /* JSDocThrowsTag */: - case 353 /* JSDocSatisfiesTag */: + case 344 /* JSDocEnumTag */: + case 346 /* JSDocReturnTag */: + case 347 /* JSDocThisTag */: + case 348 /* JSDocTypeTag */: + case 353 /* JSDocThrowsTag */: + case 354 /* JSDocSatisfiesTag */: return emitJSDocSimpleTypedTag(node); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 350 /* JSDocSeeTag */: + case 351 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 355 /* NotEmittedStatement */: - case 359 /* EndOfDeclarationMarker */: - case 358 /* MergeDeclarationMarker */: + case 356 /* NotEmittedStatement */: + case 360 /* EndOfDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: return; } if (isExpression(node)) { @@ -110733,86 +110790,86 @@ return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return emitCallExpression(node); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return emitNewExpression(node); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: return emitFunctionExpression(node); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return emitArrowFunction(node); - case 217 /* DeleteExpression */: + case 218 /* DeleteExpression */: return emitDeleteExpression(node); - case 218 /* TypeOfExpression */: + case 219 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 219 /* VoidExpression */: + case 220 /* VoidExpression */: return emitVoidExpression(node); - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: return emitAwaitExpression(node); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return emitBinaryExpression(node); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return emitConditionalExpression(node); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return emitTemplateExpression(node); - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return emitYieldExpression(node); - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return emitSpreadElement(node); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return emitClassExpression(node); - case 229 /* OmittedExpression */: + case 230 /* OmittedExpression */: return; - case 231 /* AsExpression */: + case 232 /* AsExpression */: return emitAsExpression(node); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return emitNonNullExpression(node); - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return emitMetaProperty(node); - case 234 /* SyntheticExpression */: + case 235 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 279 /* MissingDeclaration */: + case 280 /* MissingDeclaration */: return; - case 281 /* JsxElement */: + case 282 /* JsxElement */: return emitJsxElement(node); - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return emitJsxFragment(node); - case 354 /* SyntaxList */: + case 355 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 355 /* NotEmittedStatement */: + case 356 /* NotEmittedStatement */: return; - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return emitCommaList(node); - case 358 /* MergeDeclarationMarker */: - case 359 /* EndOfDeclarationMarker */: + case 359 /* MergeDeclarationMarker */: + case 360 /* EndOfDeclarationMarker */: return; - case 360 /* SyntheticReferenceExpression */: + case 361 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -110858,7 +110915,7 @@ } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 309 /* Bundle */ ? node : void 0; + const bundle = node.kind === 310 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -110933,7 +110990,7 @@ updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 305 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 306 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -110969,7 +111026,7 @@ } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 239 /* EmptyStatement */, + node.kind === 240 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -111041,7 +111098,7 @@ emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 320 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 321 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -111117,7 +111174,7 @@ /*allowDecorators*/ true ); - const token = node.kind === 174 /* GetAccessor */ ? 137 /* GetKeyword */ : 151 /* SetKeyword */; + const token = node.kind === 175 /* GetAccessor */ ? 138 /* GetKeyword */ : 152 /* SetKeyword */; emitTokenWithComment(token, pos, writeKeyword, node); writeSpace(); emit(node.name); @@ -111299,7 +111356,7 @@ function emitTypeOperator(node) { writeTokenText(node.operator, writeKeyword); writeSpace(); - const parenthesizerRule = node.operator === 146 /* ReadonlyKeyword */ ? parenthesizer.parenthesizeOperandOfReadonlyTypeOperator : parenthesizer.parenthesizeOperandOfTypeOperator; + const parenthesizerRule = node.operator === 147 /* ReadonlyKeyword */ ? parenthesizer.parenthesizeOperandOfReadonlyTypeOperator : parenthesizer.parenthesizeOperandOfTypeOperator; emit(node.type, parenthesizerRule); } function emitIndexedAccessType(node) { @@ -111319,7 +111376,7 @@ } if (node.readonlyToken) { emit(node.readonlyToken); - if (node.readonlyToken.kind !== 146 /* ReadonlyKeyword */) { + if (node.readonlyToken.kind !== 147 /* ReadonlyKeyword */) { writeKeyword("readonly"); } writeSpace(); @@ -111498,7 +111555,7 @@ emitExpressionList(node, node.arguments, 2576 /* CallExpressionArguments */, parenthesizer.parenthesizeExpressionForDisallowedComma); } function emitNewExpression(node) { - emitTokenWithComment(103 /* NewKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(104 /* NewKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfNew); emitTypeArguments(node, node.typeArguments); @@ -111554,22 +111611,22 @@ emit(node.equalsGreaterThanToken); } function emitDeleteExpression(node) { - emitTokenWithComment(89 /* DeleteKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(90 /* DeleteKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitTypeOfExpression(node) { - emitTokenWithComment(112 /* TypeOfKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(113 /* TypeOfKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitVoidExpression(node) { - emitTokenWithComment(114 /* VoidKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(115 /* VoidKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } function emitAwaitExpression(node) { - emitTokenWithComment(133 /* AwaitKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(134 /* AwaitKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); } @@ -111582,7 +111639,7 @@ } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 221 /* PrefixUnaryExpression */ && (node.operator === 39 /* PlusToken */ && (operand.operator === 39 /* PlusToken */ || operand.operator === 45 /* PlusPlusToken */) || node.operator === 40 /* MinusToken */ && (operand.operator === 40 /* MinusToken */ || operand.operator === 46 /* MinusMinusToken */)); + return operand.kind === 222 /* PrefixUnaryExpression */ && (node.operator === 39 /* PlusToken */ && (operand.operator === 39 /* PlusToken */ || operand.operator === 45 /* PlusPlusToken */) || node.operator === 40 /* MinusToken */ && (operand.operator === 40 /* MinusToken */ || operand.operator === 46 /* MinusMinusToken */)); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary); @@ -111635,7 +111692,7 @@ const linesAfterOperator = getLinesBetweenNodes(node, operatorToken, node.right); writeLinesAndIndent(linesBeforeOperator, isCommaOperator); emitLeadingCommentsOfPosition(operatorToken.pos); - writeTokenNode(operatorToken, operatorToken.kind === 101 /* InKeyword */ ? writeKeyword : writeOperator); + writeTokenNode(operatorToken, operatorToken.kind === 102 /* InKeyword */ ? writeKeyword : writeOperator); emitTrailingCommentsOfPosition( operatorToken.end, /*prefixSpace*/ @@ -111726,7 +111783,7 @@ emitList(node, node.templateSpans, 262144 /* TemplateExpressionSpans */); } function emitYieldExpression(node) { - emitTokenWithComment(125 /* YieldKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(126 /* YieldKeyword */, node.pos, writeKeyword, node); emit(node.asteriskToken); emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsiAndDisallowedComma); } @@ -111832,7 +111889,7 @@ } } function emitIfStatement(node) { - const openParenPos = emitTokenWithComment(99 /* IfKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(100 /* IfKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -111840,8 +111897,8 @@ emitEmbeddedStatement(node, node.thenStatement); if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); - emitTokenWithComment(91 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 242 /* IfStatement */) { + emitTokenWithComment(92 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); + if (node.elseStatement.kind === 243 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -111850,14 +111907,14 @@ } } function emitWhileClause(node, startPos) { - const openParenPos = emitTokenWithComment(115 /* WhileKeyword */, startPos, writeKeyword, node); + const openParenPos = emitTokenWithComment(116 /* WhileKeyword */, startPos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); } function emitDoStatement(node) { - emitTokenWithComment(90 /* DoKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(91 /* DoKeyword */, node.pos, writeKeyword, node); emitEmbeddedStatement(node, node.statement); if (isBlock(node.statement) && !preserveSourceNewlines) { writeSpace(); @@ -111872,7 +111929,7 @@ emitEmbeddedStatement(node, node.statement); } function emitForStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); let pos = emitTokenWithComment( 20 /* OpenParenToken */, @@ -111890,25 +111947,25 @@ emitEmbeddedStatement(node, node.statement); } function emitForInStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(101 /* InKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(102 /* InKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); emitEmbeddedStatement(node, node.statement); } function emitForOfStatement(node) { - const openParenPos = emitTokenWithComment(97 /* ForKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(98 /* ForKeyword */, node.pos, writeKeyword, node); writeSpace(); emitWithTrailingSpace(node.awaitModifier); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(162 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(163 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -111916,7 +111973,7 @@ } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 258 /* VariableDeclarationList */) { + if (node.kind === 259 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -111924,12 +111981,12 @@ } } function emitContinueStatement(node) { - emitTokenWithComment(86 /* ContinueKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(87 /* ContinueKeyword */, node.pos, writeKeyword, node); emitWithLeadingSpace(node.label); writeTrailingSemicolon(); } function emitBreakStatement(node) { - emitTokenWithComment(81 /* BreakKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(82 /* BreakKeyword */, node.pos, writeKeyword, node); emitWithLeadingSpace(node.label); writeTrailingSemicolon(); } @@ -111952,7 +112009,7 @@ } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 291 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 292 /* JsxExpression */; emitTrailingCommentsOfPosition( pos, /*prefixSpace*/ @@ -112000,7 +112057,7 @@ } function emitReturnStatement(node) { emitTokenWithComment( - 105 /* ReturnKeyword */, + 106 /* ReturnKeyword */, node.pos, writeKeyword, /*contextNode*/ @@ -112010,7 +112067,7 @@ writeTrailingSemicolon(); } function emitWithStatement(node) { - const openParenPos = emitTokenWithComment(116 /* WithKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(117 /* WithKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -112018,7 +112075,7 @@ emitEmbeddedStatement(node, node.statement); } function emitSwitchStatement(node) { - const openParenPos = emitTokenWithComment(107 /* SwitchKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(108 /* SwitchKeyword */, node.pos, writeKeyword, node); writeSpace(); emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitExpression(node.expression); @@ -112033,12 +112090,12 @@ emit(node.statement); } function emitThrowStatement(node) { - emitTokenWithComment(109 /* ThrowKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(110 /* ThrowKeyword */, node.pos, writeKeyword, node); emitExpressionWithLeadingSpace(parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi); writeTrailingSemicolon(); } function emitTryStatement(node) { - emitTokenWithComment(111 /* TryKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(112 /* TryKeyword */, node.pos, writeKeyword, node); writeSpace(); emit(node.tryBlock); if (node.catchClause) { @@ -112047,13 +112104,13 @@ } if (node.finallyBlock) { writeLineOrSpace(node, node.catchClause || node.tryBlock, node.finallyBlock); - emitTokenWithComment(96 /* FinallyKeyword */, (node.catchClause || node.tryBlock).end, writeKeyword, node); + emitTokenWithComment(97 /* FinallyKeyword */, (node.catchClause || node.tryBlock).end, writeKeyword, node); writeSpace(); emit(node.finallyBlock); } } function emitDebuggerStatement(node) { - writeToken(87 /* DebuggerKeyword */, node.pos, writeKeyword); + writeToken(88 /* DebuggerKeyword */, node.pos, writeKeyword); writeTrailingSemicolon(); } function emitVariableDeclaration(node) { @@ -112191,7 +112248,7 @@ /*allowDecorators*/ true ); - emitTokenWithComment(84 /* ClassKeyword */, moveRangePastModifiers(node).pos, writeKeyword, node); + emitTokenWithComment(85 /* ClassKeyword */, moveRangePastModifiers(node).pos, writeKeyword, node); if (node.name) { writeSpace(); emitIdentifierName(node.name); @@ -112318,10 +112375,10 @@ /*allowDecorators*/ false ); - emitTokenWithComment(100 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); + emitTokenWithComment(101 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); writeSpace(); if (node.isTypeOnly) { - emitTokenWithComment(154 /* TypeKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(155 /* TypeKeyword */, node.pos, writeKeyword, node); writeSpace(); } emit(node.name); @@ -112345,12 +112402,12 @@ /*allowDecorators*/ false ); - emitTokenWithComment(100 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); + emitTokenWithComment(101 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); writeSpace(); if (node.importClause) { emit(node.importClause); writeSpace(); - emitTokenWithComment(158 /* FromKeyword */, node.importClause.end, writeKeyword, node); + emitTokenWithComment(159 /* FromKeyword */, node.importClause.end, writeKeyword, node); writeSpace(); } emitExpression(node.moduleSpecifier); @@ -112361,7 +112418,7 @@ } function emitImportClause(node) { if (node.isTypeOnly) { - emitTokenWithComment(154 /* TypeKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(155 /* TypeKeyword */, node.pos, writeKeyword, node); writeSpace(); } emit(node.name); @@ -112374,7 +112431,7 @@ function emitNamespaceImport(node) { const asPos = emitTokenWithComment(41 /* AsteriskToken */, node.pos, writePunctuation, node); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, asPos, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, asPos, writeKeyword, node); writeSpace(); emit(node.name); } @@ -112385,12 +112442,12 @@ emitImportOrExportSpecifier(node); } function emitExportAssignment(node) { - const nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + const nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.isExportEquals) { emitTokenWithComment(63 /* EqualsToken */, nextPos, writeOperator, node); } else { - emitTokenWithComment(88 /* DefaultKeyword */, nextPos, writeKeyword, node); + emitTokenWithComment(89 /* DefaultKeyword */, nextPos, writeKeyword, node); } writeSpace(); emitExpression(node.expression, node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(63 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault); @@ -112403,10 +112460,10 @@ /*allowDecorators*/ false ); - let nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + let nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.isTypeOnly) { - nextPos = emitTokenWithComment(154 /* TypeKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(155 /* TypeKeyword */, nextPos, writeKeyword, node); writeSpace(); } if (node.exportClause) { @@ -112417,7 +112474,7 @@ if (node.moduleSpecifier) { writeSpace(); const fromPos = node.exportClause ? node.exportClause.end : nextPos; - emitTokenWithComment(158 /* FromKeyword */, fromPos, writeKeyword, node); + emitTokenWithComment(159 /* FromKeyword */, fromPos, writeKeyword, node); writeSpace(); emitExpression(node.moduleSpecifier); } @@ -112427,7 +112484,7 @@ writeTrailingSemicolon(); } function emitAssertClause(node) { - emitTokenWithComment(130 /* AssertKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(131 /* AssertKeyword */, node.pos, writeKeyword, node); writeSpace(); const elements = node.elements; emitList(node, elements, 526226 /* ImportClauseEntries */); @@ -112444,11 +112501,11 @@ emit(value); } function emitNamespaceExportDeclaration(node) { - let nextPos = emitTokenWithComment(93 /* ExportKeyword */, node.pos, writeKeyword, node); + let nextPos = emitTokenWithComment(94 /* ExportKeyword */, node.pos, writeKeyword, node); writeSpace(); - nextPos = emitTokenWithComment(128 /* AsKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(129 /* AsKeyword */, nextPos, writeKeyword, node); writeSpace(); - nextPos = emitTokenWithComment(143 /* NamespaceKeyword */, nextPos, writeKeyword, node); + nextPos = emitTokenWithComment(144 /* NamespaceKeyword */, nextPos, writeKeyword, node); writeSpace(); emit(node.name); writeTrailingSemicolon(); @@ -112456,7 +112513,7 @@ function emitNamespaceExport(node) { const asPos = emitTokenWithComment(41 /* AsteriskToken */, node.pos, writePunctuation, node); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, asPos, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, asPos, writeKeyword, node); writeSpace(); emit(node.name); } @@ -112479,7 +112536,7 @@ if (node.propertyName) { emit(node.propertyName); writeSpace(); - emitTokenWithComment(128 /* AsKeyword */, node.propertyName.end, writeKeyword, node); + emitTokenWithComment(129 /* AsKeyword */, node.propertyName.end, writeKeyword, node); writeSpace(); } emit(node.name); @@ -112582,13 +112639,13 @@ } } function emitCaseClause(node) { - emitTokenWithComment(82 /* CaseKeyword */, node.pos, writeKeyword, node); + emitTokenWithComment(83 /* CaseKeyword */, node.pos, writeKeyword, node); writeSpace(); emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma); emitCaseOrDefaultClauseRest(node, node.statements, node.expression.end); } function emitDefaultClause(node) { - const pos = emitTokenWithComment(88 /* DefaultKeyword */, node.pos, writeKeyword, node); + const pos = emitTokenWithComment(89 /* DefaultKeyword */, node.pos, writeKeyword, node); emitCaseOrDefaultClauseRest(node, node.statements, pos); } function emitCaseOrDefaultClauseRest(parentNode, statements, colonPos) { @@ -112611,7 +112668,7 @@ emitList(node, node.types, 528 /* HeritageClauseTypes */); } function emitCatchClause(node) { - const openParenPos = emitTokenWithComment(83 /* CatchKeyword */, node.pos, writeKeyword, node); + const openParenPos = emitTokenWithComment(84 /* CatchKeyword */, node.pos, writeKeyword, node); writeSpace(); if (node.variableDeclaration) { emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); @@ -112667,7 +112724,7 @@ } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 347 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 348 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -112711,7 +112768,7 @@ function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 312 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 313 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -112729,7 +112786,7 @@ emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 325 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 326 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -113612,7 +113669,7 @@ return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 214 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 215 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -113695,84 +113752,84 @@ if (!node) return; switch (node.kind) { - case 238 /* Block */: + case 239 /* Block */: forEach(node.statements, generateNames); break; - case 253 /* LabeledStatement */: - case 251 /* WithStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 254 /* LabeledStatement */: + case 252 /* WithStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: generateNames(node.statement); break; - case 242 /* IfStatement */: + case 243 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 295 /* CatchClause */: + case 296 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: generateNames(node.declarationList); break; - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: generateNames(node.importClause); break; - case 270 /* ImportClause */: + case 271 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 277 /* NamespaceExport */: + case 278 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: forEach(node.elements, generateNames); break; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -113781,12 +113838,12 @@ if (!node) return; switch (node.kind) { - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -114045,16 +114102,16 @@ prefix, suffix ); - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: { + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: { Debug.assert(!prefix && !suffix && !privateName); const name = node.name; if (name && !isGeneratedIdentifier(name)) { @@ -114069,17 +114126,17 @@ } return generateNameForExportDefault(); } - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return makeTempVariableName( 0 /* Auto */, /*reserveInNestedScopes*/ @@ -114173,7 +114230,7 @@ emitLeadingComments( pos, /*isEmittedNode*/ - node.kind !== 355 /* NotEmittedStatement */ + node.kind !== 356 /* NotEmittedStatement */ ); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) { @@ -114181,7 +114238,7 @@ } if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 258 /* VariableDeclarationList */) { + if (node.kind === 259 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -114197,7 +114254,7 @@ containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 356 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -114469,7 +114526,7 @@ } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 356 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 128 /* NoNestedSourceMaps */) { @@ -114484,7 +114541,7 @@ if (emitFlags & 128 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 356 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -115813,6 +115870,7 @@ const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions; const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3 } = createProgramOptions; let { oldProgram } = createProgramOptions; + const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations)); let processingDefaultLibFiles; let processingOtherFiles; let files; @@ -116946,89 +117004,89 @@ return diagnostics; function walk(node, parent2) { switch (parent2.kind) { - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: if (parent2.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 257 /* VariableDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 258 /* VariableDeclaration */: if (parent2.type === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); return "skip"; } } switch (node.kind) { - case 270 /* ImportClause */: + case 271 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? "import...type" : "export...type")); return "skip"; } break; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 294 /* HeritageClause */: + case 295 /* HeritageClause */: const heritageClause = node; - if (heritageClause.token === 117 /* ImplementsKeyword */) { + if (heritageClause.token === 118 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 261 /* InterfaceDeclaration */: - const interfaceKeyword = tokenToString(118 /* InterfaceKeyword */); + case 262 /* InterfaceDeclaration */: + const interfaceKeyword = tokenToString(119 /* InterfaceKeyword */); Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); return "skip"; - case 264 /* ModuleDeclaration */: - const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(143 /* NamespaceKeyword */) : tokenToString(142 /* ModuleKeyword */); + case 265 /* ModuleDeclaration */: + const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(144 /* NamespaceKeyword */) : tokenToString(143 /* ModuleKeyword */); Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); return "skip"; - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 263 /* EnumDeclaration */: - const enumKeyword = Debug.checkDefined(tokenToString(92 /* EnumKeyword */)); + case 264 /* EnumDeclaration */: + const enumKeyword = Debug.checkDefined(tokenToString(93 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); return "skip"; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 231 /* AsExpression */: + case 232 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: Debug.fail(); } } @@ -117063,47 +117121,47 @@ } } switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: if (nodes === parent2.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 240 /* VariableStatement */); + checkModifiers(parent2.modifiers, parent2.kind === 241 /* VariableStatement */); return "skip"; } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (nodes === parent2.modifiers) { for (const modifier of nodes) { - if (isModifier(modifier) && modifier.kind !== 124 /* StaticKeyword */ && modifier.kind !== 127 /* AccessorKeyword */) { + if (isModifier(modifier) && modifier.kind !== 125 /* StaticKeyword */ && modifier.kind !== 128 /* AccessorKeyword */) { diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); } } return "skip"; } break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (nodes === parent2.modifiers && some(nodes, isModifier)) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: - case 212 /* TaggedTemplateExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 213 /* TaggedTemplateExpression */: if (nodes === parent2.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -117114,25 +117172,25 @@ function checkModifiers(modifiers, isConstValid) { for (const modifier of modifiers) { switch (modifier.kind) { - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: if (isConstValid) { continue; } - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 136 /* DeclareKeyword */: - case 126 /* AbstractKeyword */: - case 161 /* OverrideKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 137 /* DeclareKeyword */: + case 127 /* AbstractKeyword */: + case 162 /* OverrideKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); break; - case 124 /* StaticKeyword */: - case 93 /* ExportKeyword */: - case 88 /* DefaultKeyword */: - case 127 /* AccessorKeyword */: + case 125 /* StaticKeyword */: + case 94 /* ExportKeyword */: + case 89 /* DefaultKeyword */: + case 128 /* AccessorKeyword */: } } } @@ -118239,127 +118297,131 @@ } } } - function getVersionForDeprecationDiagnostics(reportInvalidIgnoreDeprecations) { - const version2 = typeScriptVersion3 || versionMajorMinor; + function getIgnoreDeprecationsVersion() { const ignoreDeprecations = options.ignoreDeprecations; if (ignoreDeprecations) { - if (ignoreDeprecations === "5.0" /* v5_0 */ && version2.startsWith("5.")) { - return; - } else if (reportInvalidIgnoreDeprecations) { - createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations); + if (ignoreDeprecations === "5.0") { + return new Version(ignoreDeprecations); } + reportInvalidIgnoreDeprecations(); } - return version2; + return Version.zero; } - function verifyDeprecatedCompilerOptions() { - const version2 = getVersionForDeprecationDiagnostics( - /*reportInvalidIgnoreDeprecations*/ - true - ); - if (!version2) - return; - if (options.target === 0 /* ES3 */) { - createDeprecatedDiagnosticForOption(version2, "target", "ES3"); + function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn) { + const deprecatedInVersion = new Version(deprecatedIn); + const removedInVersion = new Version(removedIn); + const typescriptVersion = new Version(typeScriptVersion3 || versionMajorMinor); + const ignoreDeprecationsVersion = getIgnoreDeprecationsVersion(); + const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */); + const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1 /* LessThan */; + if (mustBeRemoved || canBeSilenced) { + fn((name, value, useInstead) => { + if (mustBeRemoved) { + if (value === void 0) { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name); + } else { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value); + } + } else { + if (value === void 0) { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn); + } else { + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn); + } + } + }); } - if (options.noImplicitUseStrict) { - createDeprecatedDiagnosticForOption(version2, "noImplicitUseStrict"); - } - if (options.keyofStringsOnly) { - createDeprecatedDiagnosticForOption(version2, "keyofStringsOnly"); - } - if (options.suppressExcessPropertyErrors) { - createDeprecatedDiagnosticForOption(version2, "suppressExcessPropertyErrors"); - } - if (options.suppressImplicitAnyIndexErrors) { - createDeprecatedDiagnosticForOption(version2, "suppressImplicitAnyIndexErrors"); - } - if (options.noStrictGenericChecks) { - createDeprecatedDiagnosticForOption(version2, "noStrictGenericChecks"); - } - if (options.charset) { - createDeprecatedDiagnosticForOption(version2, "charset"); - } - if (options.out) { - createDeprecatedDiagnosticForOption(version2, "out"); - } - if (options.importsNotUsedAsValues) { - createDeprecatedDiagnosticForOption( - version2, - "importsNotUsedAsValues", - /*value*/ - void 0, - "verbatimModuleSyntax" - ); - } - if (options.preserveValueImports) { - createDeprecatedDiagnosticForOption( - version2, - "preserveValueImports", - /*value*/ - void 0, - "verbatimModuleSyntax" - ); - } } - function verifyDeprecatedProjectReference(ref, parentFile, index) { - if (ref.prepend) { - const version2 = getVersionForDeprecationDiagnostics( - /*reportInvalidIgnoreDeprecations*/ - false - ); - if (version2) { - createDeprecatedOptionForVersionDiagnostic( - version2, - (message, arg0, arg1, arg2) => createDiagnosticForReference(parentFile, index, message, arg0, arg1, arg2), - "prepend" + function verifyDeprecatedCompilerOptions() { + function createDiagnostic(name, value, useInstead, message, arg0, arg1, arg2, arg3) { + if (useInstead) { + const details = chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.Use_0_instead, + useInstead ); + const chain = chainDiagnosticMessages(details, message, arg0, arg1, arg2, arg3); + createDiagnosticForOption( + /*onKey*/ + !value, + name, + /*option2*/ + void 0, + chain + ); + } else { + createDiagnosticForOption( + /*onKey*/ + !value, + name, + /*option2*/ + void 0, + message, + arg0, + arg1, + arg2, + arg3 + ); } } + checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { + if (options.target === 0 /* ES3 */) { + createDeprecatedDiagnostic("target", "ES3"); + } + if (options.noImplicitUseStrict) { + createDeprecatedDiagnostic("noImplicitUseStrict"); + } + if (options.keyofStringsOnly) { + createDeprecatedDiagnostic("keyofStringsOnly"); + } + if (options.suppressExcessPropertyErrors) { + createDeprecatedDiagnostic("suppressExcessPropertyErrors"); + } + if (options.suppressImplicitAnyIndexErrors) { + createDeprecatedDiagnostic("suppressImplicitAnyIndexErrors"); + } + if (options.noStrictGenericChecks) { + createDeprecatedDiagnostic("noStrictGenericChecks"); + } + if (options.charset) { + createDeprecatedDiagnostic("charset"); + } + if (options.out) { + createDeprecatedDiagnostic( + "out", + /*value*/ + void 0, + "outFile" + ); + } + if (options.importsNotUsedAsValues) { + createDeprecatedDiagnostic( + "importsNotUsedAsValues", + /*value*/ + void 0, + "verbatimModuleSyntax" + ); + } + if (options.preserveValueImports) { + createDeprecatedDiagnostic( + "preserveValueImports", + /*value*/ + void 0, + "verbatimModuleSyntax" + ); + } + }); } - function createDeprecatedDiagnosticForOption(version2, name, value, useInstead) { - return createDeprecatedOptionForVersionDiagnostic( - version2, - (message, arg0, arg1, arg2) => { - if (useInstead) { - const details = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Use_0_instead, - useInstead - ); - const chain = chainDiagnosticMessages(details, message, arg0, arg1, arg2); - createDiagnosticForOption( - /*onKey*/ - !value, - name, - /*option2*/ - void 0, - chain - ); - } else { - createDiagnosticForOption( - /*onKey*/ - !value, - name, - /*option2*/ - void 0, - message, - arg0, - arg1, - arg2 - ); - } - }, - name, - value - ); - } - function createDeprecatedOptionForVersionDiagnostic(version2, createDiagnostic, name, value) { - if (version2 === "6.0" /* v6_0 */) { - createDiagnostic(Diagnostics.Flag_0_is_deprecated_Please_remove_it_from_your_configuration, value || name); - } else { - createDiagnostic(Diagnostics.Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, value || name, "5.5" /* v5_5 */, "5.0" /* v5_0 */); + function verifyDeprecatedProjectReference(ref, parentFile, index) { + function createDiagnostic(_name, _value, _useInstead, message, arg0, arg1, arg2, arg3) { + createDiagnosticForReference(parentFile, index, message, arg0, arg1, arg2, arg3); } + checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { + if (ref.prepend) { + createDeprecatedDiagnostic("prepend"); + } + }); } function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) { var _a3; @@ -118612,25 +118674,25 @@ arg1 ); } - function createDiagnosticForReference(sourceFile, index, message, arg0, arg1, arg2) { + function createDiagnosticForReference(sourceFile, index, message, arg0, arg1, arg2, arg3) { const referencesSyntax = firstDefined( getTsConfigPropArray(sourceFile || options.configFile, "references"), (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 ); if (referencesSyntax && referencesSyntax.elements.length > index) { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, arg0, arg1, arg2)); + programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, arg0, arg1, arg2, arg3)); } else { - programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2)); + programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2, arg3)); } } - function createDiagnosticForOption(onKey, option1, option2, message, arg0, arg1, arg2) { + function createDiagnosticForOption(onKey, option1, option2, message, arg0, arg1, arg2, arg3) { const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax(); - const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, arg0, arg1, arg2); + const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, arg0, arg1, arg2, arg3); if (needCompilerDiagnostic) { if ("messageText" in message) { programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message)); } else { - programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2)); + programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2, arg3)); } } } @@ -118649,13 +118711,13 @@ } return _compilerOptionsObjectLiteralSyntax || void 0; } - function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, arg0, arg1, arg2) { + function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, arg0, arg1, arg2, arg3) { const props = getPropertyAssignment(objectLiteral, key1, key2); for (const prop of props) { if ("messageText" in message) { programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message)); } else { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, arg0, arg1, arg2)); + programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, arg0, arg1, arg2, arg3)); } } return !!props.length; @@ -125893,36 +125955,36 @@ // src/services/utilities.ts function getMeaningFromDeclaration(node) { switch (node.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 295 /* CatchClause */: - case 288 /* JsxAttribute */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 296 /* CatchClause */: + case 289 /* JsxAttribute */: return 1 /* Value */; - case 165 /* TypeParameter */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 184 /* TypeLiteral */: + case 166 /* TypeParameter */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 185 /* TypeLiteral */: return 2 /* Type */; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 302 /* EnumMember */: - case 260 /* ClassDeclaration */: + case 303 /* EnumMember */: + case 261 /* ClassDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -125930,15 +125992,15 @@ } else { return 4 /* Namespace */; } - case 263 /* EnumDeclaration */: - case 272 /* NamedImports */: - case 273 /* ImportSpecifier */: - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: + case 264 /* EnumDeclaration */: + case 273 /* NamedImports */: + case 274 /* ImportSpecifier */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: return 7 /* All */; - case 308 /* SourceFile */: + case 309 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 7 /* All */; @@ -125946,7 +126008,7 @@ function getMeaningFromLocation(node) { node = getAdjustedReferenceLocation(node); const parent2 = node.parent; - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return 1 /* Value */; } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7 /* All */; @@ -125970,11 +126032,11 @@ } } function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 163 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 268 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; + const name = node.kind === 164 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; + return name && name.parent.kind === 269 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; } function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 163 /* QualifiedName */) { + while (node.parent.kind === 164 /* QualifiedName */) { node = node.parent; } return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -125985,26 +126047,26 @@ function isQualifiedNameNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 163 /* QualifiedName */) { - while (root.parent && root.parent.kind === 163 /* QualifiedName */) { + if (root.parent.kind === 164 /* QualifiedName */) { + while (root.parent && root.parent.kind === 164 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 180 /* TypeReference */ && !isLastClause; + return root.parent.kind === 181 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 208 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 208 /* PropertyAccessExpression */) { + if (root.parent.kind === 209 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 209 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 230 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 294 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 231 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 295 /* HeritageClause */) { const decl = root.parent.parent.parent; - return decl.kind === 260 /* ClassDeclaration */ && root.parent.parent.token === 117 /* ImplementsKeyword */ || decl.kind === 261 /* InterfaceDeclaration */ && root.parent.parent.token === 94 /* ExtendsKeyword */; + return decl.kind === 261 /* ClassDeclaration */ && root.parent.parent.token === 118 /* ImplementsKeyword */ || decl.kind === 262 /* InterfaceDeclaration */ && root.parent.parent.token === 95 /* ExtendsKeyword */; } return false; } @@ -126013,17 +126075,17 @@ node = node.parent; } switch (node.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return !isExpressionNode(node); - case 194 /* ThisType */: + case 195 /* ThisType */: return true; } switch (node.parent.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return true; - case 202 /* ImportType */: + case 203 /* ImportType */: return !node.parent.isTypeOf; - case 230 /* ExpressionWithTypeArguments */: + case 231 /* ExpressionWithTypeArguments */: return isPartOfTypeNode(node.parent); } return false; @@ -126070,7 +126132,7 @@ } function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 253 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { + if (referenceNode.kind === 254 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -126120,22 +126182,22 @@ } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 299 /* PropertyAssignment */: - case 302 /* EnumMember */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 264 /* ModuleDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 300 /* PropertyAssignment */: + case 303 /* EnumMember */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 265 /* ModuleDeclaration */: return getNameOfDeclaration(node.parent) === node; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: return true; - case 198 /* LiteralType */: - return node.parent.parent.kind === 196 /* IndexedAccessType */; + case 199 /* LiteralType */: + return node.parent.parent.kind === 197 /* IndexedAccessType */; default: return false; } @@ -126153,83 +126215,83 @@ return void 0; } switch (node.kind) { - case 308 /* SourceFile */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 264 /* ModuleDeclaration */: + case 309 /* SourceFile */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: return node; } } } function getNodeKind(node) { switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return "module" /* moduleElement */; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return "class" /* classElement */; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; - case 262 /* TypeAliasDeclaration */: - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: + case 263 /* TypeAliasDeclaration */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: return "type" /* typeElement */; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return "enum" /* enumElement */; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return "function" /* functionElement */; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return "getter" /* memberGetAccessorElement */; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return "setter" /* memberSetAccessorElement */; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return "method" /* memberFunctionElement */; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: const { initializer } = node; return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return "property" /* memberVariableElement */; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return "index" /* indexSignatureElement */; - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return "construct" /* constructSignatureElement */; - case 176 /* CallSignature */: + case 177 /* CallSignature */: return "call" /* callSignatureElement */; - case 173 /* Constructor */: - case 172 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 173 /* ClassStaticBlockDeclaration */: return "constructor" /* constructorImplementationElement */; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: return "type parameter" /* typeParameterElement */; - case 302 /* EnumMember */: + case 303 /* EnumMember */: return "enum member" /* enumMemberElement */; - case 166 /* Parameter */: + case 167 /* Parameter */: return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: - case 271 /* NamespaceImport */: - case 277 /* NamespaceExport */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: + case 272 /* NamespaceImport */: + case 278 /* NamespaceExport */: return "alias" /* alias */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: const kind = getAssignmentDeclarationKind(node); const { right } = node; switch (kind) { @@ -126257,7 +126319,7 @@ } case 79 /* Identifier */: return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: const scriptKind = getNodeKind(node.expression); return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: @@ -126269,10 +126331,10 @@ } function isThis(node) { switch (node.kind) { - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return true; case 79 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 166 /* Parameter */; + return identifierIsThisKeyword(node) && node.parent.kind === 167 /* Parameter */; default: return false; } @@ -126320,41 +126382,41 @@ return false; } switch (n.kind) { - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 203 /* ObjectBindingPattern */: - case 184 /* TypeLiteral */: - case 238 /* Block */: - case 265 /* ModuleBlock */: - case 266 /* CaseBlock */: - case 272 /* NamedImports */: - case 276 /* NamedExports */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 185 /* TypeLiteral */: + case 239 /* Block */: + case 266 /* ModuleBlock */: + case 267 /* CaseBlock */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: return nodeEndsWith(n, 19 /* CloseBraceToken */, sourceFile); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 211 /* NewExpression */: + case 212 /* NewExpression */: if (!n.arguments) { return true; } - case 210 /* CallExpression */: - case 214 /* ParenthesizedExpression */: - case 193 /* ParenthesizedType */: + case 211 /* CallExpression */: + case 215 /* ParenthesizedExpression */: + case 194 /* ParenthesizedType */: return nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 177 /* ConstructSignature */: - case 176 /* CallSignature */: - case 216 /* ArrowFunction */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 178 /* ConstructSignature */: + case 177 /* CallSignature */: + case 217 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -126362,60 +126424,60 @@ return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 21 /* CloseParenToken */, sourceFile); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return !!n.body && isCompletedNode(n.body, sourceFile); - case 242 /* IfStatement */: + case 243 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 26 /* SemicolonToken */, sourceFile); - case 206 /* ArrayLiteralExpression */: - case 204 /* ArrayBindingPattern */: - case 209 /* ElementAccessExpression */: - case 164 /* ComputedPropertyName */: - case 186 /* TupleType */: + case 207 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 210 /* ElementAccessExpression */: + case 165 /* ComputedPropertyName */: + case 187 /* TupleType */: return nodeEndsWith(n, 23 /* CloseBracketToken */, sourceFile); - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 23 /* CloseBracketToken */, sourceFile); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return false; - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 244 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 245 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 243 /* DoStatement */: - return hasChildOfKind(n, 115 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 183 /* TypeQuery */: + case 244 /* DoStatement */: + return hasChildOfKind(n, 116 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); + case 184 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 218 /* TypeOfExpression */: - case 217 /* DeleteExpression */: - case 219 /* VoidExpression */: - case 226 /* YieldExpression */: - case 227 /* SpreadElement */: + case 219 /* TypeOfExpression */: + case 218 /* DeleteExpression */: + case 220 /* VoidExpression */: + case 227 /* YieldExpression */: + case 228 /* SpreadElement */: const unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: const lastSpan = lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 236 /* TemplateSpan */: + case 237 /* TemplateSpan */: return nodeIsPresent(n.literal); - case 275 /* ExportDeclaration */: - case 269 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: return nodeIsPresent(n.moduleSpecifier); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -126457,13 +126519,13 @@ return syntaxList; } function isDefaultModifier2(node) { - return node.kind === 88 /* DefaultKeyword */; + return node.kind === 89 /* DefaultKeyword */; } function isClassKeyword(node) { - return node.kind === 84 /* ClassKeyword */; + return node.kind === 85 /* ClassKeyword */; } function isFunctionKeyword(node) { - return node.kind === 98 /* FunctionKeyword */; + return node.kind === 99 /* FunctionKeyword */; } function getAdjustedLocationForClass(node) { if (isNamedDeclaration(node)) { @@ -126517,13 +126579,13 @@ function getAdjustedLocationForDeclaration(node, forRename) { if (!forRename) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return getAdjustedLocationForClass(node); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return getAdjustedLocationForFunction(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return node; } } @@ -126578,19 +126640,19 @@ } function getAdjustedLocation(node, forRename) { const { parent: parent2 } = node; - if (isModifier(node) && (forRename || node.kind !== 88 /* DefaultKeyword */) ? canHaveModifiers(parent2) && contains(parent2.modifiers, node) : node.kind === 84 /* ClassKeyword */ ? isClassDeclaration(parent2) || isClassExpression(node) : node.kind === 98 /* FunctionKeyword */ ? isFunctionDeclaration(parent2) || isFunctionExpression(node) : node.kind === 118 /* InterfaceKeyword */ ? isInterfaceDeclaration(parent2) : node.kind === 92 /* EnumKeyword */ ? isEnumDeclaration(parent2) : node.kind === 154 /* TypeKeyword */ ? isTypeAliasDeclaration(parent2) : node.kind === 143 /* NamespaceKeyword */ || node.kind === 142 /* ModuleKeyword */ ? isModuleDeclaration(parent2) : node.kind === 100 /* ImportKeyword */ ? isImportEqualsDeclaration(parent2) : node.kind === 137 /* GetKeyword */ ? isGetAccessorDeclaration(parent2) : node.kind === 151 /* SetKeyword */ && isSetAccessorDeclaration(parent2)) { + if (isModifier(node) && (forRename || node.kind !== 89 /* DefaultKeyword */) ? canHaveModifiers(parent2) && contains(parent2.modifiers, node) : node.kind === 85 /* ClassKeyword */ ? isClassDeclaration(parent2) || isClassExpression(node) : node.kind === 99 /* FunctionKeyword */ ? isFunctionDeclaration(parent2) || isFunctionExpression(node) : node.kind === 119 /* InterfaceKeyword */ ? isInterfaceDeclaration(parent2) : node.kind === 93 /* EnumKeyword */ ? isEnumDeclaration(parent2) : node.kind === 155 /* TypeKeyword */ ? isTypeAliasDeclaration(parent2) : node.kind === 144 /* NamespaceKeyword */ || node.kind === 143 /* ModuleKeyword */ ? isModuleDeclaration(parent2) : node.kind === 101 /* ImportKeyword */ ? isImportEqualsDeclaration(parent2) : node.kind === 138 /* GetKeyword */ ? isGetAccessorDeclaration(parent2) : node.kind === 152 /* SetKeyword */ && isSetAccessorDeclaration(parent2)) { const location = getAdjustedLocationForDeclaration(parent2, forRename); if (location) { return location; } } - if ((node.kind === 113 /* VarKeyword */ || node.kind === 85 /* ConstKeyword */ || node.kind === 119 /* LetKeyword */) && isVariableDeclarationList(parent2) && parent2.declarations.length === 1) { + if ((node.kind === 114 /* VarKeyword */ || node.kind === 86 /* ConstKeyword */ || node.kind === 120 /* LetKeyword */) && isVariableDeclarationList(parent2) && parent2.declarations.length === 1) { const decl = parent2.declarations[0]; if (isIdentifier(decl.name)) { return decl.name; } } - if (node.kind === 154 /* TypeKeyword */) { + if (node.kind === 155 /* TypeKeyword */) { if (isImportClause(parent2) && parent2.isTypeOnly) { const location = getAdjustedLocationForImportDeclaration(parent2.parent, forRename); if (location) { @@ -126604,7 +126666,7 @@ } } } - if (node.kind === 128 /* AsKeyword */) { + if (node.kind === 129 /* AsKeyword */) { if (isImportSpecifier(parent2) && parent2.propertyName || isExportSpecifier(parent2) && parent2.propertyName || isNamespaceImport(parent2) || isNamespaceExport(parent2)) { return parent2.name; } @@ -126612,13 +126674,13 @@ return parent2.exportClause.name; } } - if (node.kind === 100 /* ImportKeyword */ && isImportDeclaration(parent2)) { + if (node.kind === 101 /* ImportKeyword */ && isImportDeclaration(parent2)) { const location = getAdjustedLocationForImportDeclaration(parent2, forRename); if (location) { return location; } } - if (node.kind === 93 /* ExportKeyword */) { + if (node.kind === 94 /* ExportKeyword */) { if (isExportDeclaration(parent2)) { const location = getAdjustedLocationForExportDeclaration(parent2, forRename); if (location) { @@ -126629,19 +126691,19 @@ return skipOuterExpressions(parent2.expression); } } - if (node.kind === 147 /* RequireKeyword */ && isExternalModuleReference(parent2)) { + if (node.kind === 148 /* RequireKeyword */ && isExternalModuleReference(parent2)) { return parent2.expression; } - if (node.kind === 158 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { + if (node.kind === 159 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { return parent2.moduleSpecifier; } - if ((node.kind === 94 /* ExtendsKeyword */ || node.kind === 117 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) { + if ((node.kind === 95 /* ExtendsKeyword */ || node.kind === 118 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) { const location = getAdjustedLocationForHeritageClause(parent2); if (location) { return location; } } - if (node.kind === 94 /* ExtendsKeyword */) { + if (node.kind === 95 /* ExtendsKeyword */) { if (isTypeParameterDeclaration(parent2) && parent2.constraint && isTypeReferenceNode(parent2.constraint)) { return parent2.constraint.typeName; } @@ -126649,31 +126711,31 @@ return parent2.extendsType.typeName; } } - if (node.kind === 138 /* InferKeyword */ && isInferTypeNode(parent2)) { + if (node.kind === 139 /* InferKeyword */ && isInferTypeNode(parent2)) { return parent2.typeParameter.name; } - if (node.kind === 101 /* InKeyword */ && isTypeParameterDeclaration(parent2) && isMappedTypeNode(parent2.parent)) { + if (node.kind === 102 /* InKeyword */ && isTypeParameterDeclaration(parent2) && isMappedTypeNode(parent2.parent)) { return parent2.name; } - if (node.kind === 141 /* KeyOfKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 141 /* KeyOfKeyword */ && isTypeReferenceNode(parent2.type)) { + if (node.kind === 142 /* KeyOfKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 142 /* KeyOfKeyword */ && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 146 /* ReadonlyKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 146 /* ReadonlyKeyword */ && isArrayTypeNode(parent2.type) && isTypeReferenceNode(parent2.type.elementType)) { + if (node.kind === 147 /* ReadonlyKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 147 /* ReadonlyKeyword */ && isArrayTypeNode(parent2.type) && isTypeReferenceNode(parent2.type.elementType)) { return parent2.type.elementType.typeName; } if (!forRename) { - if (node.kind === 103 /* NewKeyword */ && isNewExpression(parent2) || node.kind === 114 /* VoidKeyword */ && isVoidExpression(parent2) || node.kind === 112 /* TypeOfKeyword */ && isTypeOfExpression(parent2) || node.kind === 133 /* AwaitKeyword */ && isAwaitExpression(parent2) || node.kind === 125 /* YieldKeyword */ && isYieldExpression(parent2) || node.kind === 89 /* DeleteKeyword */ && isDeleteExpression(parent2)) { + if (node.kind === 104 /* NewKeyword */ && isNewExpression(parent2) || node.kind === 115 /* VoidKeyword */ && isVoidExpression(parent2) || node.kind === 113 /* TypeOfKeyword */ && isTypeOfExpression(parent2) || node.kind === 134 /* AwaitKeyword */ && isAwaitExpression(parent2) || node.kind === 126 /* YieldKeyword */ && isYieldExpression(parent2) || node.kind === 90 /* DeleteKeyword */ && isDeleteExpression(parent2)) { if (parent2.expression) { return skipOuterExpressions(parent2.expression); } } - if ((node.kind === 101 /* InKeyword */ || node.kind === 102 /* InstanceOfKeyword */) && isBinaryExpression(parent2) && parent2.operatorToken === node) { + if ((node.kind === 102 /* InKeyword */ || node.kind === 103 /* InstanceOfKeyword */) && isBinaryExpression(parent2) && parent2.operatorToken === node) { return skipOuterExpressions(parent2.right); } - if (node.kind === 128 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { + if (node.kind === 129 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 101 /* InKeyword */ && isForInStatement(parent2) || node.kind === 162 /* OfKeyword */ && isForOfStatement(parent2)) { + if (node.kind === 102 /* InKeyword */ && isForInStatement(parent2) || node.kind === 163 /* OfKeyword */ && isForOfStatement(parent2)) { return skipOuterExpressions(parent2.expression); } } @@ -126860,7 +126922,7 @@ } } } - Debug.assert(startNode2 !== void 0 || n.kind === 308 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); + Debug.assert(startNode2 !== void 0 || n.kind === 309 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); const candidate = findRightmostChildNodeWithTokens( children, /*exclusiveStartPosition*/ @@ -126895,7 +126957,7 @@ for (let i = exclusiveStartPosition - 1; i >= 0; i--) { const child = children[i]; if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 282 /* JsxSelfClosingElement */)) { + if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 283 /* JsxSelfClosingElement */)) { Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); } } else if (nodeHasTokens(children[i], sourceFile)) { @@ -126927,13 +126989,13 @@ if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 11 /* JsxText */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 291 /* JsxExpression */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 292 /* JsxExpression */) { return true; } - if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 291 /* JsxExpression */) { + if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 292 /* JsxExpression */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 284 /* JsxClosingElement */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 285 /* JsxClosingElement */) { return true; } return false; @@ -126961,9 +127023,9 @@ function isInsideJsxElement(sourceFile, position) { function isInsideJsxElementTraversal(node) { while (node) { - if (node.kind >= 282 /* JsxSelfClosingElement */ && node.kind <= 291 /* JsxExpression */ || node.kind === 11 /* JsxText */ || node.kind === 29 /* LessThanToken */ || node.kind === 31 /* GreaterThanToken */ || node.kind === 79 /* Identifier */ || node.kind === 19 /* CloseBraceToken */ || node.kind === 18 /* OpenBraceToken */ || node.kind === 43 /* SlashToken */) { + if (node.kind >= 283 /* JsxSelfClosingElement */ && node.kind <= 292 /* JsxExpression */ || node.kind === 11 /* JsxText */ || node.kind === 29 /* LessThanToken */ || node.kind === 31 /* GreaterThanToken */ || node.kind === 79 /* Identifier */ || node.kind === 19 /* CloseBraceToken */ || node.kind === 18 /* OpenBraceToken */ || node.kind === 43 /* SlashToken */) { node = node.parent; - } else if (node.kind === 281 /* JsxElement */) { + } else if (node.kind === 282 /* JsxElement */) { if (position > node.getStart(sourceFile)) return true; node = node.parent; @@ -127080,11 +127142,11 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 112 /* TypeOfKeyword */: - case 94 /* ExtendsKeyword */: - case 141 /* KeyOfKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 113 /* TypeOfKeyword */: + case 95 /* ExtendsKeyword */: + case 142 /* KeyOfKeyword */: case 24 /* DotToken */: case 51 /* BarToken */: case 57 /* QuestionToken */: @@ -127135,15 +127197,15 @@ result.push("deprecated" /* deprecatedModifier */); if (node.flags & 16777216 /* Ambient */) result.push("declare" /* ambientModifier */); - if (node.kind === 274 /* ExportAssignment */) + if (node.kind === 275 /* ExportAssignment */) result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 180 /* TypeReference */ || node.kind === 210 /* CallExpression */) { + if (node.kind === 181 /* TypeReference */ || node.kind === 211 /* CallExpression */) { return node.typeArguments; } - if (isFunctionLike(node) || node.kind === 260 /* ClassDeclaration */ || node.kind === 261 /* InterfaceDeclaration */) { + if (isFunctionLike(node) || node.kind === 261 /* ClassDeclaration */ || node.kind === 262 /* InterfaceDeclaration */) { return node.typeParameters; } return void 0; @@ -127157,12 +127219,15 @@ } return false; } + function areIntersectedTypesAvoidingStringReduction(checker, t1, t2) { + return !!(t1.flags & 4 /* String */) && checker.isEmptyAnonymousObjectType(t2); + } function isStringAndEmptyAnonymousObjectIntersection(type) { if (!type.isIntersection()) { return false; } const { types, checker } = type; - return types.length === 2 && types[0].flags & 4 /* String */ && checker.isEmptyAnonymousObjectType(types[1]); + return types.length === 2 && (areIntersectedTypesAvoidingStringReduction(checker, types[0], types[1]) || areIntersectedTypesAvoidingStringReduction(checker, types[1], types[0])); } function isPunctuation(kind) { return 18 /* FirstPunctuation */ <= kind && kind <= 78 /* LastPunctuation */; @@ -127172,9 +127237,9 @@ } function isAccessibilityModifier(kind) { switch (kind) { - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: return true; } return false; @@ -127185,14 +127250,14 @@ return result; } function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 206 /* ArrayLiteralExpression */ || node.kind === 207 /* ObjectLiteralExpression */) { - if (node.parent.kind === 223 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 207 /* ArrayLiteralExpression */ || node.kind === 208 /* ObjectLiteralExpression */) { + if (node.parent.kind === 224 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { return true; } - if (node.parent.kind === 247 /* ForOfStatement */ && node.parent.initializer === node) { + if (node.parent.kind === 248 /* ForOfStatement */ && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 299 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 300 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -127261,7 +127326,7 @@ return contains(typeKeywords, kind); } function isTypeKeywordToken(node) { - return node.kind === 154 /* TypeKeyword */; + return node.kind === 155 /* TypeKeyword */; } function isTypeKeywordTokenOrIdentifier(node) { return isTypeKeywordToken(node) || isIdentifier(node) && node.text === "type"; @@ -127290,7 +127355,7 @@ return type.isTypeParameter() ? type.getConstraint() || type : type; } function getNameFromPropertyName(name) { - return name.kind === 164 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); + return name.kind === 165 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); } function programContainsModules(program) { return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!(s.externalModuleIndicator || s.commonJsModuleIndicator)); @@ -127412,7 +127477,7 @@ } function insertImports(changes, sourceFile, imports, blankLineBetween, preferences) { const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 240 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; + const importKindPredicate = decl.kind === 241 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; const existingImportStatements = filter(sourceFile.statements, importKindPredicate); let sortKind = isArray(imports) ? ts_OrganizeImports_exports.detectImportDeclarationSorting(imports, preferences) : 3 /* Both */; const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); @@ -127977,13 +128042,13 @@ function getContextualTypeFromParent(node, checker, contextFlags) { const parent2 = walkUpParenthesizedExpressions(node.parent); switch (parent2.kind) { - case 211 /* NewExpression */: + case 212 /* NewExpression */: return checker.getContextualType(parent2, contextFlags); - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const { left, operatorToken, right } = parent2; return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node, contextFlags); } - case 292 /* CaseClause */: + case 293 /* CaseClause */: return getSwitchedType(parent2, checker); default: return checker.getContextualType(node, contextFlags); @@ -128009,8 +128074,8 @@ switch (node.kind) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 212 /* TaggedTemplateExpression */: + case 226 /* TemplateExpression */: + case 213 /* TaggedTemplateExpression */: return true; default: return false; @@ -128045,16 +128110,16 @@ return typeIsAccessible ? res : void 0; } function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 176 /* CallSignature */ || kind === 177 /* ConstructSignature */ || kind === 178 /* IndexSignature */ || kind === 168 /* PropertySignature */ || kind === 170 /* MethodSignature */; + return kind === 177 /* CallSignature */ || kind === 178 /* ConstructSignature */ || kind === 179 /* IndexSignature */ || kind === 169 /* PropertySignature */ || kind === 171 /* MethodSignature */; } function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 259 /* FunctionDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 260 /* FunctionDeclaration */ || kind === 174 /* Constructor */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 264 /* ModuleDeclaration */; + return kind === 265 /* ModuleDeclaration */; } function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 240 /* VariableStatement */ || kind === 241 /* ExpressionStatement */ || kind === 243 /* DoStatement */ || kind === 248 /* ContinueStatement */ || kind === 249 /* BreakStatement */ || kind === 250 /* ReturnStatement */ || kind === 254 /* ThrowStatement */ || kind === 256 /* DebuggerStatement */ || kind === 169 /* PropertyDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 274 /* ExportAssignment */; + return kind === 241 /* VariableStatement */ || kind === 242 /* ExpressionStatement */ || kind === 244 /* DoStatement */ || kind === 249 /* ContinueStatement */ || kind === 250 /* BreakStatement */ || kind === 251 /* ReturnStatement */ || kind === 255 /* ThrowStatement */ || kind === 257 /* DebuggerStatement */ || kind === 170 /* PropertyDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 275 /* ExportAssignment */; } function nodeIsASICandidate(node, sourceFile) { const lastToken = node.getLastToken(sourceFile); @@ -128078,7 +128143,7 @@ } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { return false; } - if (node.kind === 243 /* DoStatement */) { + if (node.kind === 244 /* DoStatement */) { return true; } const topNode = findAncestor(node, (ancestor) => !ancestor.parent); @@ -128609,25 +128674,25 @@ })(SemanticMeaning || {}); tripleSlashDirectivePrefixRegex = /^\/\/\/\s* { QuotePreference5[QuotePreference5["Single"] = 0] = "Single"; @@ -129095,8 +129160,8 @@ handleToken(); lastNonTriviaToken = token; } - const end = scanner2.getTextPos(); - pushEncodedClassification(scanner2.getTokenPos(), end, offset, classFromKind(token), spans); + const end = scanner2.getTokenEnd(); + pushEncodedClassification(scanner2.getTokenStart(), end, offset, classFromKind(token), spans); if (end >= text.length) { const end2 = getNewEndOfLineState(scanner2, token, lastOrUndefined(templateStack)); if (end2 !== void 0) { @@ -129122,11 +129187,11 @@ angleBracketStack--; } break; - case 131 /* AnyKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: + case 132 /* AnyKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: if (angleBracketStack > 0 && !syntacticClassifierAbsent) { token = 79 /* Identifier */; } @@ -129279,11 +129344,11 @@ return true; } switch (keyword2) { - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: - case 135 /* ConstructorKeyword */: - case 124 /* StaticKeyword */: - case 127 /* AccessorKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: + case 136 /* ConstructorKeyword */: + case 125 /* StaticKeyword */: + case 128 /* AccessorKeyword */: return true; default: return false; @@ -129323,10 +129388,10 @@ case 31 /* GreaterThanToken */: case 32 /* LessThanEqualsToken */: case 33 /* GreaterThanEqualsToken */: - case 102 /* InstanceOfKeyword */: - case 101 /* InKeyword */: - case 128 /* AsKeyword */: - case 150 /* SatisfiesKeyword */: + case 103 /* InstanceOfKeyword */: + case 102 /* InKeyword */: + case 129 /* AsKeyword */: + case 151 /* SatisfiesKeyword */: case 34 /* EqualsEqualsToken */: case 35 /* ExclamationEqualsToken */: case 36 /* EqualsEqualsEqualsToken */: @@ -129408,13 +129473,13 @@ } function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -129561,14 +129626,14 @@ result.push(type); } function classifyLeadingTriviaAndGetTokenStart(token) { - triviaScanner.setTextPos(token.pos); + triviaScanner.resetTokenState(token.pos); while (true) { - const start = triviaScanner.getTextPos(); + const start = triviaScanner.getTokenEnd(); if (!couldStartTrivia(sourceFile.text, start)) { return start; } const kind = triviaScanner.scan(); - const end = triviaScanner.getTextPos(); + const end = triviaScanner.getTokenEnd(); const width = end - start; if (!isTrivia(kind)) { return start; @@ -129580,7 +129645,7 @@ case 2 /* SingleLineCommentTrivia */: case 3 /* MultiLineCommentTrivia */: classifyComment(token, kind, start, width); - triviaScanner.setTextPos(end); + triviaScanner.resetTokenState(end); continue; case 7 /* ConflictMarkerTrivia */: const text = sourceFile.text; @@ -129630,49 +129695,49 @@ pos = tag.tagName.end; let commentStart = tag.tagName.end; switch (tag.kind) { - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: const param = tag; processJSDocParameterTag(param); commentStart = param.isNameFirst && ((_a2 = param.typeExpression) == null ? void 0 : _a2.end) || param.name.end; break; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: const prop = tag; commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; break; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; commentStart = tag.typeParameters.end; break; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 312 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; + commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 313 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; break; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: commentStart = tag.typeExpression.end; break; - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = tag.typeExpression.end; break; - case 346 /* JSDocThisTag */: - case 343 /* JSDocEnumTag */: + case 347 /* JSDocThisTag */: + case 344 /* JSDocEnumTag */: commentStart = tag.typeExpression.end; break; - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; break; - case 350 /* JSDocSeeTag */: + case 351 /* JSDocSeeTag */: commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; break; - case 331 /* JSDocAugmentsTag */: - case 332 /* JSDocImplementsTag */: + case 332 /* JSDocAugmentsTag */: + case 333 /* JSDocImplementsTag */: commentStart = tag.class.end; break; - case 352 /* JSDocThrowsTag */: + case 353 /* JSDocThrowsTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_h = tag.typeExpression) == null ? void 0 : _h.end) || commentStart; @@ -129779,15 +129844,15 @@ } } pushClassification(start, i - start, 1 /* comment */); - mergeConflictScanner.setTextPos(i); - while (mergeConflictScanner.getTextPos() < end) { + mergeConflictScanner.resetTokenState(i); + while (mergeConflictScanner.getTokenEnd() < end) { classifyDisabledCodeToken(); } } function classifyDisabledCodeToken() { - const start = mergeConflictScanner.getTextPos(); + const start = mergeConflictScanner.getTokenEnd(); const tokenKind = mergeConflictScanner.scan(); - const end = mergeConflictScanner.getTextPos(); + const end = mergeConflictScanner.getTokenEnd(); const type = classifyTokenType(tokenKind); if (type) { pushClassification(start, end - start, type); @@ -129817,22 +129882,22 @@ } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 283 /* JsxOpeningElement */: + case 284 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 284 /* JsxClosingElement */: + case 285 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 282 /* JsxSelfClosingElement */: + case 283 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -129853,11 +129918,11 @@ if (token) { const parent2 = token.parent; if (tokenKind === 63 /* EqualsToken */) { - if (parent2.kind === 257 /* VariableDeclaration */ || parent2.kind === 169 /* PropertyDeclaration */ || parent2.kind === 166 /* Parameter */ || parent2.kind === 288 /* JsxAttribute */) { + if (parent2.kind === 258 /* VariableDeclaration */ || parent2.kind === 170 /* PropertyDeclaration */ || parent2.kind === 167 /* Parameter */ || parent2.kind === 289 /* JsxAttribute */) { return 5 /* operator */; } } - if (parent2.kind === 223 /* BinaryExpression */ || parent2.kind === 221 /* PrefixUnaryExpression */ || parent2.kind === 222 /* PostfixUnaryExpression */ || parent2.kind === 224 /* ConditionalExpression */) { + if (parent2.kind === 224 /* BinaryExpression */ || parent2.kind === 222 /* PrefixUnaryExpression */ || parent2.kind === 223 /* PostfixUnaryExpression */ || parent2.kind === 225 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -129867,7 +129932,7 @@ } else if (tokenKind === 9 /* BigIntLiteral */) { return 25 /* bigintLiteral */; } else if (tokenKind === 10 /* StringLiteral */) { - return token && token.parent.kind === 288 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 289 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 13 /* RegularExpressionLiteral */) { return 6 /* stringLiteral */; } else if (isTemplateLiteralKind(tokenKind)) { @@ -129877,32 +129942,32 @@ } else if (tokenKind === 79 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 166 /* Parameter */: + case 167 /* Parameter */: if (token.parent.name === token) { return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -129940,14 +130005,14 @@ 8 /* NumericLiteral */, 9 /* BigIntLiteral */, 13 /* RegularExpressionLiteral */, - 108 /* ThisKeyword */, + 109 /* ThisKeyword */, 45 /* PlusPlusToken */, 46 /* MinusMinusToken */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 19 /* CloseBraceToken */, - 110 /* TrueKeyword */, - 95 /* FalseKeyword */ + 111 /* TrueKeyword */, + 96 /* FalseKeyword */ ], (token) => token, () => true); } }); @@ -130011,50 +130076,50 @@ } function getHighlightSpans(node, sourceFile) { switch (node.kind) { - case 99 /* IfKeyword */: - case 91 /* ElseKeyword */: + case 100 /* IfKeyword */: + case 92 /* ElseKeyword */: return isIfStatement(node.parent) ? getIfElseOccurrences(node.parent, sourceFile) : void 0; - case 105 /* ReturnKeyword */: + case 106 /* ReturnKeyword */: return useParent(node.parent, isReturnStatement, getReturnOccurrences); - case 109 /* ThrowKeyword */: + case 110 /* ThrowKeyword */: return useParent(node.parent, isThrowStatement, getThrowOccurrences); - case 111 /* TryKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: - const tryStatement = node.kind === 83 /* CatchKeyword */ ? node.parent.parent : node.parent; + case 112 /* TryKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: + const tryStatement = node.kind === 84 /* CatchKeyword */ ? node.parent.parent : node.parent; return useParent(tryStatement, isTryStatement, getTryCatchFinallyOccurrences); - case 107 /* SwitchKeyword */: + case 108 /* SwitchKeyword */: return useParent(node.parent, isSwitchStatement, getSwitchCaseDefaultOccurrences); - case 82 /* CaseKeyword */: - case 88 /* DefaultKeyword */: { + case 83 /* CaseKeyword */: + case 89 /* DefaultKeyword */: { if (isDefaultClause(node.parent) || isCaseClause(node.parent)) { return useParent(node.parent.parent.parent, isSwitchStatement, getSwitchCaseDefaultOccurrences); } return void 0; } - case 81 /* BreakKeyword */: - case 86 /* ContinueKeyword */: + case 82 /* BreakKeyword */: + case 87 /* ContinueKeyword */: return useParent(node.parent, isBreakOrContinueStatement, getBreakOrContinueStatementOccurrences); - case 97 /* ForKeyword */: - case 115 /* WhileKeyword */: - case 90 /* DoKeyword */: + case 98 /* ForKeyword */: + case 116 /* WhileKeyword */: + case 91 /* DoKeyword */: return useParent(node.parent, (n) => isIterationStatement( n, /*lookInLabeledStatements*/ true ), getLoopBreakContinueOccurrences); - case 135 /* ConstructorKeyword */: - return getFromAllDeclarations(isConstructorDeclaration, [135 /* ConstructorKeyword */]); - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: - return getFromAllDeclarations(isAccessor, [137 /* GetKeyword */, 151 /* SetKeyword */]); - case 133 /* AwaitKeyword */: + case 136 /* ConstructorKeyword */: + return getFromAllDeclarations(isConstructorDeclaration, [136 /* ConstructorKeyword */]); + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: + return getFromAllDeclarations(isAccessor, [138 /* GetKeyword */, 152 /* SetKeyword */]); + case 134 /* AwaitKeyword */: return useParent(node.parent, isAwaitExpression, getAsyncAndAwaitOccurrences); - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return highlightSpans(getAsyncAndAwaitOccurrences(node)); - case 125 /* YieldKeyword */: + case 126 /* YieldKeyword */: return highlightSpans(getYieldOccurrences(node)); - case 101 /* InKeyword */: + case 102 /* InKeyword */: return void 0; default: return isModifierKind(node.kind) && (isDeclaration(node.parent) || isVariableStatement(node.parent)) ? highlightSpans(getModifierOccurrences(node.kind, node.parent)) : void 0; @@ -130087,7 +130152,7 @@ let child = throwStatement; while (child.parent) { const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 308 /* SourceFile */) { + if (isFunctionBlock(parent2) || parent2.kind === 309 /* SourceFile */) { return parent2; } if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { @@ -130117,15 +130182,15 @@ function getBreakOrContinueOwner(statement) { return findAncestor(statement, (node) => { switch (node.kind) { - case 252 /* SwitchStatement */: - if (statement.kind === 248 /* ContinueStatement */) { + case 253 /* SwitchStatement */: + if (statement.kind === 249 /* ContinueStatement */) { return false; } - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 244 /* WhileStatement */: - case 243 /* DoStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 245 /* WhileStatement */: + case 244 /* DoStatement */: return !statement.label || isLabeledBy(node, statement.label.escapedText); default: return isFunctionLike(node) && "quit"; @@ -130138,24 +130203,24 @@ function getNodesToSearchForModifier(declaration, modifierFlag) { const container = declaration.parent; switch (container.kind) { - case 265 /* ModuleBlock */: - case 308 /* SourceFile */: - case 238 /* Block */: - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 266 /* ModuleBlock */: + case 309 /* SourceFile */: + case 239 /* Block */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; } - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 259 /* FunctionDeclaration */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 184 /* TypeLiteral */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 185 /* TypeLiteral */: const nodes = container.members; if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); @@ -130166,7 +130231,7 @@ return [...nodes, container]; } return nodes; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return void 0; default: Debug.assertNever(container, "Invalid container kind."); @@ -130181,11 +130246,11 @@ } function getLoopBreakContinueOccurrences(loopNode) { const keywords = []; - if (pushKeywordIf(keywords, loopNode.getFirstToken(), 97 /* ForKeyword */, 115 /* WhileKeyword */, 90 /* DoKeyword */)) { - if (loopNode.kind === 243 /* DoStatement */) { + if (pushKeywordIf(keywords, loopNode.getFirstToken(), 98 /* ForKeyword */, 116 /* WhileKeyword */, 91 /* DoKeyword */)) { + if (loopNode.kind === 244 /* DoStatement */) { const loopTokens = loopNode.getChildren(); for (let i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 115 /* WhileKeyword */)) { + if (pushKeywordIf(keywords, loopTokens[i], 116 /* WhileKeyword */)) { break; } } @@ -130193,7 +130258,7 @@ } forEach(aggregateAllBreakAndContinueStatements(loopNode.statement), (statement) => { if (ownsBreakOrContinueStatement(loopNode, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 81 /* BreakKeyword */, 86 /* ContinueKeyword */); + pushKeywordIf(keywords, statement.getFirstToken(), 82 /* BreakKeyword */, 87 /* ContinueKeyword */); } }); return keywords; @@ -130202,13 +130267,13 @@ const owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -130216,12 +130281,12 @@ } function getSwitchCaseDefaultOccurrences(switchStatement) { const keywords = []; - pushKeywordIf(keywords, switchStatement.getFirstToken(), 107 /* SwitchKeyword */); + pushKeywordIf(keywords, switchStatement.getFirstToken(), 108 /* SwitchKeyword */); forEach(switchStatement.caseBlock.clauses, (clause) => { - pushKeywordIf(keywords, clause.getFirstToken(), 82 /* CaseKeyword */, 88 /* DefaultKeyword */); + pushKeywordIf(keywords, clause.getFirstToken(), 83 /* CaseKeyword */, 89 /* DefaultKeyword */); forEach(aggregateAllBreakAndContinueStatements(clause), (statement) => { if (ownsBreakOrContinueStatement(switchStatement, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 81 /* BreakKeyword */); + pushKeywordIf(keywords, statement.getFirstToken(), 82 /* BreakKeyword */); } }); }); @@ -130229,13 +130294,13 @@ } function getTryCatchFinallyOccurrences(tryStatement, sourceFile) { const keywords = []; - pushKeywordIf(keywords, tryStatement.getFirstToken(), 111 /* TryKeyword */); + pushKeywordIf(keywords, tryStatement.getFirstToken(), 112 /* TryKeyword */); if (tryStatement.catchClause) { - pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 83 /* CatchKeyword */); + pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 84 /* CatchKeyword */); } if (tryStatement.finallyBlock) { - const finallyKeyword = findChildOfKind(tryStatement, 96 /* FinallyKeyword */, sourceFile); - pushKeywordIf(keywords, finallyKeyword, 96 /* FinallyKeyword */); + const finallyKeyword = findChildOfKind(tryStatement, 97 /* FinallyKeyword */, sourceFile); + pushKeywordIf(keywords, finallyKeyword, 97 /* FinallyKeyword */); } return keywords; } @@ -130246,11 +130311,11 @@ } const keywords = []; forEach(aggregateOwnedThrowStatements(owner), (throwStatement2) => { - keywords.push(findChildOfKind(throwStatement2, 109 /* ThrowKeyword */, sourceFile)); + keywords.push(findChildOfKind(throwStatement2, 110 /* ThrowKeyword */, sourceFile)); }); if (isFunctionBlock(owner)) { forEachReturnStatement(owner, (returnStatement) => { - keywords.push(findChildOfKind(returnStatement, 105 /* ReturnKeyword */, sourceFile)); + keywords.push(findChildOfKind(returnStatement, 106 /* ReturnKeyword */, sourceFile)); }); } return keywords; @@ -130262,10 +130327,10 @@ } const keywords = []; forEachReturnStatement(cast(func.body, isBlock), (returnStatement2) => { - keywords.push(findChildOfKind(returnStatement2, 105 /* ReturnKeyword */, sourceFile)); + keywords.push(findChildOfKind(returnStatement2, 106 /* ReturnKeyword */, sourceFile)); }); forEach(aggregateOwnedThrowStatements(func.body), (throwStatement) => { - keywords.push(findChildOfKind(throwStatement, 109 /* ThrowKeyword */, sourceFile)); + keywords.push(findChildOfKind(throwStatement, 110 /* ThrowKeyword */, sourceFile)); }); return keywords; } @@ -130277,13 +130342,13 @@ const keywords = []; if (func.modifiers) { func.modifiers.forEach((modifier) => { - pushKeywordIf(keywords, modifier, 132 /* AsyncKeyword */); + pushKeywordIf(keywords, modifier, 133 /* AsyncKeyword */); }); } forEachChild(func, (child) => { traverseWithoutCrossingFunction(child, (node2) => { if (isAwaitExpression(node2)) { - pushKeywordIf(keywords, node2.getFirstToken(), 133 /* AwaitKeyword */); + pushKeywordIf(keywords, node2.getFirstToken(), 134 /* AwaitKeyword */); } }); }); @@ -130298,7 +130363,7 @@ forEachChild(func, (child) => { traverseWithoutCrossingFunction(child, (node2) => { if (isYieldExpression(node2)) { - pushKeywordIf(keywords, node2.getFirstToken(), 125 /* YieldKeyword */); + pushKeywordIf(keywords, node2.getFirstToken(), 126 /* YieldKeyword */); } }); }); @@ -130314,7 +130379,7 @@ const keywords = getIfElseKeywords(ifStatement, sourceFile); const result = []; for (let i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 91 /* ElseKeyword */ && i < keywords.length - 1) { + if (keywords[i].kind === 92 /* ElseKeyword */ && i < keywords.length - 1) { const elseKeyword = keywords[i]; const ifKeyword = keywords[i + 1]; let shouldCombineElseAndIf = true; @@ -130345,9 +130410,9 @@ } while (true) { const children = ifStatement.getChildren(sourceFile); - pushKeywordIf(keywords, children[0], 99 /* IfKeyword */); + pushKeywordIf(keywords, children[0], 100 /* IfKeyword */); for (let i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 91 /* ElseKeyword */)) { + if (pushKeywordIf(keywords, children[i], 92 /* ElseKeyword */)) { break; } } @@ -131186,7 +131251,7 @@ } function getFileReference() { const fileName = scanner.getTokenValue(); - const pos = scanner.getTokenPos(); + const pos = scanner.getTokenStart(); return { fileName, pos, end: pos + fileName.length }; } function recordAmbientExternalModule() { @@ -131206,9 +131271,9 @@ } function tryConsumeDeclare() { let token = scanner.getToken(); - if (token === 136 /* DeclareKeyword */) { + if (token === 137 /* DeclareKeyword */) { token = nextToken(); - if (token === 142 /* ModuleKeyword */) { + if (token === 143 /* ModuleKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordAmbientExternalModule(); @@ -131223,7 +131288,7 @@ return false; } let token = scanner.getToken(); - if (token === 100 /* ImportKeyword */) { + if (token === 101 /* ImportKeyword */) { token = nextToken(); if (token === 20 /* OpenParenToken */) { token = nextToken(); @@ -131235,10 +131300,10 @@ recordModuleName(); return true; } else { - if (token === 154 /* TypeKeyword */) { + if (token === 155 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); - return token2 !== 158 /* FromKeyword */ && (token2 === 41 /* AsteriskToken */ || token2 === 18 /* OpenBraceToken */ || token2 === 79 /* Identifier */ || isKeyword(token2)); + return token2 !== 159 /* FromKeyword */ && (token2 === 41 /* AsteriskToken */ || token2 === 18 /* OpenBraceToken */ || token2 === 79 /* Identifier */ || isKeyword(token2)); }); if (skipTypeKeyword) { token = nextToken(); @@ -131246,7 +131311,7 @@ } if (token === 79 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -131272,7 +131337,7 @@ } if (token === 19 /* CloseBraceToken */) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -131281,11 +131346,11 @@ } } else if (token === 41 /* AsteriskToken */) { token = nextToken(); - if (token === 128 /* AsKeyword */) { + if (token === 129 /* AsKeyword */) { token = nextToken(); if (token === 79 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -131301,10 +131366,10 @@ } function tryConsumeExport() { let token = scanner.getToken(); - if (token === 93 /* ExportKeyword */) { + if (token === 94 /* ExportKeyword */) { markAsExternalModuleIfTopLevel(); token = nextToken(); - if (token === 154 /* TypeKeyword */) { + if (token === 155 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); return token2 === 41 /* AsteriskToken */ || token2 === 18 /* OpenBraceToken */; @@ -131320,7 +131385,7 @@ } if (token === 19 /* CloseBraceToken */) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); @@ -131329,15 +131394,15 @@ } } else if (token === 41 /* AsteriskToken */) { token = nextToken(); - if (token === 158 /* FromKeyword */) { + if (token === 159 /* FromKeyword */) { token = nextToken(); if (token === 10 /* StringLiteral */) { recordModuleName(); } } - } else if (token === 100 /* ImportKeyword */) { + } else if (token === 101 /* ImportKeyword */) { token = nextToken(); - if (token === 154 /* TypeKeyword */) { + if (token === 155 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); return token2 === 79 /* Identifier */ || isKeyword(token2); @@ -131364,7 +131429,7 @@ } function tryConsumeRequireCall(skipCurrentToken, allowTemplateLiterals = false) { let token = skipCurrentToken ? nextToken() : scanner.getToken(); - if (token === 147 /* RequireKeyword */) { + if (token === 148 /* RequireKeyword */) { token = nextToken(); if (token === 20 /* OpenParenToken */) { token = nextToken(); @@ -131421,7 +131486,7 @@ switch (token) { case 1 /* EndOfFileToken */: break loop; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: tryConsumeImport(); break; case 15 /* TemplateHead */: @@ -131709,13 +131774,13 @@ function containsTopLevelCommonjs(sourceFile) { return sourceFile.statements.some((statement) => { switch (statement.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall( propertyAccessLeftHandSide(decl.initializer), /*checkArgumentIsStringLiteralLike*/ true )); - case 241 /* ExpressionStatement */: { + case 242 /* ExpressionStatement */: { const { expression } = statement; if (!isBinaryExpression(expression)) return isRequireCall( @@ -131736,10 +131801,10 @@ } function importNameForConvertToDefaultImport(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 271 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 268 /* ImportEqualsDeclaration */: + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 272 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; + case 269 /* ImportEqualsDeclaration */: return node.name; default: return void 0; @@ -131798,23 +131863,23 @@ if (node.arguments.length < maxArguments) return true; return maxArguments === 1 || some(node.arguments, (arg) => { - return arg.kind === 104 /* NullKeyword */ || isIdentifier(arg) && arg.text === "undefined"; + return arg.kind === 105 /* NullKeyword */ || isIdentifier(arg) && arg.text === "undefined"; }); } function isFixablePromiseArgument(arg, checker) { switch (arg.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: const functionFlags = getFunctionFlags(arg); if (functionFlags & 1 /* Generator */) { return false; } - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: return true; case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: { + case 209 /* PropertyAccessExpression */: { const symbol = checker.getSymbolAtLocation(arg); if (!symbol) { return false; @@ -131848,10 +131913,10 @@ } function canBeConvertedToAsync(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: return false; @@ -132026,9 +132091,9 @@ } function shouldKeepItem(declaration, checker) { switch (declaration.kind) { - case 270 /* ImportClause */: - case 273 /* ImportSpecifier */: - case 268 /* ImportEqualsDeclaration */: + case 271 /* ImportClause */: + case 274 /* ImportSpecifier */: + case 269 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); return importer.escapedName !== imported.escapedName; @@ -132038,7 +132103,7 @@ } function tryAddSingleDeclarationName(declaration, containers) { const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 164 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); + return !!name && (pushLiteral(name, containers) || name.kind === 165 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); } function tryAddComputedPropertyName(expression, containers) { return pushLiteral(expression, containers) || isPropertyAccessExpression(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers); @@ -132049,7 +132114,7 @@ function getContainers(declaration) { const containers = []; const name = getNameOfDeclaration(declaration); - if (name && name.kind === 164 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { + if (name && name.kind === 165 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { return emptyArray; } containers.shift(); @@ -132222,7 +132287,7 @@ } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 223 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + return !hasDynamicName(node) || node.kind !== 224 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -132230,7 +132295,7 @@ return; } switch (node.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: const ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (const param of ctr.parameters) { @@ -132239,32 +132304,32 @@ } } break; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 171 /* MethodSignature */: if (hasNavigationBarName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: if (hasNavigationBarName(node)) { addNodeWithRecursiveInitializer(node); } break; - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: if (hasNavigationBarName(node)) { addLeafNode(node); } break; - case 270 /* ImportClause */: + case 271 /* ImportClause */: const importClause = node; if (importClause.name) { addLeafNode(importClause.name); } const { namedBindings } = importClause; if (namedBindings) { - if (namedBindings.kind === 271 /* NamespaceImport */) { + if (namedBindings.kind === 272 /* NamespaceImport */) { addLeafNode(namedBindings); } else { for (const element of namedBindings.elements) { @@ -132273,16 +132338,16 @@ } } break; - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: addNodeWithRecursiveChild(node, node.name); break; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: const { expression } = node; isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; - case 205 /* BindingElement */: - case 299 /* PropertyAssignment */: - case 257 /* VariableDeclaration */: { + case 206 /* BindingElement */: + case 300 /* PropertyAssignment */: + case 258 /* VariableDeclaration */: { const child = node; if (isBindingPattern(child.name)) { addChildrenRecursively(child.name); @@ -132291,18 +132356,18 @@ } break; } - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: const nameNode = node.name; if (nameNode && isIdentifier(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); break; - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: startNode(node); for (const member of node.members) { if (!isComputedProperty(member)) { @@ -132311,19 +132376,19 @@ } endNode(); break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: startNode(node); for (const member of node.members) { addChildrenRecursively(member); } endNode(); break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const expression2 = node.expression; const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; if (child) { @@ -132335,16 +132400,16 @@ } break; } - case 278 /* ExportSpecifier */: - case 268 /* ImportEqualsDeclaration */: - case 178 /* IndexSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 262 /* TypeAliasDeclaration */: + case 279 /* ExportSpecifier */: + case 269 /* ImportEqualsDeclaration */: + case 179 /* IndexSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 263 /* TypeAliasDeclaration */: addLeafNode(node); break; - case 210 /* CallExpression */: - case 223 /* BinaryExpression */: { + case 211 /* CallExpression */: + case 224 /* BinaryExpression */: { const special = getAssignmentDeclarationKind(node); switch (special) { case 1 /* ExportsProperty */: @@ -132554,12 +132619,12 @@ return false; } switch (a.kind) { - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return isStatic(a) === isStatic(b); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); default: return true; @@ -132576,7 +132641,7 @@ if (!a.body || !b.body) { return a.body === b.body; } - return a.body.kind === b.body.kind && (a.body.kind !== 264 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); + return a.body.kind === b.body.kind && (a.body.kind !== 265 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); } function merge(target, source) { target.additionalNodes = target.additionalNodes || []; @@ -132597,7 +132662,7 @@ return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); } function tryGetName(node) { - if (node.kind === 264 /* ModuleDeclaration */) { + if (node.kind === 265 /* ModuleDeclaration */) { return getModuleName(node); } const declName = getNameOfDeclaration(node); @@ -132606,16 +132671,16 @@ return propertyName && unescapeLeadingUnderscores(propertyName); } switch (node.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 228 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 229 /* ClassExpression */: return getFunctionOrClassName(node); default: return void 0; } } function getItemName(node, name) { - if (node.kind === 264 /* ModuleDeclaration */) { + if (node.kind === 265 /* ModuleDeclaration */) { return cleanText(getModuleName(node)); } if (name) { @@ -132625,27 +132690,27 @@ } } switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: if (getSyntacticModifierFlags(node) & 1024 /* Default */) { return "default"; } return getFunctionOrClassName(node); - case 173 /* Constructor */: + case 174 /* Constructor */: return "constructor"; - case 177 /* ConstructSignature */: + case 178 /* ConstructSignature */: return "new()"; - case 176 /* CallSignature */: + case 177 /* CallSignature */: return "()"; - case 178 /* IndexSignature */: + case 179 /* IndexSignature */: return "[]"; default: return ""; @@ -132670,19 +132735,19 @@ return true; } switch (navigationBarNodeKind(item)) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 263 /* EnumDeclaration */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 308 /* SourceFile */: - case 262 /* TypeAliasDeclaration */: - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 264 /* EnumDeclaration */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 309 /* SourceFile */: + case 263 /* TypeAliasDeclaration */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: return true; - case 216 /* ArrowFunction */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -132692,10 +132757,10 @@ return false; } switch (navigationBarNodeKind(item2.parent)) { - case 265 /* ModuleBlock */: - case 308 /* SourceFile */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: + case 266 /* ModuleBlock */: + case 309 /* SourceFile */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: return true; default: return false; @@ -132754,7 +132819,7 @@ } function getFullyQualifiedModuleName(moduleDeclaration) { const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 264 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 265 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } @@ -132764,13 +132829,13 @@ return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 164 /* ComputedPropertyName */; + return !member.name || member.name.kind === 165 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 308 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); + return node.kind === 309 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); } function getModifiers2(node) { - if (node.parent && node.parent.kind === 257 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 258 /* VariableDeclaration */) { node = node.parent; } return getNodeModifiers(node); @@ -132815,9 +132880,9 @@ } function isFunctionOrClassExpression(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: - case 228 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 229 /* ClassExpression */: return true; default: return false; @@ -132903,10 +132968,10 @@ return children; } function addSyntheticNodes(nodes, pos, end, parent2) { - scanner.setTextPos(pos); + scanner.resetTokenState(pos); while (pos < end) { const token = scanner.scan(); - const textPos = scanner.getTextPos(); + const textPos = scanner.getTokenEnd(); if (textPos <= end) { if (token === 79 /* Identifier */) { if (hasTabstop(parent2)) { @@ -132923,7 +132988,7 @@ } } function createSyntaxList(nodes, parent2) { - const list = createNode(354 /* SyntaxList */, nodes.pos, nodes.end, parent2); + const list = createNode(355 /* SyntaxList */, nodes.pos, nodes.end, parent2); list._children = []; let pos = nodes.pos; for (const node of nodes) { @@ -132948,7 +133013,7 @@ var _a2; if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 174 /* GetAccessor */ || declaration.kind === 175 /* SetAccessor */) { + if (declaration.kind === 175 /* GetAccessor */ || declaration.kind === 176 /* SetAccessor */) { return symbol.getContextualJsDocTags(declaration, checker); } return ((_a2 = symbol.declarations) == null ? void 0 : _a2.length) === 1 ? symbol.getJsDocTags() : void 0; @@ -132971,7 +133036,7 @@ const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 174 /* GetAccessor */ || declaration.kind === 175 /* SetAccessor */) { + if (declaration.kind === 175 /* GetAccessor */ || declaration.kind === 176 /* SetAccessor */) { return symbol.getContextualDocumentationComment(declaration, checker); } return symbol.getDocumentationComment(checker); @@ -132985,7 +133050,7 @@ } function findBaseOfDeclaration(checker, declaration, cb) { var _a2; - const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 173 /* Constructor */ ? declaration.parent.parent : declaration.parent; + const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 174 /* Constructor */ ? declaration.parent.parent : declaration.parent; if (!classOrInterfaceDeclaration) return; const isStaticMember = hasStaticModifier(declaration); @@ -133481,15 +133546,15 @@ switch (node.kind) { case 79 /* Identifier */: return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 208 /* PropertyAccessExpression */: - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: return !isInComment(sourceFile, position); - case 108 /* ThisKeyword */: - case 194 /* ThisType */: - case 106 /* SuperKeyword */: - case 199 /* NamedTupleMember */: + case 109 /* ThisKeyword */: + case 195 /* ThisType */: + case 107 /* SuperKeyword */: + case 200 /* NamedTupleMember */: return true; - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: return isImportMeta(node); default: return false; @@ -133587,15 +133652,15 @@ return void 0; } switch (node.kind) { - case 208 /* PropertyAccessExpression */: - case 163 /* QualifiedName */: + case 209 /* PropertyAccessExpression */: + case 164 /* QualifiedName */: case 10 /* StringLiteral */: - case 95 /* FalseKeyword */: - case 110 /* TrueKeyword */: - case 104 /* NullKeyword */: - case 106 /* SuperKeyword */: - case 108 /* ThisKeyword */: - case 194 /* ThisType */: + case 96 /* FalseKeyword */: + case 111 /* TrueKeyword */: + case 105 /* NullKeyword */: + case 107 /* SuperKeyword */: + case 109 /* ThisKeyword */: + case 195 /* ThisType */: case 79 /* Identifier */: break; default: @@ -133606,7 +133671,7 @@ if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 264 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 265 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { break; @@ -134233,7 +134298,7 @@ }); } function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 280 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); + return isDeclarationName(node) || node.parent.kind === 281 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); @@ -134244,11 +134309,11 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - if (node.parent.kind === 164 /* ComputedPropertyName */) { + if (node.parent.kind === 165 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; } case 79 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 207 /* ObjectLiteralExpression */ || node.parent.parent.kind === 289 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; + return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 208 /* ObjectLiteralExpression */ || node.parent.parent.kind === 290 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; } return void 0; } @@ -134289,7 +134354,7 @@ return discriminatedPropertySymbols; } function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 209 /* ElementAccessExpression */ && node.parent.argumentExpression === node; + return node && node.parent && node.parent.kind === 210 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { if (sys) { @@ -134373,8 +134438,8 @@ if (!children.length) { return void 0; } - const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 353 /* LastJSDocNode */); - return child.kind < 163 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + const child = find(children, (kid) => kid.kind < 313 /* FirstJSDocNode */ || kid.kind > 354 /* LastJSDocNode */); + return child.kind < 164 /* FirstNode */ ? child : child.getFirstToken(sourceFile); } getLastToken(sourceFile) { this.assertHasRealPosition(); @@ -134383,7 +134448,7 @@ if (!child) { return void 0; } - return child.kind < 163 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 164 /* FirstNode */ ? child : child.getLastToken(sourceFile); } forEachChild(cbNode, cbNodeArray) { return forEachChild(this, cbNode, cbNodeArray); @@ -134684,7 +134749,7 @@ SourceFileObject = class extends NodeObject { constructor(kind, pos, end) { super(kind, pos, end); - this.kind = 308 /* SourceFile */; + this.kind = 309 /* SourceFile */; } update(newText, textChangeRange) { return updateSourceFile(this, newText, textChangeRange); @@ -134740,10 +134805,10 @@ } function visit(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: const functionDeclaration = node; const declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -134759,29 +134824,29 @@ } forEachChild(node, visit); break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 263 /* EnumDeclaration */: - case 264 /* ModuleDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 278 /* ExportSpecifier */: - case 273 /* ImportSpecifier */: - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 184 /* TypeLiteral */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 264 /* EnumDeclaration */: + case 265 /* ModuleDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 279 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 185 /* TypeLiteral */: addDeclaration(node); forEachChild(node, visit); break; - case 166 /* Parameter */: + case 167 /* Parameter */: if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { break; } - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: { + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: { const decl = node; if (isBindingPattern(decl.name)) { forEachChild(decl.name, visit); @@ -134791,12 +134856,12 @@ visit(decl.initializer); } } - case 302 /* EnumMember */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 303 /* EnumMember */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: addDeclaration(node); break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: const exportDeclaration = node; if (exportDeclaration.exportClause) { if (isNamedExports(exportDeclaration.exportClause)) { @@ -134806,14 +134871,14 @@ } } break; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: const importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause.name); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 272 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { forEach(importClause.namedBindings.elements, visit); @@ -134821,7 +134886,7 @@ } } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) !== 0 /* None */) { addDeclaration(node); } @@ -136000,89 +136065,89 @@ if (node) { const { parent: parent2 } = node; switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 257 /* VariableDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 258 /* VariableDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return spanInVariableDeclaration(node); - case 166 /* Parameter */: + case 167 /* Parameter */: return spanInParameterDeclaration(node); - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 238 /* Block */: + case 239 /* Block */: if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return spanInBlock(node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return spanInBlock(node.block); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return textSpan(node.expression); - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 244 /* WhileStatement */: + case 245 /* WhileStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 243 /* DoStatement */: + case 244 /* DoStatement */: return spanInNode(node.statement); - case 256 /* DebuggerStatement */: + case 257 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 242 /* IfStatement */: + case 243 /* IfStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 253 /* LabeledStatement */: + case 254 /* LabeledStatement */: return spanInNode(node.statement); - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 245 /* ForStatement */: + case 246 /* ForStatement */: return spanInForStatement(node); - case 246 /* ForInStatement */: + case 247 /* ForInStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 247 /* ForOfStatement */: + case 248 /* ForOfStatement */: return spanInInitializerOfForLike(node); - case 252 /* SwitchStatement */: + case 253 /* SwitchStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return spanInNode(node.statements[0]); - case 255 /* TryStatement */: + case 256 /* TryStatement */: return spanInBlock(node.tryBlock); - case 254 /* ThrowStatement */: + case 255 /* ThrowStatement */: return textSpan(node, node.expression); - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: return textSpan(node, node.expression); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return textSpan(node, node.moduleReference); - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (getModuleInstanceState(node) !== 1 /* Instantiated */) { return void 0; } - case 260 /* ClassDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 205 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 206 /* BindingElement */: return textSpan(node); - case 251 /* WithStatement */: + case 252 /* WithStatement */: return spanInNode(node.statement); - case 167 /* Decorator */: + case 168 /* Decorator */: return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return spanInBindingPattern(node); - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return void 0; case 26 /* SemicolonToken */: case 1 /* EndOfFileToken */: @@ -136104,22 +136169,22 @@ case 31 /* GreaterThanToken */: case 29 /* LessThanToken */: return spanInGreaterThanOrLessThanToken(node); - case 115 /* WhileKeyword */: + case 116 /* WhileKeyword */: return spanInWhileKeyword(node); - case 91 /* ElseKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 92 /* ElseKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return spanInNextNode(node); - case 162 /* OfKeyword */: + case 163 /* OfKeyword */: return spanInOfKeyword(node); default: if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 79 /* Identifier */ || node.kind === 227 /* SpreadElement */ || node.kind === 299 /* PropertyAssignment */ || node.kind === 300 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { + if ((node.kind === 79 /* Identifier */ || node.kind === 228 /* SpreadElement */ || node.kind === 300 /* PropertyAssignment */ || node.kind === 301 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { return textSpan(node); } - if (node.kind === 223 /* BinaryExpression */) { + if (node.kind === 224 /* BinaryExpression */) { const { left, operatorToken } = node; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern( @@ -136135,19 +136200,19 @@ } if (isExpressionNode(node)) { switch (parent2.kind) { - case 243 /* DoStatement */: + case 244 /* DoStatement */: return spanInPreviousNode(node); - case 167 /* Decorator */: + case 168 /* Decorator */: return spanInNode(node.parent); - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: return textSpan(node); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (node.parent.operatorToken.kind === 27 /* CommaToken */) { return textSpan(node); } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: if (node.parent.body === node) { return textSpan(node); } @@ -136155,25 +136220,25 @@ } } switch (node.parent.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } break; - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: if (node.parent.type === node) { return spanInNextNode(node.parent.type); } break; - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: { + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: { const { initializer, type } = node.parent; if (initializer === node || type === node || isAssignmentOperator(node.kind)) { return spanInPreviousNode(node); } break; } - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const { left } = node.parent; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { return spanInPreviousNode(node); @@ -136196,14 +136261,14 @@ } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 246 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 247 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } const parent2 = variableDeclaration.parent; if (isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } - if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 247 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 248 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -136230,7 +136295,7 @@ } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 260 /* ClassDeclaration */ && functionDeclaration.kind !== 173 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 261 /* ClassDeclaration */ && functionDeclaration.kind !== 174 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -136250,22 +136315,22 @@ } function spanInBlock(block) { switch (block.parent.kind) { - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return void 0; } - case 244 /* WhileStatement */: - case 242 /* IfStatement */: - case 246 /* ForInStatement */: + case 245 /* WhileStatement */: + case 243 /* IfStatement */: + case 247 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 258 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 259 /* VariableDeclarationList */) { const variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -136288,64 +136353,64 @@ function spanInBindingPattern(bindingPattern) { const firstBindingElement = forEach( bindingPattern.elements, - (element) => element.kind !== 229 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 230 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 205 /* BindingElement */) { + if (bindingPattern.parent.kind === 206 /* BindingElement */) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 204 /* ArrayBindingPattern */ && node2.kind !== 203 /* ObjectBindingPattern */); - const elements = node2.kind === 206 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; + Debug.assert(node2.kind !== 205 /* ArrayBindingPattern */ && node2.kind !== 204 /* ObjectBindingPattern */); + const elements = node2.kind === 207 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; const firstBindingElement = forEach( elements, - (element) => element.kind !== 229 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 230 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node2.parent.kind === 223 /* BinaryExpression */ ? node2.parent : node2); + return textSpan(node2.parent.kind === 224 /* BinaryExpression */ ? node2.parent : node2); } function spanInOpenBraceToken(node2) { switch (node2.parent.kind) { - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: const enumDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const classDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); } return spanInNode(node2.parent); } function spanInCloseBraceToken(node2) { switch (node2.parent.kind) { - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { return void 0; } - case 263 /* EnumDeclaration */: - case 260 /* ClassDeclaration */: + case 264 /* EnumDeclaration */: + case 261 /* ClassDeclaration */: return textSpan(node2); - case 238 /* Block */: + case 239 /* Block */: if (isFunctionBlock(node2.parent)) { return textSpan(node2); } - case 295 /* CatchClause */: + case 296 /* CatchClause */: return spanInNode(lastOrUndefined(node2.parent.statements)); - case 266 /* CaseBlock */: + case 267 /* CaseBlock */: const caseBlock = node2.parent; const lastClause = lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(lastOrUndefined(lastClause.statements)); } return void 0; - case 203 /* ObjectBindingPattern */: + case 204 /* ObjectBindingPattern */: const bindingPattern = node2.parent; return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -136358,7 +136423,7 @@ } function spanInCloseBracketToken(node2) { switch (node2.parent.kind) { - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: const bindingPattern = node2.parent; return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -136370,57 +136435,57 @@ } } function spanInOpenParenToken(node2) { - if (node2.parent.kind === 243 /* DoStatement */ || // Go to while keyword and do action instead - node2.parent.kind === 210 /* CallExpression */ || node2.parent.kind === 211 /* NewExpression */) { + if (node2.parent.kind === 244 /* DoStatement */ || // Go to while keyword and do action instead + node2.parent.kind === 211 /* CallExpression */ || node2.parent.kind === 212 /* NewExpression */) { return spanInPreviousNode(node2); } - if (node2.parent.kind === 214 /* ParenthesizedExpression */) { + if (node2.parent.kind === 215 /* ParenthesizedExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInCloseParenToken(node2) { switch (node2.parent.kind) { - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 173 /* Constructor */: - case 244 /* WhileStatement */: - case 243 /* DoStatement */: - case 245 /* ForStatement */: - case 247 /* ForOfStatement */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 214 /* ParenthesizedExpression */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 174 /* Constructor */: + case 245 /* WhileStatement */: + case 244 /* DoStatement */: + case 246 /* ForStatement */: + case 248 /* ForOfStatement */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 215 /* ParenthesizedExpression */: return spanInPreviousNode(node2); default: return spanInNode(node2.parent); } } function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 299 /* PropertyAssignment */ || node2.parent.kind === 166 /* Parameter */) { + if (isFunctionLike(node2.parent) || node2.parent.kind === 300 /* PropertyAssignment */ || node2.parent.kind === 167 /* Parameter */) { return spanInPreviousNode(node2); } return spanInNode(node2.parent); } function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 213 /* TypeAssertionExpression */) { + if (node2.parent.kind === 214 /* TypeAssertionExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInWhileKeyword(node2) { - if (node2.parent.kind === 243 /* DoStatement */) { + if (node2.parent.kind === 244 /* DoStatement */) { return textSpanEndingAtNextToken(node2, node2.parent.expression); } return spanInNode(node2.parent); } function spanInOfKeyword(node2) { - if (node2.parent.kind === 247 /* ForOfStatement */) { + if (node2.parent.kind === 248 /* ForOfStatement */) { return spanInNextNode(node2); } return spanInNode(node2.parent); @@ -136469,7 +136534,7 @@ return Debug.checkDefined(node.modifiers && find(node.modifiers, isDefaultModifier3)); } function isDefaultModifier3(node) { - return node.kind === 88 /* DefaultKeyword */; + return node.kind === 89 /* DefaultKeyword */; } function getSymbolOfCallHierarchyDeclaration(typeChecker, node) { const location = getCallHierarchyDeclarationReferenceNode(node); @@ -136518,16 +136583,16 @@ return; } switch (node.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: - if (node.parent.kind === 207 /* ObjectLiteralExpression */) { + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: + if (node.parent.kind === 208 /* ObjectLiteralExpression */) { return (_a2 = getAssignedName(node.parent)) == null ? void 0 : _a2.getText(); } return (_b = getNameOfDeclaration(node.parent)) == null ? void 0 : _b.getText(); - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { return node.parent.parent.name.getText(); } @@ -136609,7 +136674,7 @@ } return void 0; } - if (location.kind === 124 /* StaticKeyword */ && isClassStaticBlockDeclaration(location.parent)) { + if (location.kind === 125 /* StaticKeyword */ && isClassStaticBlockDeclaration(location.parent)) { location = location.parent; continue; } @@ -136745,55 +136810,55 @@ } switch (node.kind) { case 79 /* Identifier */: - case 268 /* ImportEqualsDeclaration */: - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return; - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: recordCallSite(node); return; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: collect(node.expression); return; - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: collect(node.name); collect(node.initializer); return; - case 210 /* CallExpression */: + case 211 /* CallExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 211 /* NewExpression */: + case 212 /* NewExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: recordCallSite(node); collect(node.tag); collect(node.template); return; - case 283 /* JsxOpeningElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: recordCallSite(node); collect(node.tagName); collect(node.attributes); return; - case 167 /* Decorator */: + case 168 /* Decorator */: recordCallSite(node); collect(node.expression); return; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: recordCallSite(node); forEachChild(node, collect); break; - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: collect(node.expression); return; } @@ -136846,25 +136911,25 @@ const callSites = []; const collect = createCallSiteCollector(program, callSites); switch (node.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: collectCallSitesOfSourceFile(node, collect); break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: collectCallSitesOfModuleDeclaration(node, collect); break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: collectCallSitesOfClassLikeDeclaration(node, collect); break; - case 172 /* ClassStaticBlockDeclaration */: + case 173 /* ClassStaticBlockDeclaration */: collectCallSitesOfClassStaticBlockDeclaration(node, collect); break; default: @@ -136941,13 +137006,13 @@ let inJSXElement = false; function visit(node) { switch (node.kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { @@ -137118,25 +137183,25 @@ return TokenModifier2; })(TokenModifier || {}); tokenFromDeclarationMapping = /* @__PURE__ */ new Map([ - [257 /* VariableDeclaration */, 7 /* variable */], - [166 /* Parameter */, 6 /* parameter */], - [169 /* PropertyDeclaration */, 9 /* property */], - [264 /* ModuleDeclaration */, 3 /* namespace */], - [263 /* EnumDeclaration */, 1 /* enum */], - [302 /* EnumMember */, 8 /* enumMember */], - [260 /* ClassDeclaration */, 0 /* class */], - [171 /* MethodDeclaration */, 11 /* member */], - [259 /* FunctionDeclaration */, 10 /* function */], - [215 /* FunctionExpression */, 10 /* function */], - [170 /* MethodSignature */, 11 /* member */], - [174 /* GetAccessor */, 9 /* property */], - [175 /* SetAccessor */, 9 /* property */], - [168 /* PropertySignature */, 9 /* property */], - [261 /* InterfaceDeclaration */, 2 /* interface */], - [262 /* TypeAliasDeclaration */, 5 /* type */], - [165 /* TypeParameter */, 4 /* typeParameter */], - [299 /* PropertyAssignment */, 9 /* property */], - [300 /* ShorthandPropertyAssignment */, 9 /* property */] + [258 /* VariableDeclaration */, 7 /* variable */], + [167 /* Parameter */, 6 /* parameter */], + [170 /* PropertyDeclaration */, 9 /* property */], + [265 /* ModuleDeclaration */, 3 /* namespace */], + [264 /* EnumDeclaration */, 1 /* enum */], + [303 /* EnumMember */, 8 /* enumMember */], + [261 /* ClassDeclaration */, 0 /* class */], + [172 /* MethodDeclaration */, 11 /* member */], + [260 /* FunctionDeclaration */, 10 /* function */], + [216 /* FunctionExpression */, 10 /* function */], + [171 /* MethodSignature */, 11 /* member */], + [175 /* GetAccessor */, 9 /* property */], + [176 /* SetAccessor */, 9 /* property */], + [169 /* PropertySignature */, 9 /* property */], + [262 /* InterfaceDeclaration */, 2 /* interface */], + [263 /* TypeAliasDeclaration */, 5 /* type */], + [166 /* TypeParameter */, 4 /* typeParameter */], + [300 /* PropertyAssignment */, 9 /* property */], + [301 /* ShorthandPropertyAssignment */, 9 /* property */] ]); } }); @@ -137264,7 +137329,7 @@ // src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts function makeChange(changeTracker, sourceFile, assertion) { - const replacement = isAsExpression(assertion) ? factory.createAsExpression(assertion.expression, factory.createKeywordTypeNode(157 /* UnknownKeyword */)) : factory.createTypeAssertion(factory.createKeywordTypeNode(157 /* UnknownKeyword */), assertion.expression); + const replacement = isAsExpression(assertion) ? factory.createAsExpression(assertion.expression, factory.createKeywordTypeNode(158 /* UnknownKeyword */)) : factory.createTypeAssertion(factory.createKeywordTypeNode(158 /* UnknownKeyword */), assertion.expression); changeTracker.replaceNode(sourceFile, assertion.expression, replacement); } function getAssertion(sourceFile, pos) { @@ -137460,7 +137525,7 @@ } const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 240 /* VariableStatement */); + const variableStatement = getAncestor(declaration, 241 /* VariableStatement */); if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; @@ -137519,7 +137584,7 @@ checker.getTypeAtLocation(errorNode).flags & 1 /* Any */; } function isInsideAwaitableBody(node) { - return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 259 /* FunctionDeclaration */ || ancestor.parent.kind === 215 /* FunctionExpression */ || ancestor.parent.kind === 216 /* ArrowFunction */ || ancestor.parent.kind === 171 /* MethodDeclaration */)); + return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 260 /* FunctionDeclaration */ || ancestor.parent.kind === 216 /* FunctionExpression */ || ancestor.parent.kind === 217 /* ArrowFunction */ || ancestor.parent.kind === 172 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -137527,7 +137592,7 @@ const asyncIter = checker.getAsyncIterableType(); if (asyncIter && checker.isTypeAssignableTo(exprType, asyncIter)) { const forOf = insertionSite.parent; - changeTracker.replaceNode(sourceFile, forOf, factory.updateForOfStatement(forOf, factory.createToken(133 /* AwaitKeyword */), forOf.initializer, forOf.expression, forOf.statement)); + changeTracker.replaceNode(sourceFile, forOf, factory.updateForOfStatement(forOf, factory.createToken(134 /* AwaitKeyword */), forOf.initializer, forOf.expression, forOf.statement)); return; } } @@ -137679,16 +137744,16 @@ } function applyChange(changeTracker, initializer, sourceFile, fixedNodes) { if (!fixedNodes || tryAddToSet(fixedNodes, initializer)) { - changeTracker.insertModifierBefore(sourceFile, 85 /* ConstKeyword */, initializer); + changeTracker.insertModifierBefore(sourceFile, 86 /* ConstKeyword */, initializer); } } function isPossiblyPartOfDestructuring(node) { switch (node.kind) { case 79 /* Identifier */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return true; default: return false; @@ -137705,7 +137770,7 @@ function isPossiblyPartOfCommaSeperatedInitializer(node) { switch (node.kind) { case 79 /* Identifier */: - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: case 27 /* CommaToken */: return true; default: @@ -137756,8 +137821,8 @@ return; } const declaration = token.parent; - if (declaration.kind === 169 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { - changeTracker.insertModifierBefore(sourceFile, 136 /* DeclareKeyword */, declaration); + if (declaration.kind === 170 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { + changeTracker.insertModifierBefore(sourceFile, 137 /* DeclareKeyword */, declaration); } } var fixId5, errorCodes5; @@ -137923,7 +137988,7 @@ const d = add.valueDeclaration; if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ - ...d.type.kind === 189 /* UnionType */ ? d.type.types : [d.type], + ...d.type.kind === 190 /* UnionType */ ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") ]); changes.replaceNode(d.getSourceFile(), d.type, t); @@ -138000,26 +138065,26 @@ } } function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 257 /* VariableDeclaration */ || node.kind === 168 /* PropertySignature */ || node.kind === 169 /* PropertyDeclaration */; + return isFunctionLikeDeclaration(node) || node.kind === 258 /* VariableDeclaration */ || node.kind === 169 /* PropertySignature */ || node.kind === 170 /* PropertyDeclaration */; } function transformJSDocType(node) { switch (node.kind) { - case 315 /* JSDocAllType */: - case 316 /* JSDocUnknownType */: + case 316 /* JSDocAllType */: + case 317 /* JSDocUnknownType */: return factory.createTypeReferenceNode("any", emptyArray); - case 319 /* JSDocOptionalType */: + case 320 /* JSDocOptionalType */: return transformJSDocOptionalType(node); - case 318 /* JSDocNonNullableType */: + case 319 /* JSDocNonNullableType */: return transformJSDocType(node.type); - case 317 /* JSDocNullableType */: + case 318 /* JSDocNullableType */: return transformJSDocNullableType(node); - case 321 /* JSDocVariadicType */: + case 322 /* JSDocVariadicType */: return transformJSDocVariadicType(node); - case 320 /* JSDocFunctionType */: + case 321 /* JSDocFunctionType */: return transformJSDocFunctionType(node); - case 180 /* TypeReference */: + case 181 /* TypeReference */: return transformJSDocTypeReference(node); - case 325 /* JSDocTypeLiteral */: + case 326 /* JSDocTypeLiteral */: return transformJSDocTypeLiteral(node); default: const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); @@ -138033,7 +138098,7 @@ void 0, isIdentifier(tag.name) ? tag.name : tag.name.right, isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(57 /* QuestionToken */) : void 0, - tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */) + tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(132 /* AnyKeyword */) ))); setEmitFlags(typeNode, 1 /* SingleLine */); return typeNode; @@ -138049,11 +138114,11 @@ } function transformJSDocFunctionType(node) { var _a2; - return factory.createFunctionTypeNode(emptyArray, node.parameters.map(transformJSDocParameter), (_a2 = node.type) != null ? _a2 : factory.createKeywordTypeNode(131 /* AnyKeyword */)); + return factory.createFunctionTypeNode(emptyArray, node.parameters.map(transformJSDocParameter), (_a2 = node.type) != null ? _a2 : factory.createKeywordTypeNode(132 /* AnyKeyword */)); } function transformJSDocParameter(node) { const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 321 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; + const isRest = node.type.kind === 322 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; const name = node.name || (isRest ? "rest" : "arg" + index); const dotdotdot = isRest ? factory.createToken(25 /* DotDotDotToken */) : node.dotDotDotToken; return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer); @@ -138094,10 +138159,10 @@ void 0, /*dotDotDotToken*/ void 0, - node.typeArguments[0].kind === 148 /* NumberKeyword */ ? "n" : "s", + node.typeArguments[0].kind === 149 /* NumberKeyword */ ? "n" : "s", /*questionToken*/ void 0, - factory.createTypeReferenceNode(node.typeArguments[0].kind === 148 /* NumberKeyword */ ? "number" : "string", []), + factory.createTypeReferenceNode(node.typeArguments[0].kind === 149 /* NumberKeyword */ ? "number" : "string", []), /*initializer*/ void 0 ); @@ -138175,7 +138240,7 @@ ); } } else { - createClassElement(member, [factory.createToken(124 /* StaticKeyword */)], memberElements); + createClassElement(member, [factory.createToken(125 /* StaticKeyword */)], memberElements); } }); } @@ -138235,7 +138300,7 @@ })) { return; } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 241 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; + const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 242 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; changes.delete(sourceFile, nodeToDelete); if (!assignmentExpr) { members.push(factory.createPropertyDeclaration( @@ -138298,7 +138363,7 @@ return createArrowFunctionExpressionMember(members2, expression, name); } function createFunctionExpressionMember(members2, functionExpression, name) { - const fullModifiers = concatenate(modifiers, getModifierKindFromSource(functionExpression, 132 /* AsyncKeyword */)); + const fullModifiers = concatenate(modifiers, getModifierKindFromSource(functionExpression, 133 /* AsyncKeyword */)); const method = factory.createMethodDeclaration( fullModifiers, /*asteriskToken*/ @@ -138320,12 +138385,12 @@ function createArrowFunctionExpressionMember(members2, arrowFunction, name) { const arrowFunctionBody = arrowFunction.body; let bodyBlock; - if (arrowFunctionBody.kind === 238 /* Block */) { + if (arrowFunctionBody.kind === 239 /* Block */) { bodyBlock = arrowFunctionBody; } else { bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); } - const fullModifiers = concatenate(modifiers, getModifierKindFromSource(arrowFunction, 132 /* AsyncKeyword */)); + const fullModifiers = concatenate(modifiers, getModifierKindFromSource(arrowFunction, 133 /* AsyncKeyword */)); const method = factory.createMethodDeclaration( fullModifiers, /*asteriskToken*/ @@ -138359,7 +138424,7 @@ initializer.body )); } - const modifiers = getModifierKindFromSource(node.parent.parent, 93 /* ExportKeyword */); + const modifiers = getModifierKindFromSource(node.parent.parent, 94 /* ExportKeyword */); const cls = factory.createClassDeclaration( modifiers, node.name, @@ -138381,7 +138446,7 @@ node.body )); } - const modifiers = getModifierKindFromSource(node, 93 /* ExportKeyword */); + const modifiers = getModifierKindFromSource(node, 94 /* ExportKeyword */); const cls = factory.createClassDeclaration( modifiers, node.name, @@ -138462,7 +138527,7 @@ return; } const pos = skipTrivia(sourceFile.text, moveRangePastModifiers(functionToConvert).pos); - changes.insertModifierAt(sourceFile, pos, 132 /* AsyncKeyword */, { suffix: " " }); + changes.insertModifierAt(sourceFile, pos, 133 /* AsyncKeyword */, { suffix: " " }); for (const returnStatement of returnStatements) { forEachChild(returnStatement, function visit(node) { if (isCallExpression(node)) { @@ -138643,7 +138708,7 @@ return silentFail(); } function isNullOrUndefined2({ checker }, node) { - if (node.kind === 104 /* NullKeyword */) + if (node.kind === 105 /* NullKeyword */) return true; if (isIdentifier(node) && !isGeneratedIdentifier(node) && idText(node) === "undefined") { const symbol = checker.getSymbolAtLocation(node); @@ -138881,9 +138946,9 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, inputArgName, parent2, transformer) { var _a2; switch (func.kind) { - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: break; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: case 79 /* Identifier */: if (!inputArgName) { break; @@ -138908,8 +138973,8 @@ continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); } return varDeclOrAssignment; - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: { + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: { const funcBody = func.body; const returnType2 = (_a2 = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a2.getReturnType(); if (isBlock(funcBody)) { @@ -139151,7 +139216,7 @@ } const importNode = importFromModuleSpecifier(moduleSpecifier); switch (importNode.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: changes.replaceNode(importingFile, importNode, makeImport( importNode.name, /*namedImports*/ @@ -139160,7 +139225,7 @@ quotePreference )); break; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isRequireCall( importNode, /*checkArgumentIsStringLiteralLike*/ @@ -139229,13 +139294,13 @@ } function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) { switch (statement.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); return false; - case 241 /* ExpressionStatement */: { + case 242 /* ExpressionStatement */: { const { expression } = statement; switch (expression.kind) { - case 210 /* CallExpression */: { + case 211 /* CallExpression */: { if (isRequireCall( expression, /*checkArgumentIsStringLiteralLike*/ @@ -139252,7 +139317,7 @@ } return false; } - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const { operatorToken } = expression; return operatorToken.kind === 63 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify); } @@ -139306,8 +139371,8 @@ } function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: { + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: { const tmp = makeUniqueName(propertyName, identifiers); return convertedImports([ makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), @@ -139355,15 +139420,15 @@ function tryChangeModuleExportsObject(object, useSitesToUnqualify) { const statements = mapAllOrFail(object.properties, (prop) => { switch (prop.kind) { - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: return void 0; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 171 /* MethodDeclaration */: - return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(93 /* ExportKeyword */)], prop, useSitesToUnqualify); + case 172 /* MethodDeclaration */: + return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(94 /* ExportKeyword */)], prop, useSitesToUnqualify); default: Debug.assertNever(prop, `Convert to ES6 got invalid prop kind ${prop.kind}`); } @@ -139421,7 +139486,7 @@ function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sourceFile, changes) { const name = left.name.text; if ((isFunctionExpression(right) || isArrowFunction(right) || isClassExpression(right)) && (!right.name || right.name.text === name)) { - changes.replaceRange(sourceFile, { pos: left.getStart(sourceFile), end: right.getStart(sourceFile) }, factory.createToken(93 /* ExportKeyword */), { suffix: " " }); + changes.replaceRange(sourceFile, { pos: left.getStart(sourceFile), end: right.getStart(sourceFile) }, factory.createToken(94 /* ExportKeyword */), { suffix: " " }); if (!right.name) changes.insertName(sourceFile, right, name); const semi = findChildOfKind(parent2, 26 /* SemicolonToken */, sourceFile); @@ -139432,23 +139497,23 @@ sourceFile, left.expression, findChildOfKind(left, 24 /* DotToken */, sourceFile), - [factory.createToken(93 /* ExportKeyword */), factory.createToken(85 /* ConstKeyword */)], + [factory.createToken(94 /* ExportKeyword */), factory.createToken(86 /* ConstKeyword */)], { joiner: " ", suffix: " " } ); } } function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { - const modifiers = [factory.createToken(93 /* ExportKeyword */)]; + const modifiers = [factory.createToken(94 /* ExportKeyword */)]; switch (exported.kind) { - case 215 /* FunctionExpression */: { + case 216 /* FunctionExpression */: { const { name: expressionName } = exported; if (expressionName && expressionName.text !== name) { return exportConst(); } } - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); default: return exportConst(); @@ -139473,7 +139538,7 @@ replaceNode ); function replaceNode(original) { - if (original.kind === 208 /* PropertyAccessExpression */) { + if (original.kind === 209 /* PropertyAccessExpression */) { const replacement = useSitesToUnqualify.get(original); useSitesToUnqualify.delete(original); return replacement; @@ -139482,7 +139547,7 @@ } function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: { + case 204 /* ObjectBindingPattern */: { const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier(e.propertyName) || !isIdentifier(e.name) ? void 0 : makeImportSpecifier(e.propertyName && e.propertyName.text, e.name.text)); if (importSpecifiers) { return convertedImports([makeImport( @@ -139494,7 +139559,7 @@ )]); } } - case 204 /* ArrayBindingPattern */: { + case 205 /* ArrayBindingPattern */: { const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); return convertedImports([ makeImport( @@ -139581,11 +139646,11 @@ function isFreeIdentifier(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return parent2.name !== node; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return parent2.propertyName !== node; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return parent2.propertyName !== node; default: return true; @@ -139748,7 +139813,7 @@ const exportDeclaration = exportClause.parent; const typeExportSpecifiers = getTypeExportSpecifiers(exportSpecifier, context); if (typeExportSpecifiers.length === exportClause.elements.length) { - changes.insertModifierBefore(context.sourceFile, 154 /* TypeKeyword */, exportClause); + changes.insertModifierBefore(context.sourceFile, 155 /* TypeKeyword */, exportClause); } else { const valueExportDeclaration = factory.updateExportDeclaration( exportDeclaration, @@ -139975,10 +140040,10 @@ const typeName = (_a2 = tag.name) == null ? void 0 : _a2.getText(); if (!typeName) return; - if (typeExpression.kind === 325 /* JSDocTypeLiteral */) { + if (typeExpression.kind === 326 /* JSDocTypeLiteral */) { return createInterfaceForTypeLiteral(typeName, typeExpression); } - if (typeExpression.kind === 312 /* JSDocTypeExpression */) { + if (typeExpression.kind === 313 /* JSDocTypeExpression */) { return createTypeAliasForTypeExpression(typeName, typeExpression); } } @@ -140593,11 +140658,11 @@ function getNamespaceLikeImportText(declaration) { var _a2, _b, _c; switch (declaration.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return (_a2 = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a2.text; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return declaration.name.text; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); @@ -140617,11 +140682,11 @@ } function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, compilerOptions) { return firstDefined(existingImports, ({ declaration, importKind, symbol, targetFlags }) => { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 268 /* ImportEqualsDeclaration */) { + if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 269 /* ImportEqualsDeclaration */) { return void 0; } - if (declaration.kind === 257 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 203 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; + if (declaration.kind === 258 /* VariableDeclaration */) { + return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 204 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; } const { importClause } = declaration; if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier)) @@ -140641,7 +140706,7 @@ if (importKind === 1 /* Default */ && (name || // Cannot add a default import to a declaration that already has one addAsTypeOnly === 2 /* Required */ && namedBindings)) return void 0; - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 271 /* NamespaceImport */) + if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 272 /* NamespaceImport */) return void 0; return { kind: 2 /* AddToExisting */, @@ -140661,7 +140726,7 @@ if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); } - } else if (i.kind === 269 /* ImportDeclaration */ || i.kind === 268 /* ImportEqualsDeclaration */) { + } else if (i.kind === 270 /* ImportDeclaration */ || i.kind === 269 /* ImportEqualsDeclaration */) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); @@ -141114,7 +141179,7 @@ case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile, preferences); - return promotedDeclaration.kind === 273 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; + return promotedDeclaration.kind === 274 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; } default: return Debug.assertNever(fix, `Unexpected fix kind ${fix.kind}`); @@ -141122,12 +141187,12 @@ } function getModuleSpecifierText(promotedDeclaration) { var _a2, _b; - return promotedDeclaration.kind === 268 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a2 = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; + return promotedDeclaration.kind === 269 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a2 = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; } function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceFile, preferences) { const convertExistingToTypeOnly = importNameElisionDisabled(compilerOptions); switch (aliasDeclaration.kind) { - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences); if (aliasDeclaration.parent.elements.length > 1 && sortKind) { @@ -141151,13 +141216,13 @@ promoteImportClause(aliasDeclaration.parent.parent); return aliasDeclaration.parent.parent; } - case 270 /* ImportClause */: + case 271 /* ImportClause */: promoteImportClause(aliasDeclaration); return aliasDeclaration; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: promoteImportClause(aliasDeclaration.parent); return aliasDeclaration.parent; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); return aliasDeclaration; default: @@ -141168,13 +141233,13 @@ if (convertExistingToTypeOnly) { const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { - if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 273 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { + if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 274 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { changes.delete(sourceFile, aliasDeclaration); changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); } for (const element of namedImports.elements) { if (element !== aliasDeclaration && !element.isTypeOnly) { - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, element); + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, element); } } } @@ -141183,7 +141248,7 @@ } function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, compilerOptions, preferences) { var _a2; - if (clause.kind === 203 /* ObjectBindingPattern */) { + if (clause.kind === 204 /* ObjectBindingPattern */) { if (defaultImport) { addElementToBindingPattern(clause, defaultImport.name, "default"); } @@ -141252,7 +141317,7 @@ changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(clause, sourceFile)); if (convertExistingToTypeOnly && existingSpecifiers) { for (const specifier of existingSpecifiers) { - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, specifier); + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, specifier); } } } @@ -141620,7 +141685,7 @@ const lastDecorator = findLast(modifiers, isDecorator); const modifierPos = abstractModifier ? abstractModifier.end : staticModifier ? staticModifier.end : accessibilityModifier ? accessibilityModifier.end : lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : classElement.getStart(sourceFile); const options = accessibilityModifier || staticModifier || abstractModifier ? { prefix: " " } : { suffix: " " }; - changeTracker.insertModifierAt(sourceFile, modifierPos, 161 /* OverrideKeyword */, options); + changeTracker.insertModifierAt(sourceFile, modifierPos, 162 /* OverrideKeyword */, options); } function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { const classElement = findContainerClassElementLike(sourceFile, pos); @@ -141634,13 +141699,13 @@ } function isClassElementLikeHasJSDoc(node) { switch (node.kind) { - case 173 /* Constructor */: - case 169 /* PropertyDeclaration */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 170 /* PropertyDeclaration */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; - case 166 /* Parameter */: + case 167 /* Parameter */: return isParameterPropertyDeclaration(node, node.parent); default: return false; @@ -141812,7 +141877,7 @@ /*includeClassComputedPropertyName*/ false ))) { - const fnKeyword = Debug.checkDefined(findChildOfKind(fn, 98 /* FunctionKeyword */, sourceFile)); + const fnKeyword = Debug.checkDefined(findChildOfKind(fn, 99 /* FunctionKeyword */, sourceFile)); const { name } = fn; const body = Debug.checkDefined(fn.body); if (isFunctionExpression(fn)) { @@ -141826,7 +141891,7 @@ changes.insertText(sourceFile, body.pos, " =>"); return [Diagnostics.Convert_function_expression_0_to_arrow_function, name ? name.text : ANONYMOUS]; } else { - changes.replaceNode(sourceFile, fnKeyword, factory.createToken(85 /* ConstKeyword */)); + changes.replaceNode(sourceFile, fnKeyword, factory.createToken(86 /* ConstKeyword */)); changes.insertText(sourceFile, name.end, " = "); changes.insertText(sourceFile, body.pos, " =>"); return [Diagnostics.Convert_function_declaration_0_to_arrow_function, name.text]; @@ -142046,7 +142111,7 @@ // src/services/codefixes/fixIncorrectNamedTupleSyntax.ts function getNamedTupleMember(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 199 /* NamedTupleMember */); + return findAncestor(token, (t) => t.kind === 200 /* NamedTupleMember */); } function doChange10(changes, sourceFile, namedTupleMember) { if (!namedTupleMember) { @@ -142055,10 +142120,10 @@ let unwrappedType = namedTupleMember.type; let sawOptional = false; let sawRest = false; - while (unwrappedType.kind === 187 /* OptionalType */ || unwrappedType.kind === 188 /* RestType */ || unwrappedType.kind === 193 /* ParenthesizedType */) { - if (unwrappedType.kind === 187 /* OptionalType */) { + while (unwrappedType.kind === 188 /* OptionalType */ || unwrappedType.kind === 189 /* RestType */ || unwrappedType.kind === 194 /* ParenthesizedType */) { + if (unwrappedType.kind === 188 /* OptionalType */) { sawOptional = true; - } else if (unwrappedType.kind === 188 /* RestType */) { + } else if (unwrappedType.kind === 189 /* RestType */) { sawRest = true; } unwrappedType = unwrappedType.type; @@ -142114,7 +142179,7 @@ containingType = checker.getNonNullableType(containingType); } suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); - } else if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 101 /* InKeyword */ && parent2.left === node && isPrivateIdentifier(node)) { + } else if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 102 /* InKeyword */ && parent2.left === node && isPrivateIdentifier(node)) { const receiverType = checker.getTypeAtLocation(parent2.right); suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, receiverType); } else if (isQualifiedName(parent2) && parent2.right === node) { @@ -142371,19 +142436,19 @@ } function getVariableLikeInitializer(declaration) { switch (declaration.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: - case 169 /* PropertyDeclaration */: - case 299 /* PropertyAssignment */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: + case 170 /* PropertyDeclaration */: + case 300 /* PropertyAssignment */: return declaration.initializer; - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 300 /* ShorthandPropertyAssignment */: - case 168 /* PropertySignature */: - case 302 /* EnumMember */: - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: + case 301 /* ShorthandPropertyAssignment */: + case 169 /* PropertySignature */: + case 303 /* EnumMember */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: return void 0; } } @@ -142610,7 +142675,7 @@ function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { const tokenName = token.text; if (makeStatic) { - if (classDeclaration.kind === 228 /* ClassExpression */) { + if (classDeclaration.kind === 229 /* ClassExpression */) { return; } const className = classDeclaration.name.getText(); @@ -142663,7 +142728,7 @@ } function getTypeNode2(checker, node, token) { let typeNode; - if (token.parent.parent.kind === 223 /* BinaryExpression */) { + if (token.parent.parent.kind === 224 /* BinaryExpression */) { const binaryExpression = token.parent.parent; const otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left; const widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression))); @@ -142677,7 +142742,7 @@ 1 /* NoTruncation */ ) : void 0; } - return typeNode || factory.createKeywordTypeNode(131 /* AnyKeyword */); + return typeNode || factory.createKeywordTypeNode(132 /* AnyKeyword */); } function addPropertyDeclaration(changeTracker, sourceFile, node, tokenName, typeNode, modifierFlags) { const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0; @@ -142714,7 +142779,7 @@ return res; } function createAddIndexSignatureAction(context, sourceFile, node, tokenName, typeNode) { - const stringTypeNode = factory.createKeywordTypeNode(152 /* StringKeyword */); + const stringTypeNode = factory.createKeywordTypeNode(153 /* StringKeyword */); const indexingParameter = factory.createParameterDeclaration( /*modifiers*/ void 0, @@ -142754,7 +142819,7 @@ } function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 171 /* MethodDeclaration */ : 170 /* MethodSignature */; + const kind = isClassLike(parentDeclaration) ? 172 /* MethodDeclaration */ : 171 /* MethodSignature */; const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); if (containingMethodDeclaration) { @@ -142783,8 +142848,8 @@ function addFunctionDeclaration(changes, context, info) { const quotePreference = getQuotePreference(context.sourceFile, context.preferences); const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(259 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( - 259 /* FunctionDeclaration */, + const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(260 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( + 260 /* FunctionDeclaration */, context, quotePreference, info.signature, @@ -142933,7 +142998,7 @@ if (signature === void 0) return createUndefined(); const func = createSignatureDeclarationFromSignature( - 215 /* FunctionExpression */, + 216 /* FunctionExpression */, context, quotePreference, signature[0], @@ -143288,7 +143353,7 @@ } function getNodes(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - if (token.kind !== 108 /* ThisKeyword */) + if (token.kind !== 109 /* ThisKeyword */) return void 0; const constructor = getContainingFunction(token); const superCall = findSuperCall(constructor.body); @@ -143562,11 +143627,11 @@ const token = getTokenAtPosition(sourceFile, pos); const heritageClauses = getContainingClass(token).heritageClauses; const extendsToken = heritageClauses[0].getFirstToken(); - return extendsToken.kind === 94 /* ExtendsKeyword */ ? { extendsToken, heritageClauses } : void 0; + return extendsToken.kind === 95 /* ExtendsKeyword */ ? { extendsToken, heritageClauses } : void 0; } function doChanges2(changes, sourceFile, extendsToken, heritageClauses) { - changes.replaceNode(sourceFile, extendsToken, factory.createToken(117 /* ImplementsKeyword */)); - if (heritageClauses.length === 2 && heritageClauses[0].token === 94 /* ExtendsKeyword */ && heritageClauses[1].token === 117 /* ImplementsKeyword */) { + changes.replaceNode(sourceFile, extendsToken, factory.createToken(118 /* ImplementsKeyword */)); + if (heritageClauses.length === 2 && heritageClauses[0].token === 95 /* ExtendsKeyword */ && heritageClauses[1].token === 118 /* ImplementsKeyword */) { const implementsToken = heritageClauses[1].getFirstToken(); const implementsFullStart = implementsToken.getFullStart(); changes.replaceRange(sourceFile, { pos: implementsFullStart, end: implementsFullStart }, factory.createToken(27 /* CommaToken */)); @@ -143811,18 +143876,18 @@ // src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts function getImportDeclaration(sourceFile, program, start) { const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier); - if (!identifier || identifier.parent.kind !== 180 /* TypeReference */) + if (!identifier || identifier.parent.kind !== 181 /* TypeReference */) return; const checker = program.getTypeChecker(); const symbol = checker.getSymbolAtLocation(identifier); return find((symbol == null ? void 0 : symbol.declarations) || emptyArray, or(isImportClause, isImportSpecifier, isImportEqualsDeclaration)); } function doTypeOnlyImportChange(changes, sourceFile, importDeclaration, program) { - if (importDeclaration.kind === 268 /* ImportEqualsDeclaration */) { - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, importDeclaration.name); + if (importDeclaration.kind === 269 /* ImportEqualsDeclaration */) { + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, importDeclaration.name); return; } - const importClause = importDeclaration.kind === 270 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; + const importClause = importDeclaration.kind === 271 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; if (importClause.name && importClause.namedBindings) { return; } @@ -143834,7 +143899,7 @@ if (importsValue) { return; } - changes.insertModifierBefore(sourceFile, 154 /* TypeKeyword */, importClause); + changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, importClause); } function doNamespaceImportChange(changes, sourceFile, importDeclaration, program) { ts_refactor_exports.doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, importDeclaration.parent); @@ -143853,7 +143918,7 @@ const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); if (!importDeclaration) return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 273 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); + const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 274 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); const typeOnlyChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => doTypeOnlyImportChange(t, context.sourceFile, importDeclaration, context.program)); let actions2; if (namespaceChanges.length) { @@ -143871,7 +143936,7 @@ // src/services/codefixes/fixUnusedIdentifier.ts function changeInferToUnknown(changes, sourceFile, token) { - changes.replaceNode(sourceFile, token.parent, factory.createKeywordTypeNode(157 /* UnknownKeyword */)); + changes.replaceNode(sourceFile, token.parent, factory.createKeywordTypeNode(158 /* UnknownKeyword */)); } function createDeleteFix(changes, diag2) { return createCodeFixAction(fixName3, changes, diag2, fixIdDelete, Diagnostics.Delete_all_unused_declarations); @@ -143880,16 +143945,16 @@ changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } function isImport(token) { - return token.kind === 100 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 273 /* ImportSpecifier */ || token.parent.kind === 270 /* ImportClause */); + return token.kind === 101 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 274 /* ImportSpecifier */ || token.parent.kind === 271 /* ImportClause */); } function tryGetFullImport(token) { - return token.kind === 100 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; + return token.kind === 101 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; } function canDeleteEntireVariableStatement(sourceFile, token) { return isVariableDeclarationList(token.parent) && first(token.parent.getChildren(sourceFile)) === token; } function deleteEntireVariableStatement(changes, sourceFile, node) { - changes.delete(sourceFile, node.parent.kind === 240 /* VariableStatement */ ? node.parent : node); + changes.delete(sourceFile, node.parent.kind === 241 /* VariableStatement */ ? node.parent : node); } function deleteDestructuringElements(changes, sourceFile, node) { forEach(node.elements, (n) => changes.delete(sourceFile, n)); @@ -143915,7 +143980,7 @@ function tryPrefixDeclaration(changes, errorCode, sourceFile, token) { if (errorCode === Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code) return; - if (token.kind === 138 /* InferKeyword */) { + if (token.kind === 139 /* InferKeyword */) { token = cast(token.parent, isInferTypeNode).typeParameter.name; } if (isIdentifier(token) && canPrefix(token)) { @@ -143931,14 +143996,14 @@ } function canPrefix(token) { switch (token.parent.kind) { - case 166 /* Parameter */: - case 165 /* TypeParameter */: + case 167 /* Parameter */: + case 166 /* TypeParameter */: return true; - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { const varDecl = token.parent; switch (varDecl.parent.parent.kind) { - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: return true; } } @@ -143987,8 +144052,8 @@ function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { const { parent: parent2 } = parameter; switch (parent2.kind) { - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: const index = parent2.parameters.indexOf(parameter); const referent = isMethodDeclaration(parent2) ? parent2.name : parent2; const entries = ts_FindAllReferences_exports.Core.getReferencedSymbolsForNode(parent2.pos, referent, program, sourceFiles, cancellationToken); @@ -144006,18 +144071,18 @@ } } return true; - case 259 /* FunctionDeclaration */: { + case 260 /* FunctionDeclaration */: { if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { return isLastParameter(parent2, parameter, isFixAll); } return true; } - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return isLastParameter(parent2, parameter, isFixAll); - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return false; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return true; default: return Debug.failBadSyntaxKind(parent2); @@ -144110,7 +144175,7 @@ ]; } const result = []; - if (token.kind === 138 /* InferKeyword */) { + if (token.kind === 139 /* InferKeyword */) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => changeInferToUnknown(t, sourceFile, token)); const name = cast(token.parent, isInferTypeNode).typeParameter.name.text; result.push(createCodeFixAction(fixName3, changes, [Diagnostics.Replace_infer_0_with_unknown, name], fixIdInfer, Diagnostics.Replace_all_unused_infer_with_unknown)); @@ -144168,7 +144233,7 @@ break; } case fixIdDelete: { - if (token.kind === 138 /* InferKeyword */ || isImport(token)) { + if (token.kind === 139 /* InferKeyword */ || isImport(token)) { break; } else if (isJSDocTemplateTag(token)) { changes.delete(sourceFile, token); @@ -144200,7 +144265,7 @@ break; } case fixIdInfer: - if (token.kind === 138 /* InferKeyword */) { + if (token.kind === 139 /* InferKeyword */) { changeInferToUnknown(changes, sourceFile, token); } break; @@ -144230,7 +144295,7 @@ const container = (isBlock(statement.parent) ? statement.parent : statement).parent; if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { - case 242 /* IfStatement */: + case 243 /* IfStatement */: if (container.elseStatement) { if (isBlock(statement.parent)) { break; @@ -144239,8 +144304,8 @@ } return; } - case 244 /* WhileStatement */: - case 245 /* ForStatement */: + case 245 /* WhileStatement */: + case 246 /* ForStatement */: changes.delete(sourceFile, container); return; } @@ -144336,22 +144401,22 @@ } function isTypeContainer(node) { switch (node.kind) { - case 231 /* AsExpression */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 259 /* FunctionDeclaration */: - case 174 /* GetAccessor */: - case 178 /* IndexSignature */: - case 197 /* MappedType */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 166 /* Parameter */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 175 /* SetAccessor */: - case 262 /* TypeAliasDeclaration */: - case 213 /* TypeAssertionExpression */: - case 257 /* VariableDeclaration */: + case 232 /* AsExpression */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 260 /* FunctionDeclaration */: + case 175 /* GetAccessor */: + case 179 /* IndexSignature */: + case 198 /* MappedType */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 167 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 176 /* SetAccessor */: + case 263 /* TypeAliasDeclaration */: + case 214 /* TypeAssertionExpression */: + case 258 /* VariableDeclaration */: return true; default: return false; @@ -144393,7 +144458,7 @@ const { typeNode, type } = info; const original = typeNode.getText(sourceFile); const actions2 = [fix(type, fixIdPlain, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)]; - if (typeNode.kind === 317 /* JSDocNullableType */) { + if (typeNode.kind === 318 /* JSDocNullableType */) { actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); } return actions2; @@ -144411,7 +144476,7 @@ if (!info) return; const { typeNode, type } = info; - const fixedType = typeNode.kind === 317 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; + const fixedType = typeNode.kind === 318 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; doChange21(changes, sourceFile, typeNode, fixedType, checker); }); } @@ -144484,14 +144549,14 @@ } let insertBefore; switch (containingFunction.kind) { - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: insertBefore = containingFunction.name; break; - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - insertBefore = findChildOfKind(containingFunction, 98 /* FunctionKeyword */, sourceFile); + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + insertBefore = findChildOfKind(containingFunction, 99 /* FunctionKeyword */, sourceFile); break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: const kind = containingFunction.typeParameters ? 29 /* LessThanToken */ : 20 /* OpenParenToken */; insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); break; @@ -144510,7 +144575,7 @@ changes.replaceNode(sourceFile, returnType, factory.createTypeReferenceNode("Promise", factory.createNodeArray([returnType]))); } } - changes.insertModifierBefore(sourceFile, 132 /* AsyncKeyword */, insertBefore); + changes.insertModifierBefore(sourceFile, 133 /* AsyncKeyword */, insertBefore); } var fixId36, errorCodes46; var init_fixAwaitInSyncFunction = __esm({ @@ -144645,7 +144710,7 @@ return errorCode; } function doChange25(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, preferences) { - if (!isParameterPropertyModifier(token.kind) && token.kind !== 79 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 108 /* ThisKeyword */) { + if (!isParameterPropertyModifier(token.kind) && token.kind !== 79 /* Identifier */ && token.kind !== 25 /* DotDotDotToken */ && token.kind !== 109 /* ThisKeyword */) { return void 0; } const { parent: parent2 } = token; @@ -144798,7 +144863,7 @@ function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 168 /* PropertySignature */) { + if (isInJSFile(sourceFile) && declaration.kind !== 169 /* PropertySignature */) { const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; if (!parent2) { return; @@ -144909,17 +144974,17 @@ function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { let searchToken; switch (containingFunction.kind) { - case 173 /* Constructor */: - searchToken = findChildOfKind(containingFunction, 135 /* ConstructorKeyword */, sourceFile); + case 174 /* Constructor */: + searchToken = findChildOfKind(containingFunction, 136 /* ConstructorKeyword */, sourceFile); break; - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: const parent2 = containingFunction.parent; searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; break; - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: searchToken = containingFunction.name; break; } @@ -145055,44 +145120,44 @@ node = node.parent; } switch (node.parent.kind) { - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: inferTypeFromExpressionStatement(node, usage); break; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: usage.isNumber = true; break; - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: inferTypeFromPrefixUnaryExpression(node.parent, usage); break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: inferTypeFromBinaryExpression(node, node.parent, usage); break; - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: inferTypeFromSwitchStatementLabel(node.parent, usage); break; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: if (node.parent.expression === node) { inferTypeFromCallExpression(node.parent, usage); } else { inferTypeFromContextualType(node, usage); } break; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: inferTypeFromPropertyAccessExpression(node.parent, usage); break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: inferTypeFromPropertyElementExpression(node.parent, node, usage); break; - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: inferTypeFromPropertyAssignment(node.parent, usage); break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: inferTypeFromPropertyDeclaration(node.parent, usage); break; - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { const { name, initializer } = node.parent; if (node === name) { if (initializer) { @@ -145182,14 +145247,14 @@ case 35 /* ExclamationEqualsToken */: addCandidateType(usage, checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left)); break; - case 101 /* InKeyword */: + case 102 /* InKeyword */: if (node === parent2.left) { usage.isString = true; } break; case 56 /* BarBarToken */: case 60 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 257 /* VariableDeclaration */ || isAssignmentExpression( + if (node === parent2.left && (node.parent.parent.kind === 258 /* VariableDeclaration */ || isAssignmentExpression( node.parent.parent, /*excludeCompoundAssignment*/ true @@ -145199,7 +145264,7 @@ break; case 55 /* AmpersandAmpersandToken */: case 27 /* CommaToken */: - case 102 /* InstanceOfKeyword */: + case 103 /* InstanceOfKeyword */: break; } } @@ -145217,7 +145282,7 @@ } } calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 210 /* CallExpression */) { + if (parent2.kind === 211 /* CallExpression */) { (usage.calls || (usage.calls = [])).push(call); } else { (usage.constructs || (usage.constructs = [])).push(call); @@ -145770,7 +145835,7 @@ const declaration = declarations == null ? void 0 : declarations[0]; const checker = context.program.getTypeChecker(); const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); - const kind = (_a2 = declaration == null ? void 0 : declaration.kind) != null ? _a2 : 168 /* PropertySignature */; + const kind = (_a2 = declaration == null ? void 0 : declaration.kind) != null ? _a2 : 169 /* PropertySignature */; const declarationName = getSynthesizedDeepClone( getNameOfDeclaration(declaration), /*includeTrivia*/ @@ -145787,8 +145852,8 @@ const ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient; const quotePreference = getQuotePreference(sourceFile, preferences); switch (kind) { - case 168 /* PropertySignature */: - case 169 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 170 /* PropertyDeclaration */: const flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : void 0; let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { @@ -145807,8 +145872,8 @@ void 0 )); break; - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: { + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: { Debug.assertIsDefined(declarations); let typeNode2 = checker.typeToTypeNode( type, @@ -145856,8 +145921,8 @@ } break; } - case 170 /* MethodSignature */: - case 171 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 172 /* MethodDeclaration */: Debug.assertIsDefined(declarations); const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); if (!some(signatures)) { @@ -145884,7 +145949,7 @@ break; } function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(171 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); + const method = createSignatureDeclarationFromSignature(172 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); if (method) addClassElement(method); } @@ -145894,7 +145959,7 @@ modifiers2 = combine(modifiers2, factory.createModifiersFromModifierFlags(modifierFlags)); } if (shouldAddOverrideKeyword()) { - modifiers2 = append(modifiers2, factory.createToken(161 /* OverrideKeyword */)); + modifiers2 = append(modifiers2, factory.createToken(162 /* OverrideKeyword */)); } return modifiers2 && factory.createNodeArray(modifiers2); } @@ -146055,7 +146120,7 @@ tracker ); switch (kind) { - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return factory.createMethodDeclaration( modifiers, asteriskToken, @@ -146067,7 +146132,7 @@ type, createStubbedMethodBody(quotePreference) ); - case 170 /* MethodSignature */: + case 171 /* MethodSignature */: return factory.createMethodSignature( modifiers, name, @@ -146075,9 +146140,9 @@ void 0, typeParameters, parameters, - type === void 0 ? factory.createKeywordTypeNode(157 /* UnknownKeyword */) : type + type === void 0 ? factory.createKeywordTypeNode(158 /* UnknownKeyword */) : type ); - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return factory.createFunctionDeclaration( modifiers, asteriskToken, @@ -146194,7 +146259,7 @@ /*questionToken*/ minArgumentCount !== void 0 && i >= minArgumentCount ? factory.createToken(57 /* QuestionToken */) : void 0, /*type*/ - inJs ? void 0 : (types == null ? void 0 : types[i]) || factory.createKeywordTypeNode(157 /* UnknownKeyword */), + inJs ? void 0 : (types == null ? void 0 : types[i]) || factory.createKeywordTypeNode(158 /* UnknownKeyword */), /*initializer*/ void 0 ); @@ -146234,7 +146299,7 @@ maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", /*questionToken*/ maxNonRestArgs >= minArgumentCount ? factory.createToken(57 /* QuestionToken */) : void 0, - factory.createArrayTypeNode(factory.createKeywordTypeNode(157 /* UnknownKeyword */)), + factory.createArrayTypeNode(factory.createKeywordTypeNode(158 /* UnknownKeyword */)), /*initializer*/ void 0 ); @@ -146482,7 +146547,7 @@ isStatic: hasStaticModifier(declaration), isReadonly: hasEffectiveReadonlyModifier(declaration), type: getDeclarationType(declaration, program), - container: declaration.kind === 166 /* Parameter */ ? declaration.parent.parent : declaration.parent, + container: declaration.kind === 167 /* Parameter */ ? declaration.parent.parent : declaration.parent, originalName: declaration.name.text, declaration, fieldName, @@ -146577,10 +146642,10 @@ if (!constructor.body) return; constructor.body.forEachChild(function recur(node) { - if (isElementAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */ && isStringLiteral(node.argumentExpression) && node.argumentExpression.text === originalName && isWriteAccess(node)) { + if (isElementAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */ && isStringLiteral(node.argumentExpression) && node.argumentExpression.text === originalName && isWriteAccess(node)) { changeTracker.replaceNode(file, node.argumentExpression, factory.createStringLiteral(fieldName)); } - if (isPropertyAccessExpression(node) && node.expression.kind === 108 /* ThisKeyword */ && node.name.text === originalName && isWriteAccess(node)) { + if (isPropertyAccessExpression(node) && node.expression.kind === 109 /* ThisKeyword */ && node.name.text === originalName && isWriteAccess(node)) { changeTracker.replaceNode(file, node.name, factory.createIdentifier(fieldName)); } if (!isFunctionLike(node) && !isClassLike(node)) { @@ -146595,7 +146660,7 @@ const type = typeChecker.getTypeFromTypeNode(typeNode); if (!typeChecker.isTypeAssignableTo(typeChecker.getUndefinedType(), type)) { const types = isUnionTypeNode(typeNode) ? typeNode.types : [typeNode]; - return factory.createUnionTypeNode([...types, factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]); + return factory.createUnionTypeNode([...types, factory.createKeywordTypeNode(156 /* UndefinedKeyword */)]); } } return typeNode; @@ -146654,7 +146719,7 @@ } function getActionsForUsageOfInvalidImport(context) { const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 210 /* CallExpression */ : 211 /* NewExpression */; + const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 211 /* CallExpression */ : 212 /* NewExpression */; const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); if (!node) { return []; @@ -146755,7 +146820,7 @@ return createCodeFixAction(fixName6, changes, [Diagnostics.Add_undefined_type_to_property_0, info.prop.name.getText()], fixIdAddUndefinedType, Diagnostics.Add_undefined_type_to_all_uninitialized_properties); } function addUndefinedType(changeTracker, sourceFile, info) { - const undefinedTypeNode = factory.createKeywordTypeNode(155 /* UndefinedKeyword */); + const undefinedTypeNode = factory.createKeywordTypeNode(156 /* UndefinedKeyword */); const types = isUnionTypeNode(info.type) ? info.type.types.concat(undefinedTypeNode) : [info.type, undefinedTypeNode]; const unionTypeNode = factory.createUnionTypeNode(types); if (info.isJs) { @@ -147058,8 +147123,8 @@ // src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts function getImportTypeNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - Debug.assert(token.kind === 100 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 202 /* ImportType */, "Token parent should be an ImportType"); + Debug.assert(token.kind === 101 /* ImportKeyword */, "This token should be an ImportKeyword"); + Debug.assert(token.parent.kind === 203 /* ImportType */, "Token parent should be an ImportType"); return token.parent; } function doChange29(changes, sourceFile, importType) { @@ -147188,7 +147253,7 @@ parameter.type ); const mappedIntersectionType = factory.createMappedTypeNode( - hasEffectiveReadonlyModifier(indexSignature) ? factory.createModifier(146 /* ReadonlyKeyword */) : void 0, + hasEffectiveReadonlyModifier(indexSignature) ? factory.createModifier(147 /* ReadonlyKeyword */) : void 0, mappedTypeParameter, /*nameType*/ void 0, @@ -147263,7 +147328,7 @@ // src/services/codefixes/removeUnnecessaryAwait.ts function makeChange10(changeTracker, sourceFile, span) { - const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 133 /* AwaitKeyword */); + const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 134 /* AwaitKeyword */); const awaitExpression = awaitKeyword && tryCast(awaitKeyword.parent, isAwaitExpression); if (!awaitExpression) { return; @@ -147278,7 +147343,7 @@ ); if (isIdentifier(leftMostExpression)) { const precedingToken = findPrecedingToken(awaitExpression.parent.pos, sourceFile); - if (precedingToken && precedingToken.kind !== 103 /* NewKeyword */) { + if (precedingToken && precedingToken.kind !== 104 /* NewKeyword */) { expressionToReplace = awaitExpression.parent; } } @@ -147383,13 +147448,13 @@ const declaration = tryCast((_a2 = symbol == null ? void 0 : symbol.valueDeclaration) == null ? void 0 : _a2.parent, isVariableDeclarationList); if (declaration === void 0) return; - const constToken = findChildOfKind(declaration, 85 /* ConstKeyword */, sourceFile); + const constToken = findChildOfKind(declaration, 86 /* ConstKeyword */, sourceFile); if (constToken === void 0) return; return { symbol, token: constToken }; } function doChange32(changes, sourceFile, token) { - changes.replaceNode(sourceFile, token, factory.createToken(119 /* LetKeyword */)); + changes.replaceNode(sourceFile, token, factory.createToken(120 /* LetKeyword */)); } var fixId49, errorCodes61; var init_convertConstToLet = __esm({ @@ -147489,7 +147554,7 @@ const typeArguments = getEffectiveTypeArguments(decl.parent.parent); if (some(typeArguments)) { const typeArgument = typeArguments[0]; - const needsParens = !isUnionTypeNode(typeArgument) && !isParenthesizedTypeNode(typeArgument) && isParenthesizedTypeNode(factory.createUnionTypeNode([typeArgument, factory.createKeywordTypeNode(114 /* VoidKeyword */)]).types[0]); + const needsParens = !isUnionTypeNode(typeArgument) && !isParenthesizedTypeNode(typeArgument) && isParenthesizedTypeNode(factory.createUnionTypeNode([typeArgument, factory.createKeywordTypeNode(115 /* VoidKeyword */)]).types[0]); if (needsParens) { changes.insertText(sourceFile, typeArgument.pos, "("); } @@ -147776,7 +147841,7 @@ if (stringCompletions) { return stringCompletions; } - if (previousToken && isBreakOrContinueStatement(previousToken.parent) && (previousToken.kind === 81 /* BreakKeyword */ || previousToken.kind === 86 /* ContinueKeyword */ || previousToken.kind === 79 /* Identifier */)) { + if (previousToken && isBreakOrContinueStatement(previousToken.parent) && (previousToken.kind === 82 /* BreakKeyword */ || previousToken.kind === 87 /* ContinueKeyword */ || previousToken.kind === 79 /* Identifier */)) { return getLabelCompletionAtPosition(previousToken.parent); } const completionData = getCompletionData( @@ -147918,7 +147983,7 @@ } function keywordFiltersFromSyntaxKind(keywordCompletion) { switch (keywordCompletion) { - case 154 /* TypeKeyword */: + case 155 /* TypeKeyword */: return 8 /* TypeKeyword */; default: Debug.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters"); @@ -148144,14 +148209,14 @@ } function typeNodeToExpression(typeNode, languageVersion, quotePreference) { switch (typeNode.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: const typeName = typeNode.typeName; return entityNameToExpression(typeName, languageVersion, quotePreference); - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: const objectExpression = typeNodeToExpression(typeNode.objectType, languageVersion, quotePreference); const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference); return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression); - case 198 /* LiteralType */: + case 199 /* LiteralType */: const literal = typeNode.literal; switch (literal.kind) { case 10 /* StringLiteral */: @@ -148160,12 +148225,12 @@ return factory.createNumericLiteral(literal.text, literal.numericLiteralFlags); } return void 0; - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference); return exp && (isIdentifier(exp) ? exp : factory.createParenthesizedExpression(exp)); - case 183 /* TypeQuery */: + case 184 /* TypeQuery */: return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference); - case 202 /* ImportType */: + case 203 /* ImportType */: Debug.fail(`We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.`); } return void 0; @@ -148200,12 +148265,12 @@ function getJsxClosingTagCompletion(location, sourceFile) { const jsxClosingElement = findAncestor(location, (node) => { switch (node.kind) { - case 284 /* JsxClosingElement */: + case 285 /* JsxClosingElement */: return true; case 43 /* SlashToken */: case 31 /* GreaterThanToken */: case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return false; default: return "quit"; @@ -148559,10 +148624,10 @@ const quotePreference = getQuotePreference(sourceFile, preferences); const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (declaration.kind) { - case 168 /* PropertySignature */: - case 169 /* PropertyDeclaration */: - case 170 /* MethodSignature */: - case 171 /* MethodDeclaration */: { + case 169 /* PropertySignature */: + case 170 /* PropertyDeclaration */: + case 171 /* MethodSignature */: + case 172 /* MethodDeclaration */: { let effectiveType = type.flags & 1048576 /* Union */ && type.types.length < 10 ? checker.getUnionType(type.types, 2 /* Subtype */) : type; if (effectiveType.flags & 1048576 /* Union */) { const functionTypes = filter(effectiveType.types, (type2) => checker.getSignaturesOfType(type2, 0 /* Call */).length > 0); @@ -148799,8 +148864,8 @@ true ); const isImportSpecifierTypeOnly = importStatementCompletion.couldBeTypeOnlyImportSpecifier; - const topLevelTypeOnlyText = importStatementCompletion.isTopLevelTypeOnly ? ` ${tokenToString(154 /* TypeKeyword */)} ` : " "; - const importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? `${tokenToString(154 /* TypeKeyword */)} ` : ""; + const topLevelTypeOnlyText = importStatementCompletion.isTopLevelTypeOnly ? ` ${tokenToString(155 /* TypeKeyword */)} ` : " "; + const importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? `${tokenToString(155 /* TypeKeyword */)} ` : ""; const suffix = useSemicolons ? ";" : ""; switch (importKind) { case 3 /* CommonJS */: @@ -149176,18 +149241,18 @@ return getContextualTypeFromParent(previousToken, checker); case 63 /* EqualsToken */: switch (parent2.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return checker.getContextualType(parent2.initializer); - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return checker.getTypeAtLocation(parent2.left); - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: return checker.getContextualTypeForJsxAttribute(parent2); default: return void 0; } - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: return checker.getContextualType(parent2); - case 82 /* CaseKeyword */: + case 83 /* CaseKeyword */: const caseClause = tryCast(parent2, isCaseClause); return caseClause ? getSwitchedType(caseClause, checker) : void 0; case 18 /* OpenBraceToken */: @@ -149218,7 +149283,7 @@ } function isModuleSymbol(symbol) { var _a2; - return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 308 /* SourceFile */)); + return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 309 /* SourceFile */)); } function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { const typeChecker = program.getTypeChecker(); @@ -149250,7 +149315,7 @@ const typeExpression = tryGetTypeExpressionFromTag(tag); if (typeExpression) { currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 351 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { + if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 352 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); } } @@ -149308,7 +149373,7 @@ isRightOfDot = contextToken.kind === 24 /* DotToken */; isRightOfQuestionDot = contextToken.kind === 28 /* QuestionDotToken */; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); @@ -149316,68 +149381,68 @@ return void 0; } break; - case 163 /* QualifiedName */: + case 164 /* QualifiedName */: node = parent2.left; break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: node = parent2.name; break; - case 202 /* ImportType */: + case 203 /* ImportType */: node = parent2; break; - case 233 /* MetaProperty */: + case 234 /* MetaProperty */: node = parent2.getFirstToken(sourceFile); - Debug.assert(node.kind === 100 /* ImportKeyword */ || node.kind === 103 /* NewKeyword */); + Debug.assert(node.kind === 101 /* ImportKeyword */ || node.kind === 104 /* NewKeyword */); break; default: return void 0; } } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 208 /* PropertyAccessExpression */) { + if (parent2 && parent2.kind === 209 /* PropertyAccessExpression */) { contextToken = parent2; parent2 = parent2.parent; } if (currentToken.parent === location) { switch (currentToken.kind) { case 31 /* GreaterThanToken */: - if (currentToken.parent.kind === 281 /* JsxElement */ || currentToken.parent.kind === 283 /* JsxOpeningElement */) { + if (currentToken.parent.kind === 282 /* JsxElement */ || currentToken.parent.kind === 284 /* JsxOpeningElement */) { location = currentToken; } break; case 43 /* SlashToken */: - if (currentToken.parent.kind === 282 /* JsxSelfClosingElement */) { + if (currentToken.parent.kind === 283 /* JsxSelfClosingElement */) { location = currentToken; } break; } } switch (parent2.kind) { - case 284 /* JsxClosingElement */: + case 285 /* JsxClosingElement */: if (contextToken.kind === 43 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: if (!binaryExpressionMayBeOpenTag(parent2)) { break; } - case 282 /* JsxSelfClosingElement */: - case 281 /* JsxElement */: - case 283 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: + case 282 /* JsxElement */: + case 284 /* JsxOpeningElement */: isJsxIdentifierExpected = true; if (contextToken.kind === 29 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } break; - case 291 /* JsxExpression */: - case 290 /* JsxSpreadAttribute */: - if (previousToken.kind === 19 /* CloseBraceToken */ || previousToken.kind === 79 /* Identifier */ && previousToken.parent.kind === 288 /* JsxAttribute */) { + case 292 /* JsxExpression */: + case 291 /* JsxSpreadAttribute */: + if (previousToken.kind === 19 /* CloseBraceToken */ || previousToken.kind === 79 /* Identifier */ && previousToken.parent.kind === 289 /* JsxAttribute */) { isJsxIdentifierExpected = true; } break; - case 288 /* JsxAttribute */: + case 289 /* JsxAttribute */: if (parent2.initializer === previousToken && previousToken.end < position) { isJsxIdentifierExpected = true; break; @@ -149465,15 +149530,15 @@ }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: - case 345 /* JSDocReturnTag */: - case 347 /* JSDocTypeTag */: - case 349 /* JSDocTypedefTag */: - case 352 /* JSDocThrowsTag */: - case 353 /* JSDocSatisfiesTag */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: + case 346 /* JSDocReturnTag */: + case 348 /* JSDocTypeTag */: + case 350 /* JSDocTypedefTag */: + case 353 /* JSDocThrowsTag */: + case 354 /* JSDocSatisfiesTag */: return true; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return !!tag.constraint; default: return false; @@ -149482,7 +149547,7 @@ function tryGetTypeExpressionFromTag(tag) { if (isTagWithTypeExpression(tag)) { const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 312 /* JSDocTypeExpression */ ? typeExpression : void 0; + return typeExpression && typeExpression.kind === 313 /* JSDocTypeExpression */ ? typeExpression : void 0; } if (isJSDocAugmentsTag(tag) || isJSDocImplementsTag(tag)) { return tag.class; @@ -149492,7 +149557,7 @@ function getTypeScriptMemberSymbols() { completionKind = 2 /* PropertyAccess */; const isImportType = isLiteralImportTypeNode(node); - const isTypeLocation = insideJsDocTagTypeExpression || isImportType && !node.isTypeOf || isPartOfTypeNode(node.parent) || isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); + const isTypeLocation = isImportType && !node.isTypeOf || isPartOfTypeNode(node.parent) || isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); const isRhsOfImportDeclaration = isInRightSideOfInternalImportEqualsDeclaration(node); if (isEntityName(node) || isImportType || isPropertyAccessExpression(node)) { const isNamespaceName = isModuleDeclaration(node.parent); @@ -149512,13 +149577,13 @@ } : isRhsOfImportDeclaration ? ( // Any kind is allowed when dotting off namespace in internal import equals declaration (symbol2) => isValidTypeAccess(symbol2) || isValidValueAccess(symbol2) - ) : isTypeLocation ? isValidTypeAccess : isValidValueAccess; + ) : isTypeLocation || insideJsDocTagTypeExpression ? isValidTypeAccess : isValidValueAccess; for (const exportedSymbol of exportedSymbols) { if (isValidAccess(exportedSymbol)) { symbols.push(exportedSymbol); } } - if (!isTypeLocation && symbol.declarations && symbol.declarations.some((d) => d.kind !== 308 /* SourceFile */ && d.kind !== 264 /* ModuleDeclaration */ && d.kind !== 263 /* EnumDeclaration */)) { + if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 309 /* SourceFile */ && d.kind !== 265 /* ModuleDeclaration */ && d.kind !== 264 /* EnumDeclaration */)) { let type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); let insertQuestionDot = false; if (type.isNullableType()) { @@ -149561,7 +149626,7 @@ if (isRightOfQuestionDot && some(type.getCallSignatures())) { isNewIdentifierLocation = true; } - const propertyAccess = node.kind === 202 /* ImportType */ ? node : node.parent; + const propertyAccess = node.kind === 203 /* ImportType */ ? node : node.parent; if (inCheckedFile) { for (const symbol of type.getApparentProperties()) { if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) { @@ -149717,7 +149782,7 @@ } } } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 308 /* SourceFile */) { + if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 309 /* SourceFile */) { const thisType = typeChecker.tryGetThisTypeAt( scopeNode, /*includeGlobalThis*/ @@ -149752,10 +149817,10 @@ } function isSnippetScope(scopeNode) { switch (scopeNode.kind) { - case 308 /* SourceFile */: - case 225 /* TemplateExpression */: - case 291 /* JsxExpression */: - case 238 /* Block */: + case 309 /* SourceFile */: + case 226 /* TemplateExpression */: + case 292 /* JsxExpression */: + case 239 /* Block */: return true; default: return isStatement(scopeNode); @@ -149765,24 +149830,24 @@ return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 112 /* TypeOfKeyword */ && (contextToken2.parent.kind === 183 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 129 /* AssertsKeyword */ && contextToken2.parent.kind === 179 /* TypePredicate */); + return contextToken2 && (contextToken2.kind === 113 /* TypeOfKeyword */ && (contextToken2.parent.kind === 184 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 130 /* AssertsKeyword */ && contextToken2.parent.kind === 180 /* TypePredicate */); } function isContextTokenTypeLocation(contextToken2) { if (contextToken2) { const parentKind = contextToken2.parent.kind; switch (contextToken2.kind) { case 58 /* ColonToken */: - return parentKind === 169 /* PropertyDeclaration */ || parentKind === 168 /* PropertySignature */ || parentKind === 166 /* Parameter */ || parentKind === 257 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); + return parentKind === 170 /* PropertyDeclaration */ || parentKind === 169 /* PropertySignature */ || parentKind === 167 /* Parameter */ || parentKind === 258 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); case 63 /* EqualsToken */: - return parentKind === 262 /* TypeAliasDeclaration */; - case 128 /* AsKeyword */: - return parentKind === 231 /* AsExpression */; + return parentKind === 263 /* TypeAliasDeclaration */; + case 129 /* AsKeyword */: + return parentKind === 232 /* AsExpression */; case 29 /* LessThanToken */: - return parentKind === 180 /* TypeReference */ || parentKind === 213 /* TypeAssertionExpression */; - case 94 /* ExtendsKeyword */: - return parentKind === 165 /* TypeParameter */; - case 150 /* SatisfiesKeyword */: - return parentKind === 235 /* SatisfiesExpression */; + return parentKind === 181 /* TypeReference */ || parentKind === 214 /* TypeAssertionExpression */; + case 95 /* ExtendsKeyword */: + return parentKind === 166 /* TypeParameter */; + case 151 /* SatisfiesKeyword */: + return parentKind === 236 /* SatisfiesExpression */; } } return false; @@ -149960,14 +150025,14 @@ return true; } if (contextToken2.kind === 31 /* GreaterThanToken */ && contextToken2.parent) { - if (location === contextToken2.parent && (location.kind === 283 /* JsxOpeningElement */ || location.kind === 282 /* JsxSelfClosingElement */)) { + if (location === contextToken2.parent && (location.kind === 284 /* JsxOpeningElement */ || location.kind === 283 /* JsxSelfClosingElement */)) { return false; } - if (contextToken2.parent.kind === 283 /* JsxOpeningElement */) { - return location.parent.kind !== 283 /* JsxOpeningElement */; + if (contextToken2.parent.kind === 284 /* JsxOpeningElement */) { + return location.parent.kind !== 284 /* JsxOpeningElement */; } - if (contextToken2.parent.kind === 284 /* JsxClosingElement */ || contextToken2.parent.kind === 282 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 281 /* JsxElement */; + if (contextToken2.parent.kind === 285 /* JsxClosingElement */ || contextToken2.parent.kind === 283 /* JsxSelfClosingElement */) { + return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 282 /* JsxElement */; } } return false; @@ -149978,29 +150043,29 @@ const tokenKind = keywordForNode(contextToken); switch (tokenKind) { case 27 /* CommaToken */: - return containingNodeKind === 210 /* CallExpression */ || containingNodeKind === 173 /* Constructor */ || containingNodeKind === 211 /* NewExpression */ || containingNodeKind === 206 /* ArrayLiteralExpression */ || containingNodeKind === 223 /* BinaryExpression */ || containingNodeKind === 181 /* FunctionType */ || containingNodeKind === 207 /* ObjectLiteralExpression */; + return containingNodeKind === 211 /* CallExpression */ || containingNodeKind === 174 /* Constructor */ || containingNodeKind === 212 /* NewExpression */ || containingNodeKind === 207 /* ArrayLiteralExpression */ || containingNodeKind === 224 /* BinaryExpression */ || containingNodeKind === 182 /* FunctionType */ || containingNodeKind === 208 /* ObjectLiteralExpression */; case 20 /* OpenParenToken */: - return containingNodeKind === 210 /* CallExpression */ || containingNodeKind === 173 /* Constructor */ || containingNodeKind === 211 /* NewExpression */ || containingNodeKind === 214 /* ParenthesizedExpression */ || containingNodeKind === 193 /* ParenthesizedType */; + return containingNodeKind === 211 /* CallExpression */ || containingNodeKind === 174 /* Constructor */ || containingNodeKind === 212 /* NewExpression */ || containingNodeKind === 215 /* ParenthesizedExpression */ || containingNodeKind === 194 /* ParenthesizedType */; case 22 /* OpenBracketToken */: - return containingNodeKind === 206 /* ArrayLiteralExpression */ || containingNodeKind === 178 /* IndexSignature */ || containingNodeKind === 164 /* ComputedPropertyName */; - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 100 /* ImportKeyword */: + return containingNodeKind === 207 /* ArrayLiteralExpression */ || containingNodeKind === 179 /* IndexSignature */ || containingNodeKind === 165 /* ComputedPropertyName */; + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 101 /* ImportKeyword */: return true; case 24 /* DotToken */: - return containingNodeKind === 264 /* ModuleDeclaration */; + return containingNodeKind === 265 /* ModuleDeclaration */; case 18 /* OpenBraceToken */: - return containingNodeKind === 260 /* ClassDeclaration */ || containingNodeKind === 207 /* ObjectLiteralExpression */; + return containingNodeKind === 261 /* ClassDeclaration */ || containingNodeKind === 208 /* ObjectLiteralExpression */; case 63 /* EqualsToken */: - return containingNodeKind === 257 /* VariableDeclaration */ || containingNodeKind === 223 /* BinaryExpression */; + return containingNodeKind === 258 /* VariableDeclaration */ || containingNodeKind === 224 /* BinaryExpression */; case 15 /* TemplateHead */: - return containingNodeKind === 225 /* TemplateExpression */; + return containingNodeKind === 226 /* TemplateExpression */; case 16 /* TemplateMiddle */: - return containingNodeKind === 236 /* TemplateSpan */; - case 132 /* AsyncKeyword */: - return containingNodeKind === 171 /* MethodDeclaration */ || containingNodeKind === 300 /* ShorthandPropertyAssignment */; + return containingNodeKind === 237 /* TemplateSpan */; + case 133 /* AsyncKeyword */: + return containingNodeKind === 172 /* MethodDeclaration */ || containingNodeKind === 301 /* ShorthandPropertyAssignment */; case 41 /* AsteriskToken */: - return containingNodeKind === 171 /* MethodDeclaration */; + return containingNodeKind === 172 /* MethodDeclaration */; } if (isClassMemberCompletionKeyword(tokenKind)) { return true; @@ -150038,7 +150103,7 @@ completionKind = 0 /* ObjectPropertyDeclaration */; let typeMembers; let existingMembers; - if (objectLikeContainer.kind === 207 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 208 /* ObjectLiteralExpression */) { const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker); if (instantiatedType === void 0) { if (objectLikeContainer.flags & 33554432 /* InWithStatement */) { @@ -150060,16 +150125,16 @@ } } } else { - Debug.assert(objectLikeContainer.kind === 203 /* ObjectBindingPattern */); + Debug.assert(objectLikeContainer.kind === 204 /* ObjectBindingPattern */); isNewIdentifierLocation = false; const rootDeclaration = getRootDeclaration(objectLikeContainer.parent); if (!isVariableLike(rootDeclaration)) return Debug.fail("Root declaration is not variable-like."); - let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 247 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 166 /* Parameter */) { + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 248 /* ForOfStatement */; + if (!canGetType && rootDeclaration.kind === 167 /* Parameter */) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 171 /* MethodDeclaration */ || rootDeclaration.parent.kind === 175 /* SetAccessor */) { + } else if (rootDeclaration.parent.kind === 172 /* MethodDeclaration */ || rootDeclaration.parent.kind === 176 /* SetAccessor */) { canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -150095,7 +150160,7 @@ const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); symbols = concatenate(symbols, filteredMembers); setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 207 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { + if (objectLikeContainer.kind === 208 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { transformObjectLiteralMembersSortText(symbolsStartIndex); collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); } @@ -150111,10 +150176,10 @@ if (!isTypeKeywordTokenOrIdentifier(contextToken)) { keywordFilters = 8 /* TypeKeyword */; } - const { moduleSpecifier } = namedImportsOrExports.kind === 272 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 273 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; if (!moduleSpecifier) { isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 272 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; + return namedImportsOrExports.kind === 273 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; } const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); if (!moduleSpecifierSymbol) { @@ -150239,11 +150304,11 @@ case 30 /* LessThanSlashToken */: case 43 /* SlashToken */: case 79 /* Identifier */: - case 208 /* PropertyAccessExpression */: - case 289 /* JsxAttributes */: - case 288 /* JsxAttribute */: - case 290 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 282 /* JsxSelfClosingElement */ || parent2.kind === 283 /* JsxOpeningElement */)) { + case 209 /* PropertyAccessExpression */: + case 290 /* JsxAttributes */: + case 289 /* JsxAttribute */: + case 291 /* JsxSpreadAttribute */: + if (parent2 && (parent2.kind === 283 /* JsxSelfClosingElement */ || parent2.kind === 284 /* JsxOpeningElement */)) { if (contextToken2.kind === 31 /* GreaterThanToken */) { const precedingToken = findPrecedingToken( contextToken2.pos, @@ -150255,20 +150320,20 @@ break; } return parent2; - } else if (parent2.kind === 288 /* JsxAttribute */) { + } else if (parent2.kind === 289 /* JsxAttribute */) { return parent2.parent.parent; } break; case 10 /* StringLiteral */: - if (parent2 && (parent2.kind === 288 /* JsxAttribute */ || parent2.kind === 290 /* JsxSpreadAttribute */)) { + if (parent2 && (parent2.kind === 289 /* JsxAttribute */ || parent2.kind === 291 /* JsxSpreadAttribute */)) { return parent2.parent.parent; } break; case 19 /* CloseBraceToken */: - if (parent2 && parent2.kind === 291 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 288 /* JsxAttribute */) { + if (parent2 && parent2.kind === 292 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 289 /* JsxAttribute */) { return parent2.parent.parent.parent; } - if (parent2 && parent2.kind === 290 /* JsxSpreadAttribute */) { + if (parent2 && parent2.kind === 291 /* JsxSpreadAttribute */) { return parent2.parent.parent; } break; @@ -150281,59 +150346,59 @@ const containingNodeKind = parent2.kind; switch (contextToken2.kind) { case 27 /* CommaToken */: - return containingNodeKind === 257 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 240 /* VariableStatement */ || containingNodeKind === 263 /* EnumDeclaration */ || // enum a { foo, | - isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 261 /* InterfaceDeclaration */ || // interface A= contextToken2.pos; case 24 /* DotToken */: - return containingNodeKind === 204 /* ArrayBindingPattern */; + return containingNodeKind === 205 /* ArrayBindingPattern */; case 58 /* ColonToken */: - return containingNodeKind === 205 /* BindingElement */; + return containingNodeKind === 206 /* BindingElement */; case 22 /* OpenBracketToken */: - return containingNodeKind === 204 /* ArrayBindingPattern */; + return containingNodeKind === 205 /* ArrayBindingPattern */; case 20 /* OpenParenToken */: - return containingNodeKind === 295 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); + return containingNodeKind === 296 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); case 18 /* OpenBraceToken */: - return containingNodeKind === 263 /* EnumDeclaration */; + return containingNodeKind === 264 /* EnumDeclaration */; case 29 /* LessThanToken */: - return containingNodeKind === 260 /* ClassDeclaration */ || // class A< | - containingNodeKind === 228 /* ClassExpression */ || // var C = class D< | - containingNodeKind === 261 /* InterfaceDeclaration */ || // interface A< | - containingNodeKind === 262 /* TypeAliasDeclaration */ || // type List< | + return containingNodeKind === 261 /* ClassDeclaration */ || // class A< | + containingNodeKind === 229 /* ClassExpression */ || // var C = class D< | + containingNodeKind === 262 /* InterfaceDeclaration */ || // interface A< | + containingNodeKind === 263 /* TypeAliasDeclaration */ || // type List< | isFunctionLikeKind(containingNodeKind); - case 124 /* StaticKeyword */: - return containingNodeKind === 169 /* PropertyDeclaration */ && !isClassLike(parent2.parent); + case 125 /* StaticKeyword */: + return containingNodeKind === 170 /* PropertyDeclaration */ && !isClassLike(parent2.parent); case 25 /* DotDotDotToken */: - return containingNodeKind === 166 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 204 /* ArrayBindingPattern */; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - return containingNodeKind === 166 /* Parameter */ && !isConstructorDeclaration(parent2.parent); - case 128 /* AsKeyword */: - return containingNodeKind === 273 /* ImportSpecifier */ || containingNodeKind === 278 /* ExportSpecifier */ || containingNodeKind === 271 /* NamespaceImport */; - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: + return containingNodeKind === 167 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 205 /* ArrayBindingPattern */; + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + return containingNodeKind === 167 /* Parameter */ && !isConstructorDeclaration(parent2.parent); + case 129 /* AsKeyword */: + return containingNodeKind === 274 /* ImportSpecifier */ || containingNodeKind === 279 /* ExportSpecifier */ || containingNodeKind === 272 /* NamespaceImport */; + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: return !isFromObjectTypeDeclaration(contextToken2); case 79 /* Identifier */: - if (containingNodeKind === 273 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { + if (containingNodeKind === 274 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { return false; } break; - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: - case 118 /* InterfaceKeyword */: - case 98 /* FunctionKeyword */: - case 113 /* VarKeyword */: - case 100 /* ImportKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: - case 138 /* InferKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: + case 119 /* InterfaceKeyword */: + case 99 /* FunctionKeyword */: + case 114 /* VarKeyword */: + case 101 /* ImportKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: + case 139 /* InferKeyword */: return true; - case 154 /* TypeKeyword */: - return containingNodeKind !== 273 /* ImportSpecifier */; + case 155 /* TypeKeyword */: + return containingNodeKind !== 274 /* ImportSpecifier */; case 41 /* AsteriskToken */: return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); } @@ -150346,28 +150411,28 @@ } } switch (keywordForNode(contextToken2)) { - case 126 /* AbstractKeyword */: - case 84 /* ClassKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 92 /* EnumKeyword */: - case 98 /* FunctionKeyword */: - case 118 /* InterfaceKeyword */: - case 119 /* LetKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 124 /* StaticKeyword */: - case 113 /* VarKeyword */: + case 127 /* AbstractKeyword */: + case 85 /* ClassKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 93 /* EnumKeyword */: + case 99 /* FunctionKeyword */: + case 119 /* InterfaceKeyword */: + case 120 /* LetKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 125 /* StaticKeyword */: + case 114 /* VarKeyword */: return true; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return isPropertyDeclaration(contextToken2.parent); } const ancestorClassLike = findAncestor(contextToken2.parent, isClassLike); if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { return false; } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 169 /* PropertyDeclaration */); + const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 170 /* PropertyDeclaration */); if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { return false; @@ -150381,7 +150446,7 @@ return contextToken2.kind !== 63 /* EqualsToken */ && (contextToken2.kind === 26 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); } function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 173 /* Constructor */; + return isFunctionLikeKind(kind) && kind !== 174 /* Constructor */; } function isDotOfNumericLiteral(contextToken2) { if (contextToken2.kind === 8 /* NumericLiteral */) { @@ -150391,7 +150456,7 @@ return false; } function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 258 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); + return node2.parent.kind === 259 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); } function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (existingMembers.length === 0) { @@ -150400,7 +150465,7 @@ const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set(); const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 299 /* PropertyAssignment */ && m.kind !== 300 /* ShorthandPropertyAssignment */ && m.kind !== 205 /* BindingElement */ && m.kind !== 171 /* MethodDeclaration */ && m.kind !== 174 /* GetAccessor */ && m.kind !== 175 /* SetAccessor */ && m.kind !== 301 /* SpreadAssignment */) { + if (m.kind !== 300 /* PropertyAssignment */ && m.kind !== 301 /* ShorthandPropertyAssignment */ && m.kind !== 206 /* BindingElement */ && m.kind !== 172 /* MethodDeclaration */ && m.kind !== 175 /* GetAccessor */ && m.kind !== 176 /* SetAccessor */ && m.kind !== 302 /* SpreadAssignment */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -150480,7 +150545,7 @@ function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 169 /* PropertyDeclaration */ && m.kind !== 171 /* MethodDeclaration */ && m.kind !== 174 /* GetAccessor */ && m.kind !== 175 /* SetAccessor */) { + if (m.kind !== 170 /* PropertyDeclaration */ && m.kind !== 172 /* MethodDeclaration */ && m.kind !== 175 /* GetAccessor */ && m.kind !== 176 /* SetAccessor */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -150506,7 +150571,7 @@ if (isCurrentlyEditingNode(attr)) { continue; } - if (attr.kind === 288 /* JsxAttribute */) { + if (attr.kind === 289 /* JsxAttribute */) { seenNames.add(attr.name.escapedText); } else if (isJsxSpreadAttribute(attr)) { setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); @@ -150532,7 +150597,7 @@ break; case 41 /* AsteriskToken */: return isMethodDeclaration(parent2) ? tryCast(parent2.parent, isObjectLiteralExpression) : void 0; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return tryCast(parent2.parent, isObjectLiteralExpression); case 79 /* Identifier */: return contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent) ? contextToken.parent.parent : void 0; @@ -150606,7 +150671,7 @@ case 0 /* None */: return false; case 1 /* All */: - return isFunctionLikeBodyKeyword(kind) || kind === 136 /* DeclareKeyword */ || kind === 142 /* ModuleKeyword */ || kind === 154 /* TypeKeyword */ || kind === 143 /* NamespaceKeyword */ || kind === 126 /* AbstractKeyword */ || isTypeKeyword(kind) && kind !== 155 /* UndefinedKeyword */; + return isFunctionLikeBodyKeyword(kind) || kind === 137 /* DeclareKeyword */ || kind === 143 /* ModuleKeyword */ || kind === 155 /* TypeKeyword */ || kind === 144 /* NamespaceKeyword */ || kind === 127 /* AbstractKeyword */ || isTypeKeyword(kind) && kind !== 156 /* UndefinedKeyword */; case 5 /* FunctionLikeBodyKeywords */: return isFunctionLikeBodyKeyword(kind); case 2 /* ClassElementKeywords */: @@ -150616,11 +150681,11 @@ case 4 /* ConstructorParameterKeywords */: return isParameterPropertyModifier(kind); case 6 /* TypeAssertionKeywords */: - return isTypeKeyword(kind) || kind === 85 /* ConstKeyword */; + return isTypeKeyword(kind) || kind === 86 /* ConstKeyword */; case 7 /* TypeKeywords */: return isTypeKeyword(kind); case 8 /* TypeKeyword */: - return kind === 154 /* TypeKeyword */; + return kind === 155 /* TypeKeyword */; default: return Debug.assertNever(keywordFilter); } @@ -150628,58 +150693,58 @@ } function isTypeScriptOnlyKeyword(kind) { switch (kind) { - case 126 /* AbstractKeyword */: - case 131 /* AnyKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 136 /* DeclareKeyword */: - case 92 /* EnumKeyword */: - case 159 /* GlobalKeyword */: - case 117 /* ImplementsKeyword */: - case 138 /* InferKeyword */: - case 118 /* InterfaceKeyword */: - case 140 /* IsKeyword */: - case 141 /* KeyOfKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 144 /* NeverKeyword */: - case 148 /* NumberKeyword */: - case 149 /* ObjectKeyword */: - case 161 /* OverrideKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 146 /* ReadonlyKeyword */: - case 152 /* StringKeyword */: - case 153 /* SymbolKeyword */: - case 154 /* TypeKeyword */: - case 156 /* UniqueKeyword */: - case 157 /* UnknownKeyword */: + case 127 /* AbstractKeyword */: + case 132 /* AnyKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 137 /* DeclareKeyword */: + case 93 /* EnumKeyword */: + case 160 /* GlobalKeyword */: + case 118 /* ImplementsKeyword */: + case 139 /* InferKeyword */: + case 119 /* InterfaceKeyword */: + case 141 /* IsKeyword */: + case 142 /* KeyOfKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 145 /* NeverKeyword */: + case 149 /* NumberKeyword */: + case 150 /* ObjectKeyword */: + case 162 /* OverrideKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 147 /* ReadonlyKeyword */: + case 153 /* StringKeyword */: + case 154 /* SymbolKeyword */: + case 155 /* TypeKeyword */: + case 157 /* UniqueKeyword */: + case 158 /* UnknownKeyword */: return true; default: return false; } } function isInterfaceOrTypeLiteralCompletionKeyword(kind) { - return kind === 146 /* ReadonlyKeyword */; + return kind === 147 /* ReadonlyKeyword */; } function isClassMemberCompletionKeyword(kind) { switch (kind) { - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 135 /* ConstructorKeyword */: - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 161 /* OverrideKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 136 /* ConstructorKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 162 /* OverrideKeyword */: return true; default: return isClassMemberModifier(kind); } } function isFunctionLikeBodyKeyword(kind) { - return kind === 132 /* AsyncKeyword */ || kind === 133 /* AwaitKeyword */ || kind === 128 /* AsKeyword */ || kind === 150 /* SatisfiesKeyword */ || kind === 154 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); + return kind === 133 /* AsyncKeyword */ || kind === 134 /* AwaitKeyword */ || kind === 129 /* AsKeyword */ || kind === 151 /* SatisfiesKeyword */ || kind === 155 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); } function keywordForNode(node) { var _a2; @@ -150694,7 +150759,7 @@ const currentLine = file.getLineAndCharacterOfPosition(position).line; if ((isImportDeclaration(parent2) || isExportDeclaration(parent2) && parent2.moduleSpecifier) && contextToken === parent2.moduleSpecifier && tokenLine === currentLine) { entries.push({ - name: tokenToString(130 /* AssertKeyword */), + name: tokenToString(131 /* AssertKeyword */), kind: "keyword" /* keyword */, kindModifiers: "" /* none */, sortText: SortText.GlobalsOrKeywords @@ -150720,7 +150785,7 @@ function getApparentProperties(type, node, checker) { if (!type.isUnion()) return type.getApparentProperties(); - return checker.getAllPossiblePropertiesOfTypes(filter(type.types, (memberType) => !(memberType.flags & 134348796 /* Primitive */ || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties())))); + return checker.getAllPossiblePropertiesOfTypes(filter(type.types, (memberType) => !(memberType.flags & 402784252 /* Primitive */ || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties())))); } function containsNonPublicProperties(props) { return some(props, (p) => !!(getDeclarationModifierFlagsFromSymbol(p) & 24 /* NonPublicAccessibilityModifier */)); @@ -150731,7 +150796,7 @@ function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { var _a2; switch (location.kind) { - case 354 /* SyntaxList */: + case 355 /* SyntaxList */: return tryCast(location.parent, isObjectTypeDeclaration); case 1 /* EndOfFileToken */: const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration); @@ -150754,7 +150819,7 @@ } if (!contextToken) return void 0; - if (location.kind === 135 /* ConstructorKeyword */ || isIdentifier(contextToken) && isPropertyDeclaration(contextToken.parent) && isClassLike(location)) { + if (location.kind === 136 /* ConstructorKeyword */ || isIdentifier(contextToken) && isPropertyDeclaration(contextToken.parent) && isClassLike(location)) { return findAncestor(contextToken, isClassLike); } switch (contextToken.kind) { @@ -150790,7 +150855,7 @@ case 26 /* SemicolonToken */: case 27 /* CommaToken */: case 79 /* Identifier */: - if (parent2.kind === 168 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 169 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { return parent2.parent; } break; @@ -150807,11 +150872,11 @@ if (!t) return void 0; switch (node.kind) { - case 168 /* PropertySignature */: + case 169 /* PropertySignature */: return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 190 /* IntersectionType */: - case 184 /* TypeLiteral */: - case 189 /* UnionType */: + case 191 /* IntersectionType */: + case 185 /* TypeLiteral */: + case 190 /* UnionType */: return t; } } @@ -150834,7 +150899,7 @@ case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 43 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 308 /* SourceFile */; + return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 309 /* SourceFile */; default: return Debug.assertNever(triggerCharacter); } @@ -150903,7 +150968,7 @@ return { isKeywordOnlyCompletion, keywordCompletion, - isNewIdentifierLocation: !!(candidate || keywordCompletion === 154 /* TypeKeyword */), + isNewIdentifierLocation: !!(candidate || keywordCompletion === 155 /* TypeKeyword */), isTopLevelTypeOnly: !!((_b = (_a2 = tryCast(candidate, isImportDeclaration)) == null ? void 0 : _a2.importClause) == null ? void 0 : _b.isTypeOnly) || !!((_c = tryCast(candidate, isImportEqualsDeclaration)) == null ? void 0 : _c.isTypeOnly), couldBeTypeOnlyImportSpecifier: !!candidate && couldBeTypeOnlyImportSpecifier(candidate, contextToken), replacementSpan: getSingleLineReplacementSpanForImportCompletionNode(candidate) @@ -150911,20 +150976,20 @@ function getCandidate() { const parent2 = contextToken.parent; if (isImportEqualsDeclaration(parent2)) { - keywordCompletion = contextToken.kind === 154 /* TypeKeyword */ ? void 0 : 154 /* TypeKeyword */; + keywordCompletion = contextToken.kind === 155 /* TypeKeyword */ ? void 0 : 155 /* TypeKeyword */; return isModuleSpecifierMissingOrEmpty(parent2.moduleReference) ? parent2 : void 0; } if (couldBeTypeOnlyImportSpecifier(parent2, contextToken) && canCompleteFromNamedBindings(parent2.parent)) { return parent2; } if (isNamedImports(parent2) || isNamespaceImport(parent2)) { - if (!parent2.parent.isTypeOnly && (contextToken.kind === 18 /* OpenBraceToken */ || contextToken.kind === 100 /* ImportKeyword */ || contextToken.kind === 27 /* CommaToken */)) { - keywordCompletion = 154 /* TypeKeyword */; + if (!parent2.parent.isTypeOnly && (contextToken.kind === 18 /* OpenBraceToken */ || contextToken.kind === 101 /* ImportKeyword */ || contextToken.kind === 27 /* CommaToken */)) { + keywordCompletion = 155 /* TypeKeyword */; } if (canCompleteFromNamedBindings(parent2)) { if (contextToken.kind === 19 /* CloseBraceToken */ || contextToken.kind === 79 /* Identifier */) { isKeywordOnlyCompletion = true; - keywordCompletion = 158 /* FromKeyword */; + keywordCompletion = 159 /* FromKeyword */; } else { return parent2.parent.parent; } @@ -150932,11 +150997,11 @@ return void 0; } if (isImportKeyword(contextToken) && isSourceFile(parent2)) { - keywordCompletion = 154 /* TypeKeyword */; + keywordCompletion = 155 /* TypeKeyword */; return contextToken; } if (isImportKeyword(contextToken) && isImportDeclaration(parent2)) { - keywordCompletion = 154 /* TypeKeyword */; + keywordCompletion = 155 /* TypeKeyword */; return isModuleSpecifierMissingOrEmpty(parent2.moduleSpecifier) ? parent2 : void 0; } return void 0; @@ -150951,8 +151016,8 @@ if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); } - Debug.assert(top.kind !== 100 /* ImportKeyword */ && top.kind !== 273 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 269 /* ImportDeclaration */ ? (_c = getPotentiallyInvalidImportSpecifier((_b = top.importClause) == null ? void 0 : _b.namedBindings)) != null ? _c : top.moduleSpecifier : top.moduleReference; + Debug.assert(top.kind !== 101 /* ImportKeyword */ && top.kind !== 274 /* ImportSpecifier */); + const potentialSplitPoint = top.kind === 270 /* ImportDeclaration */ ? (_c = getPotentiallyInvalidImportSpecifier((_b = top.importClause) == null ? void 0 : _b.namedBindings)) != null ? _c : top.moduleSpecifier : top.moduleReference; const withoutModuleSpecifier = { pos: top.getFirstToken().getStart(), end: potentialSplitPoint.pos @@ -151105,7 +151170,7 @@ _keywordCompletions = []; allKeywordsCompletions = memoize(() => { const res = []; - for (let i = 81 /* FirstKeyword */; i <= 162 /* LastKeyword */; i++) { + for (let i = 82 /* FirstKeyword */; i <= 163 /* LastKeyword */; i++) { res.push({ name: tokenToString(i), kind: "keyword" /* keyword */, @@ -151275,26 +151340,26 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeChecker, compilerOptions, host, preferences) { const parent2 = walkUpParentheses(node.parent); switch (parent2.kind) { - case 198 /* LiteralType */: { + case 199 /* LiteralType */: { const grandParent = walkUpParentheses(parent2.parent); switch (grandParent.kind) { - case 230 /* ExpressionWithTypeArguments */: - case 180 /* TypeReference */: { + case 231 /* ExpressionWithTypeArguments */: + case 181 /* TypeReference */: { const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); if (typeArgument) { return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; } return void 0; } - case 196 /* IndexedAccessType */: + case 197 /* IndexedAccessType */: const { indexType, objectType } = grandParent; if (!rangeContainsPosition(indexType, position)) { return void 0; } return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType)); - case 202 /* ImportType */: + case 203 /* ImportType */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - case 189 /* UnionType */: { + case 190 /* UnionType */: { if (!isTypeReferenceNode(grandParent.parent)) { return void 0; } @@ -151306,30 +151371,30 @@ return void 0; } } - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker, parent2.parent); } return fromContextualType() || fromContextualType(0 /* None */); - case 209 /* ElementAccessExpression */: { + case 210 /* ElementAccessExpression */: { const { expression, argumentExpression } = parent2; if (node === skipParentheses(argumentExpression)) { return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression)); } return void 0; } - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 288 /* JsxAttribute */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 289 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 288 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); + const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 289 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(); } - case 269 /* ImportDeclaration */: - case 275 /* ExportDeclaration */: - case 280 /* ExternalModuleReference */: + case 270 /* ImportDeclaration */: + case 276 /* ExportDeclaration */: + case 281 /* ExternalModuleReference */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - case 292 /* CaseClause */: + case 293 /* CaseClause */: const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses); const contextualTypes = fromContextualType(); if (!contextualTypes) { @@ -151350,9 +151415,9 @@ } function walkUpParentheses(node) { switch (node.kind) { - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return walkUpParenthesizedTypes(node); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return walkUpParenthesizedExpressions(node); default: return node; @@ -152046,14 +152111,14 @@ if (cancellationToken) cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (isImportCall(direct)) { handleImportCall(direct); break; } if (!isAvailableThroughGlobal) { const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 257 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent2.kind === 258 /* VariableDeclaration */) { const { name } = parent2; if (name.kind === 79 /* Identifier */) { directImports.push(name); @@ -152064,7 +152129,7 @@ break; case 79 /* Identifier */: break; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: handleNamespaceImport( direct, direct.name, @@ -152073,10 +152138,10 @@ false ); break; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 271 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 272 /* NamespaceImport */) { handleNamespaceImport( direct, namedBindings.name, @@ -152089,10 +152154,10 @@ addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); } break; - case 275 /* ExportDeclaration */: + case 276 /* ExportDeclaration */: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 277 /* NamespaceExport */) { + } else if (direct.exportClause.kind === 278 /* NamespaceExport */) { addIndirectUser( getSourceFileLikeForImportDeclaration(direct), /** addTransitiveDependencies */ @@ -152102,7 +152167,7 @@ directImports.push(direct); } break; - case 202 /* ImportType */: + case 203 /* ImportType */: if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { addIndirectUser( direct.getSourceFile(), @@ -152143,7 +152208,7 @@ directImports.push(importDeclaration); } else if (!isAvailableThroughGlobal) { const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 308 /* SourceFile */ || sourceFileLike.kind === 264 /* ModuleDeclaration */); + Debug.assert(sourceFileLike.kind === 309 /* SourceFile */ || sourceFileLike.kind === 265 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUser( sourceFileLike, @@ -152197,7 +152262,7 @@ } return { importSearches, singleReferences }; function handleImport(decl) { - if (decl.kind === 268 /* ImportEqualsDeclaration */) { + if (decl.kind === 269 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } @@ -152207,7 +152272,7 @@ handleNamespaceImportLike(decl); return; } - if (decl.kind === 202 /* ImportType */) { + if (decl.kind === 203 /* ImportType */) { if (decl.qualifier) { const firstIdentifier = getFirstIdentifier(decl.qualifier); if (firstIdentifier.escapedText === symbolName(exportSymbol)) { @@ -152221,7 +152286,7 @@ if (decl.moduleSpecifier.kind !== 10 /* StringLiteral */) { return; } - if (decl.kind === 275 /* ExportDeclaration */) { + if (decl.kind === 276 /* ExportDeclaration */) { if (decl.exportClause && isNamedExports(decl.exportClause)) { searchForNamedImport(decl.exportClause); } @@ -152230,10 +152295,10 @@ const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; if (namedBindings) { switch (namedBindings.kind) { - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: handleNamespaceImportLike(namedBindings.name); break; - case 272 /* NamedImports */: + case 273 /* NamedImports */: if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { searchForNamedImport(namedBindings); } @@ -152267,7 +152332,7 @@ addSearch(name, checker.getSymbolAtLocation(name)); } } else { - const localSymbol = element.kind === 278 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); + const localSymbol = element.kind === 279 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); } } @@ -152291,7 +152356,7 @@ const checker = program.getTypeChecker(); for (const referencingFile of sourceFiles) { const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 308 /* SourceFile */) { + if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 309 /* SourceFile */) { for (const ref of referencingFile.referencedFiles) { if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { refs.push({ kind: "reference", referencingFile, ref }); @@ -152333,7 +152398,7 @@ return map2; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 308 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( + return forEach(sourceFileLike.kind === 309 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( // TODO: GH#18217 action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action) )); @@ -152346,15 +152411,15 @@ } else { forEachPossibleImportOrExportStatement(sourceFile, (statement) => { switch (statement.kind) { - case 275 /* ExportDeclaration */: - case 269 /* ImportDeclaration */: { + case 276 /* ExportDeclaration */: + case 270 /* ImportDeclaration */: { const decl = statement; if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; } - case 268 /* ImportEqualsDeclaration */: { + case 269 /* ImportEqualsDeclaration */: { const decl = statement; if (isExternalModuleImportEquals(decl)) { action(decl, decl.moduleReference.expression); @@ -152372,7 +152437,7 @@ const { parent: parent2 } = node; const grandparent = parent2.parent; if (symbol.exportSymbol) { - if (parent2.kind === 208 /* PropertyAccessExpression */) { + if (parent2.kind === 209 /* PropertyAccessExpression */) { return ((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport( grandparent, /*useLhsSymbol*/ @@ -152489,15 +152554,15 @@ function isNodeImport(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return parent2.name === node && isExternalModuleImportEquals(parent2); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return !parent2.propertyName; - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: Debug.assert(parent2.name === node); return true; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); default: return false; @@ -152528,21 +152593,21 @@ return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 210 /* CallExpression */) { + if (node.kind === 211 /* CallExpression */) { return node.getSourceFile(); } const { parent: parent2 } = node; - if (parent2.kind === 308 /* SourceFile */) { + if (parent2.kind === 309 /* SourceFile */) { return parent2; } - Debug.assert(parent2.kind === 265 /* ModuleBlock */); + Debug.assert(parent2.kind === 266 /* ModuleBlock */); return cast(parent2.parent, isAmbientModuleDeclaration); } function isAmbientModuleDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; + return node.kind === 265 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; } function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 280 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; + return eq.moduleReference.kind === 281 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; } var ExportKind2, ImportExport; var init_importTracker = __esm({ @@ -152607,7 +152672,7 @@ if (node.parent.name === node || // node is name of declaration, use parent isConstructorDeclaration(node.parent) || isExportAssignment(node.parent) || // Property name of the import export specifier or binding pattern, use parent (isImportOrExportSpecifier(node.parent) || isBindingElement(node.parent)) && node.parent.propertyName === node || // Is default export - node.kind === 88 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) { + node.kind === 89 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) { return getContextNode(node.parent); } return void 0; @@ -152616,28 +152681,28 @@ if (!node) return void 0; switch (node.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getContextNode(node.parent.parent); - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: return node.parent.parent.parent; - case 278 /* ExportSpecifier */: - case 271 /* NamespaceImport */: + case 279 /* ExportSpecifier */: + case 272 /* NamespaceImport */: return node.parent.parent; - case 270 /* ImportClause */: - case 277 /* NamespaceExport */: + case 271 /* ImportClause */: + case 278 /* NamespaceExport */: return node.parent; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return isExpressionStatement(node.parent) ? node.parent : node; - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: return { start: node.initializer, end: node.expression }; - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( findAncestor( node.parent, @@ -152670,13 +152735,13 @@ )); } function isDefinitionForReference(node) { - return node.kind === 88 /* DefaultKeyword */ || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 135 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent); + return node.kind === 89 /* DefaultKeyword */ || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 136 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent); } function getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) { const node = getTouchingPropertyName(sourceFile, position); let referenceEntries; const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 208 /* PropertyAccessExpression */ || node.parent.kind === 205 /* BindingElement */ || node.parent.kind === 209 /* ElementAccessExpression */ || node.kind === 106 /* SuperKeyword */) { + if (node.parent.kind === 209 /* PropertyAccessExpression */ || node.parent.kind === 206 /* BindingElement */ || node.parent.kind === 210 /* ElementAccessExpression */ || node.kind === 107 /* SuperKeyword */) { referenceEntries = entries && [...entries]; } else if (entries) { const queue = createQueue(entries); @@ -152697,15 +152762,15 @@ return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return void 0; } const checker = program.getTypeChecker(); - if (node.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 301 /* ShorthandPropertyAssignment */) { const result = []; Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); return result; - } else if (node.kind === 106 /* SuperKeyword */ || isSuperProperty(node.parent)) { + } else if (node.kind === 107 /* SuperKeyword */ || isSuperProperty(node.parent)) { const symbol = checker.getSymbolAtLocation(node); return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)]; } else { @@ -152892,12 +152957,12 @@ const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); if (symbol) { return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 207 /* ObjectLiteralExpression */) { + } else if (node.kind === 208 /* ObjectLiteralExpression */) { return { kind: "interface" /* interfaceElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("object literal"), punctuationPart(21 /* CloseParenToken */)] }; - } else if (node.kind === 228 /* ClassExpression */) { + } else if (node.kind === 229 /* ClassExpression */) { return { kind: "local class" /* localClassElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(21 /* CloseParenToken */)] @@ -152941,13 +153006,13 @@ } function isWriteAccessForReference(node) { const decl = getDeclarationFromName(node); - return !!decl && declarationIsWriteAccess(decl) || node.kind === 88 /* DefaultKeyword */ || isWriteAccess(node); + return !!decl && declarationIsWriteAccess(decl) || node.kind === 89 /* DefaultKeyword */ || isWriteAccess(node); } function isDeclarationOfSymbol(node, target) { var _a2; if (!target) return false; - const source = getDeclarationFromName(node) || (node.kind === 88 /* DefaultKeyword */ ? node.parent : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent : node.kind === 135 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent) ? node.parent.parent : void 0); + const source = getDeclarationFromName(node) || (node.kind === 89 /* DefaultKeyword */ ? node.parent : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent : node.kind === 136 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent) ? node.parent.parent : void 0); const commonjsSource = source && isBinaryExpression(source) ? source.left : void 0; return !!(source && ((_a2 = target.declarations) == null ? void 0 : _a2.some((d) => d === source || d === commonjsSource))); } @@ -152955,46 +153020,46 @@ if (!!(decl.flags & 16777216 /* Ambient */)) return true; switch (decl.kind) { - case 223 /* BinaryExpression */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 88 /* DefaultKeyword */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 278 /* ExportSpecifier */: - case 270 /* ImportClause */: - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 261 /* InterfaceDeclaration */: - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: - case 288 /* JsxAttribute */: - case 264 /* ModuleDeclaration */: - case 267 /* NamespaceExportDeclaration */: - case 271 /* NamespaceImport */: - case 277 /* NamespaceExport */: - case 166 /* Parameter */: - case 300 /* ShorthandPropertyAssignment */: - case 262 /* TypeAliasDeclaration */: - case 165 /* TypeParameter */: + case 224 /* BinaryExpression */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 89 /* DefaultKeyword */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 279 /* ExportSpecifier */: + case 271 /* ImportClause */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 262 /* InterfaceDeclaration */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 289 /* JsxAttribute */: + case 265 /* ModuleDeclaration */: + case 268 /* NamespaceExportDeclaration */: + case 272 /* NamespaceImport */: + case 278 /* NamespaceExport */: + case 167 /* Parameter */: + case 301 /* ShorthandPropertyAssignment */: + case 263 /* TypeAliasDeclaration */: + case 166 /* TypeParameter */: return true; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 173 /* Constructor */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 174 /* Constructor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return !!decl.body; - case 257 /* VariableDeclaration */: - case 169 /* PropertyDeclaration */: + case 258 /* VariableDeclaration */: + case 170 /* PropertyDeclaration */: return !!decl.initializer || isCatchClause(decl.parent); - case 170 /* MethodSignature */: - case 168 /* PropertySignature */: - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: + case 171 /* MethodSignature */: + case 169 /* PropertySignature */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: return false; default: return Debug.failBadSyntaxKind(decl); @@ -153241,9 +153306,9 @@ if (symbol.declarations) { for (const decl of symbol.declarations) { switch (decl.kind) { - case 308 /* SourceFile */: + case 309 /* SourceFile */: break; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { references.push(nodeEntry(decl.name)); } @@ -153258,7 +153323,7 @@ for (const decl of exported.declarations) { const sourceFile = decl.getSourceFile(); if (sourceFilesSet.has(sourceFile.fileName)) { - const node = isBinaryExpression(decl) && isPropertyAccessExpression(decl.left) ? decl.left.expression : isExportAssignment(decl) ? Debug.checkDefined(findChildOfKind(decl, 93 /* ExportKeyword */, sourceFile)) : getNameOfDeclaration(decl) || decl; + const node = isBinaryExpression(decl) && isPropertyAccessExpression(decl.left) ? decl.left.expression : isExportAssignment(decl) ? Debug.checkDefined(findChildOfKind(decl, 94 /* ExportKeyword */, sourceFile)) : getNameOfDeclaration(decl) || decl; references.push(nodeEntry(node)); } } @@ -153266,21 +153331,21 @@ return references.length ? [{ definition: { type: 0 /* Symbol */, symbol }, references }] : emptyArray; } function isReadonlyTypeOperator(node) { - return node.kind === 146 /* ReadonlyKeyword */ && isTypeOperatorNode(node.parent) && node.parent.operator === 146 /* ReadonlyKeyword */; + return node.kind === 147 /* ReadonlyKeyword */ && isTypeOperatorNode(node.parent) && node.parent.operator === 147 /* ReadonlyKeyword */; } function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) { if (isTypeKeyword(node.kind)) { - if (node.kind === 114 /* VoidKeyword */ && isVoidExpression(node.parent)) { + if (node.kind === 115 /* VoidKeyword */ && isVoidExpression(node.parent)) { return void 0; } - if (node.kind === 146 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { + if (node.kind === 147 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { return void 0; } return getAllReferencesForKeyword( sourceFiles, node.kind, cancellationToken, - node.kind === 146 /* ReadonlyKeyword */ ? isReadonlyTypeOperator : void 0 + node.kind === 147 /* ReadonlyKeyword */ ? isReadonlyTypeOperator : void 0 ); } if (isImportMeta(node.parent) && node.parent.name === node) { @@ -153298,7 +153363,7 @@ if (isThis(node)) { return getReferencesForThisKeyword(node, sourceFiles, cancellationToken); } - if (node.kind === 106 /* SuperKeyword */) { + if (node.kind === 107 /* SuperKeyword */) { return getReferencesForSuperKeyword(node); } return void 0; @@ -153332,7 +153397,7 @@ /*alwaysGetReferences*/ true ); - } else if (node && node.kind === 88 /* DefaultKeyword */ && symbol.escapedName === "default" /* Default */ && symbol.parent) { + } else if (node && node.kind === 89 /* DefaultKeyword */ && symbol.escapedName === "default" /* Default */ && symbol.parent) { addReference(node, symbol, state); searchForImportsOfExport(node, symbol, { exportingModuleSymbol: symbol.parent, exportKind: 1 /* Default */ }, state); } else { @@ -153367,8 +153432,8 @@ } function getSpecialSearchKind(node) { switch (node.kind) { - case 173 /* Constructor */: - case 135 /* ConstructorKeyword */: + case 174 /* Constructor */: + case 136 /* ConstructorKeyword */: return 1 /* Constructor */; case 79 /* Identifier */: if (isClassLike(node.parent)) { @@ -153576,7 +153641,7 @@ } function getSymbolScope(symbol) { const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 215 /* FunctionExpression */ || valueDeclaration.kind === 228 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 216 /* FunctionExpression */ || valueDeclaration.kind === 229 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -153585,7 +153650,7 @@ if (flags & (4 /* Property */ | 8192 /* Method */)) { const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { - return getAncestor(privateDeclaration, 260 /* ClassDeclaration */); + return getAncestor(privateDeclaration, 261 /* ClassDeclaration */); } return void 0; } @@ -153602,7 +153667,7 @@ if (scope && scope !== container) { return void 0; } - if (!container || container.kind === 308 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 309 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { return void 0; } scope = container; @@ -153726,7 +153791,7 @@ } case 8 /* NumericLiteral */: return isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === searchSymbolName.length; - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return "default".length === searchSymbolName.length; default: return false; @@ -153896,7 +153961,7 @@ } function addReference(referenceLocation, relatedSymbol, state) { const { kind, symbol } = "kind" in relatedSymbol ? relatedSymbol : { kind: void 0, symbol: relatedSymbol }; - if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 88 /* DefaultKeyword */) { + if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 89 /* DefaultKeyword */) { return; } const addRef = state.referenceAdder(symbol); @@ -153912,7 +153977,7 @@ } const pusher = () => state.referenceAdder(search.symbol); if (isClassLike(referenceLocation.parent)) { - Debug.assert(referenceLocation.kind === 88 /* DefaultKeyword */ || referenceLocation.parent.name === referenceLocation); + Debug.assert(referenceLocation.kind === 89 /* DefaultKeyword */ || referenceLocation.parent.name === referenceLocation); findOwnConstructorReferences(search.symbol, sourceFile, pusher()); } else { const classExtending = tryGetClassByExtendingIdentifier(referenceLocation); @@ -153935,7 +154000,7 @@ } if (member.body) { member.body.forEachChild(function cb(node) { - if (node.kind === 108 /* ThisKeyword */) { + if (node.kind === 109 /* ThisKeyword */) { addRef(node); } else if (!isFunctionLike(node) && !isClassLike(node)) { node.forEachChild(cb); @@ -153948,18 +154013,18 @@ const constructorSymbol = getClassConstructorSymbol(classSymbol); if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { - const ctrKeyword = findChildOfKind(decl, 135 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 173 /* Constructor */ && !!ctrKeyword); + const ctrKeyword = findChildOfKind(decl, 136 /* ConstructorKeyword */, sourceFile); + Debug.assert(decl.kind === 174 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } } if (classSymbol.exports) { classSymbol.exports.forEach((member) => { const decl = member.valueDeclaration; - if (decl && decl.kind === 171 /* MethodDeclaration */) { + if (decl && decl.kind === 172 /* MethodDeclaration */) { const body = decl.body; if (body) { - forEachDescendantOfKind(body, 108 /* ThisKeyword */, (thisKeyword) => { + forEachDescendantOfKind(body, 109 /* ThisKeyword */, (thisKeyword) => { if (isNewExpressionTarget(thisKeyword)) { addNode(thisKeyword); } @@ -153978,10 +154043,10 @@ return; } for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 173 /* Constructor */); + Debug.assert(decl.kind === 174 /* Constructor */); const body = decl.body; if (body) { - forEachDescendantOfKind(body, 106 /* SuperKeyword */, (node) => { + forEachDescendantOfKind(body, 107 /* SuperKeyword */, (node) => { if (isCallExpressionTarget(node)) { addNode(node); } @@ -154013,7 +154078,7 @@ if (refNode.kind !== 79 /* Identifier */) { return; } - if (refNode.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 301 /* ShorthandPropertyAssignment */) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); } const containingClass = getContainingClassIfInHeritageClause(refNode); @@ -154028,7 +154093,7 @@ addIfImplementation(typeHavingNode.initializer); } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { const body = typeHavingNode.body; - if (body.kind === 238 /* Block */) { + if (body.kind === 239 /* Block */) { forEachReturnStatement(body, (returnStatement) => { if (returnStatement.expression) addIfImplementation(returnStatement.expression); @@ -154050,13 +154115,13 @@ } function isImplementationExpression(node) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 206 /* ArrayLiteralExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 207 /* ArrayLiteralExpression */: return true; default: return false; @@ -154090,13 +154155,13 @@ } let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -154105,7 +154170,7 @@ } const sourceFile = searchSpaceNode.getSourceFile(); const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, "super", searchSpaceNode), (node) => { - if (node.kind !== 106 /* SuperKeyword */) { + if (node.kind !== 107 /* SuperKeyword */) { return; } const container = getSuperContainer( @@ -154118,7 +154183,7 @@ return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; } function isParameterName(node) { - return node.kind === 79 /* Identifier */ && node.parent.kind === 166 /* Parameter */ && node.parent.name === node; + return node.kind === 79 /* Identifier */ && node.parent.kind === 167 /* Parameter */ && node.parent.name === node; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { let searchSpaceNode = getThisContainer( @@ -154130,32 +154195,32 @@ ); let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: if (isObjectLiteralMethod(searchSpaceNode)) { staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; } - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 308 /* SourceFile */: + case 309 /* SourceFile */: if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { return void 0; } - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: break; default: return void 0; } - const references = flatMap(searchSpaceNode.kind === 308 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { + const references = flatMap(searchSpaceNode.kind === 309 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { cancellationToken.throwIfCancellationRequested(); return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { if (!isThis(node)) { @@ -154171,18 +154236,18 @@ if (!canHaveSymbol(container)) return false; switch (searchSpaceNode.kind) { - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return searchSpaceNode.symbol === container.symbol; - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 228 /* ClassExpression */: - case 260 /* ClassDeclaration */: - case 207 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 208 /* ObjectLiteralExpression */: return container.parent && canHaveSymbol(container.parent) && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 308 /* SourceFile */: - return container.kind === 308 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); + case 309 /* SourceFile */: + return container.kind === 309 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); } }); }).map((n) => nodeEntry(n)); @@ -154306,7 +154371,7 @@ Debug.assert(paramProps.length === 2 && !!(paramProps[0].flags & 1 /* FunctionScopedVariable */) && !!(paramProps[1].flags & 4 /* Property */)); return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } - const exportSpecifier = getDeclarationOfKind(symbol, 278 /* ExportSpecifier */); + const exportSpecifier = getDeclarationOfKind(symbol, 279 /* ExportSpecifier */); if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); if (localSymbol) { @@ -154347,7 +154412,7 @@ ) || (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */) && allowBaseTypes(rootSymbol) ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, (base) => cbSymbol(sym, rootSymbol, base, kind)) : void 0)); } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol2, checker2) { - const bindingElement = getDeclarationOfKind(symbol2, 205 /* BindingElement */); + const bindingElement = getDeclarationOfKind(symbol2, 206 /* BindingElement */); if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { return getPropertySymbolFromBindingElement(checker2, bindingElement); } @@ -154500,7 +154565,7 @@ } const { parent: parent2 } = node; const typeChecker = program.getTypeChecker(); - if (node.kind === 161 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { + if (node.kind === 162 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { return getDefinitionFromOverriddenMember(typeChecker, node) || emptyArray; } if (isJumpStatementTarget(node)) { @@ -154514,16 +154579,16 @@ void 0 )] : void 0; } - if (node.kind === 105 /* ReturnKeyword */) { + if (node.kind === 106 /* ReturnKeyword */) { const functionDeclaration = findAncestor(node.parent, (n) => isClassStaticBlockDeclaration(n) ? "quit" : isFunctionLikeDeclaration(n)); return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; } - if (node.kind === 133 /* AwaitKeyword */) { + if (node.kind === 134 /* AwaitKeyword */) { const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n)); - const isAsyncFunction2 = functionDeclaration && some(functionDeclaration.modifiers, (node2) => node2.kind === 132 /* AsyncKeyword */); + const isAsyncFunction2 = functionDeclaration && some(functionDeclaration.modifiers, (node2) => node2.kind === 133 /* AsyncKeyword */); return isAsyncFunction2 ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; } - if (node.kind === 125 /* YieldKeyword */) { + if (node.kind === 126 /* YieldKeyword */) { const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n)); const isGeneratorFunction = functionDeclaration && functionDeclaration.asteriskToken; return isGeneratorFunction ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; @@ -154588,10 +154653,10 @@ return [sigInfo]; } else { const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, calledDeclaration) || emptyArray; - return node.kind === 106 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; + return node.kind === 107 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; } } - if (node.parent.kind === 300 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 301 /* ShorthandPropertyAssignment */) { const shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo( decl, @@ -154766,7 +154831,7 @@ if (node.parent === declaration) { return true; } - if (declaration.kind === 271 /* NamespaceImport */) { + if (declaration.kind === 272 /* NamespaceImport */) { return false; } return true; @@ -154797,7 +154862,7 @@ failedAliasResolution )); function getConstructSignatureDefinition() { - if (symbol.flags & 32 /* Class */ && !(symbol.flags & (16 /* Function */ | 3 /* Variable */)) && (isNewExpressionTarget(node) || node.kind === 135 /* ConstructorKeyword */)) { + if (symbol.flags & 32 /* Class */ && !(symbol.flags & (16 /* Function */ | 3 /* Variable */)) && (isNewExpressionTarget(node) || node.kind === 136 /* ConstructorKeyword */)) { const cls = find(filteredDeclarations, isClassLike) || Debug.fail("Expected declaration to have at least one class-like declaration"); return getSignatureDefinition( cls.members, @@ -154869,19 +154934,19 @@ if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent); switch (declaration.kind) { - case 169 /* PropertyDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 171 /* MethodDeclaration */: + case 170 /* PropertyDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 172 /* MethodDeclaration */: if (hasEffectiveModifier(declaration, 8 /* Private */)) return false; - case 173 /* Constructor */: - case 299 /* PropertyAssignment */: - case 300 /* ShorthandPropertyAssignment */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 216 /* ArrowFunction */: - case 215 /* FunctionExpression */: + case 174 /* Constructor */: + case 300 /* PropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 217 /* ArrowFunction */: + case 216 /* FunctionExpression */: return isDefinitionVisible(checker, declaration.parent); default: return false; @@ -154925,9 +154990,9 @@ } function isConstructorLike(node) { switch (node.kind) { - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: return true; default: return false; @@ -154977,14 +155042,14 @@ return; } switch (node.kind) { - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 216 /* ArrowFunction */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 217 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { @@ -155124,15 +155189,15 @@ } function isHintableLiteral(node) { switch (node.kind) { - case 221 /* PrefixUnaryExpression */: { + case 222 /* PrefixUnaryExpression */: { const operand = node.operand; return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); } - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: return true; case 79 /* Identifier */: { const name = node.escapedText; @@ -155270,8 +155335,8 @@ const parts = []; forEachUnique(declarations, (declaration) => { for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 330 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 349 /* JSDocTypedefTag */ && declaration.kind !== 341 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 349 /* JSDocTypedefTag */ || t.kind === 341 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 344 /* JSDocParameterTag */ || t.kind === 345 /* JSDocReturnTag */)) { + const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 331 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); + if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 350 /* JSDocTypedefTag */ && declaration.kind !== 342 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 350 /* JSDocTypedefTag */ || t.kind === 342 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 345 /* JSDocParameterTag */ || t.kind === 346 /* JSDocReturnTag */)) { continue; } let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; @@ -155290,11 +155355,11 @@ } function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 344 /* JSDocParameterTag */: - case 351 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: + case 352 /* JSDocPropertyTag */: return [declaration]; - case 341 /* JSDocCallbackTag */: - case 349 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return getJSDocCommentsAndTags(declaration); @@ -155304,7 +155369,7 @@ const infos = []; forEachUnique(declarations, (declaration) => { const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 349 /* JSDocTypedefTag */ || t.kind === 341 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 344 /* JSDocParameterTag */ || t.kind === 345 /* JSDocReturnTag */)) { + if (tags.some((t) => t.kind === 350 /* JSDocTypedefTag */ || t.kind === 342 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 345 /* JSDocParameterTag */ || t.kind === 346 /* JSDocReturnTag */)) { return; } for (const tag of tags) { @@ -155319,21 +155384,21 @@ } return flatMap( comment, - (node) => node.kind === 324 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) + (node) => node.kind === 325 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) ); } function getCommentDisplayParts(tag, checker) { const { comment, kind } = tag; const namePart = getTagNameDisplayPart(kind); switch (kind) { - case 352 /* JSDocThrowsTag */: + case 353 /* JSDocThrowsTag */: const typeExpression = tag.typeExpression; return typeExpression ? withNode(typeExpression) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return withNode(tag.class); - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return withNode(tag.class); - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: const templateTag = tag; const displayParts = []; if (templateTag.constraint) { @@ -155355,14 +155420,14 @@ displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); } return displayParts; - case 347 /* JSDocTypeTag */: - case 353 /* JSDocSatisfiesTag */: + case 348 /* JSDocTypeTag */: + case 354 /* JSDocSatisfiesTag */: return withNode(tag.typeExpression); - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: - case 350 /* JSDocSeeTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: + case 351 /* JSDocSeeTag */: const { name } = tag; return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); default: @@ -155385,14 +155450,14 @@ } function getTagNameDisplayPart(kind) { switch (kind) { - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return parameterNamePart; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return propertyNamePart; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return typeParameterNamePart; - case 349 /* JSDocTypedefTag */: - case 341 /* JSDocCallbackTag */: + case 350 /* JSDocTypedefTag */: + case 342 /* JSDocCallbackTag */: return typeAliasNamePart; default: return textPart; @@ -155517,46 +155582,46 @@ } function getCommentOwnerInfoWorker(commentOwner, options) { switch (commentOwner.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 170 /* MethodSignature */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 171 /* MethodSignature */: + case 217 /* ArrowFunction */: const host = commentOwner; return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 262 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 263 /* TypeAliasDeclaration */: return { commentOwner }; - case 168 /* PropertySignature */: { + case 169 /* PropertySignature */: { const host2 = commentOwner; return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; } - case 240 /* VariableStatement */: { + case 241 /* VariableStatement */: { const varStatement = commentOwner; const varDeclarations = varStatement.declarationList.declarations; const host2 = varDeclarations.length === 1 && varDeclarations[0].initializer ? getRightHandSideOfAssignment(varDeclarations[0].initializer) : void 0; return host2 ? { commentOwner, parameters: host2.parameters, hasReturn: hasReturn(host2, options) } : { commentOwner }; } - case 308 /* SourceFile */: + case 309 /* SourceFile */: return "quit"; - case 264 /* ModuleDeclaration */: - return commentOwner.parent.kind === 264 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 241 /* ExpressionStatement */: + case 265 /* ModuleDeclaration */: + return commentOwner.parent.kind === 265 /* ModuleDeclaration */ ? void 0 : { commentOwner }; + case 242 /* ExpressionStatement */: return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const be = commentOwner; if (getAssignmentDeclarationKind(be) === 0 /* None */) { return "quit"; } return isFunctionLike(be.right) ? { commentOwner, parameters: be.right.parameters, hasReturn: hasReturn(be.right, options) } : { commentOwner }; } - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: const init = commentOwner.initializer; if (init && (isFunctionExpression(init) || isArrowFunction(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; @@ -155567,14 +155632,14 @@ return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock(node.body) && !!forEachReturnStatement(node.body, (n) => n)); } function getRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 214 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 215 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return rightHandSide; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: return find(rightHandSide.members, isConstructorDeclaration); } } @@ -155783,7 +155848,7 @@ const endPos = decl.getStart(); scanner2.setText(sourceFile.text, startPos, endPos - startPos); let numberOfNewLines = 0; - while (scanner2.getTokenPos() < endPos) { + while (scanner2.getTokenStart() < endPos) { const tokenKind = scanner2.scan(); if (tokenKind === 4 /* NewLineTrivia */) { numberOfNewLines++; @@ -156051,11 +156116,11 @@ function getModuleSpecifierExpression(declaration) { var _a2; switch (declaration.kind) { - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return (_a2 = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression; - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return declaration.moduleSpecifier; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return declaration.declarationList.declarations[0].initializer.arguments[0]; } } @@ -156155,19 +156220,19 @@ function getImportKindOrder(s1) { var _a2; switch (s1.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: if (!s1.importClause) return 0; if (s1.importClause.isTypeOnly) return 1; - if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 271 /* NamespaceImport */) + if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 272 /* NamespaceImport */) return 2; if (s1.importClause.name) return 3; return 4; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return 5; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return 6; } } @@ -156349,7 +156414,7 @@ } const lastImport = current - 1; if (lastImport !== firstImport) { - out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 100 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */)); + out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 101 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */)); } } function visitNode3(n2) { @@ -156479,43 +156544,43 @@ } function getOutliningSpanForNode(n, sourceFile) { switch (n.kind) { - case 238 /* Block */: + case 239 /* Block */: if (isFunctionLike(n.parent)) { return functionSpan(n.parent, n, sourceFile); } switch (n.parent.kind) { - case 243 /* DoStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 242 /* IfStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 295 /* CatchClause */: + case 244 /* DoStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 243 /* IfStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 296 /* CatchClause */: return spanForNode(n.parent); - case 255 /* TryStatement */: + case 256 /* TryStatement */: const tryStatement = n.parent; if (tryStatement.tryBlock === n) { return spanForNode(n.parent); } else if (tryStatement.finallyBlock === n) { - const node = findChildOfKind(tryStatement, 96 /* FinallyKeyword */, sourceFile); + const node = findChildOfKind(tryStatement, 97 /* FinallyKeyword */, sourceFile); if (node) return spanForNode(node); } default: return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); } - case 265 /* ModuleBlock */: + case 266 /* ModuleBlock */: return spanForNode(n.parent); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 266 /* CaseBlock */: - case 184 /* TypeLiteral */: - case 203 /* ObjectBindingPattern */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 267 /* CaseBlock */: + case 185 /* TypeLiteral */: + case 204 /* ObjectBindingPattern */: return spanForNode(n); - case 186 /* TupleType */: + case 187 /* TupleType */: return spanForNode( n, /*autoCollapse*/ @@ -156524,24 +156589,24 @@ !isTupleTypeNode(n.parent), 22 /* OpenBracketToken */ ); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return spanForNodeArray(n.statements); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return spanForObjectOrArrayLiteral(n); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return spanForObjectOrArrayLiteral(n, 22 /* OpenBracketToken */); - case 281 /* JsxElement */: + case 282 /* JsxElement */: return spanForJSXElement(n); - case 285 /* JsxFragment */: + case 286 /* JsxFragment */: return spanForJSXFragment(n); - case 282 /* JsxSelfClosingElement */: - case 283 /* JsxOpeningElement */: + case 283 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); - case 225 /* TemplateExpression */: + case 226 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: return spanForTemplateLiteral(n); - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: return spanForNode( n, /*autoCollapse*/ @@ -156550,15 +156615,15 @@ !isBindingElement(n.parent), 22 /* OpenBracketToken */ ); - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return spanForArrowFunction(n); - case 210 /* CallExpression */: + case 211 /* CallExpression */: return spanForCallExpression(n); - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return spanForParenthesizedExpression(n); - case 272 /* NamedImports */: - case 276 /* NamedExports */: - case 296 /* AssertClause */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: + case 297 /* AssertClause */: return spanForNamedImportsOrExportsOrAssertClause(n); } function spanForNamedImportsOrExportsOrAssertClause(node) { @@ -156679,7 +156744,7 @@ node, sourceFile, /*autoCollapse*/ - node.kind !== 216 /* ArrowFunction */ + node.kind !== 217 /* ArrowFunction */ ); } function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { @@ -156761,18 +156826,18 @@ } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 264 /* ModuleDeclaration */: { + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 265 /* ModuleDeclaration */: { const node = exportNode; if (!node.name) return void 0; return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; } - case 240 /* VariableStatement */: { + case 241 /* VariableStatement */: { const vs = exportNode; if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { return void 0; @@ -156783,7 +156848,7 @@ Debug.assert(!wasDefault, "Can't have a default flag here"); return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; } - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const node = exportNode; if (node.isExportEquals) return void 0; @@ -156810,25 +156875,25 @@ factory.createNamedExports([spec]) )); } else { - changes.delete(exportingSourceFile, Debug.checkDefined(findModifier(exportNode, 88 /* DefaultKeyword */), "Should find a default keyword in modifier list")); + changes.delete(exportingSourceFile, Debug.checkDefined(findModifier(exportNode, 89 /* DefaultKeyword */), "Should find a default keyword in modifier list")); } } else { - const exportKeyword = Debug.checkDefined(findModifier(exportNode, 93 /* ExportKeyword */), "Should find an export keyword in modifier list"); + const exportKeyword = Debug.checkDefined(findModifier(exportNode, 94 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(88 /* DefaultKeyword */)); + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(89 /* DefaultKeyword */)); break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: const decl = first(exportNode.declarationList.declarations); if (!ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile) && !decl.type) { changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(decl.initializer, "Initializer was previously known to be present"))); break; } - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 264 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 265 /* ModuleDeclaration */: changes.deleteModifier(exportingSourceFile, exportKeyword); changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); break; @@ -156854,23 +156919,23 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { const { parent: parent2 } = ref; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); break; - case 273 /* ImportSpecifier */: - case 278 /* ExportSpecifier */: { + case 274 /* ImportSpecifier */: + case 279 /* ExportSpecifier */: { const spec = parent2; changes.replaceNode(importingSourceFile, spec, makeImportSpecifier2(exportName, spec.name.text)); break; } - case 270 /* ImportClause */: { + case 271 /* ImportClause */: { const clause = parent2; Debug.assert(clause.name === ref, "Import clause name should match provided ref"); const spec = makeImportSpecifier2(exportName, ref.text); const { namedBindings } = clause; if (!namedBindings) { changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec])); - } else if (namedBindings.kind === 271 /* NamespaceImport */) { + } else if (namedBindings.kind === 272 /* NamespaceImport */) { changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) }); const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1 /* Double */; const newImport = makeImport( @@ -156887,7 +156952,7 @@ } break; } - case 202 /* ImportType */: + case 203 /* ImportType */: const importTypeNode = parent2; changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; @@ -156898,10 +156963,10 @@ function changeNamedToDefaultImport(importingSourceFile, ref, changes) { const parent2 = ref.parent; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); break; - case 273 /* ImportSpecifier */: { + case 274 /* ImportSpecifier */: { const defaultImport = factory.createIdentifier(parent2.name.text); if (parent2.parent.elements.length === 1) { changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); @@ -156911,7 +156976,7 @@ } break; } - case 278 /* ExportSpecifier */: { + case 279 /* ExportSpecifier */: { changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); break; } @@ -157015,7 +157080,7 @@ if (!importClause.namedBindings) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; } - if (importClause.namedBindings.kind === 271 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 272 /* NamespaceImport */) { return { convertTo: 0 /* Named */, import: importClause.namedBindings }; } const shouldUseDefault = getShouldUseDefault(context.program, importClause); @@ -157597,11 +157662,11 @@ } function isPureImport(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return true; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return !hasSyntacticModifier(node, 1 /* Export */); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall( d.initializer, /*checkArgumentIsStringLiteralLike*/ @@ -157645,7 +157710,7 @@ } deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); deleteMovedStatements(oldFile, toMove.ranges, changes); - updateImportsInOtherFiles(changes, program, host, oldFile, usage.movedSymbols, newFilename); + updateImportsInOtherFiles(changes, program, host, oldFile, usage.movedSymbols, newFilename, quotePreference); const imports = getNewFileImportsAndAddExportInOldFile(oldFile, usage.oldImportsNeededByNewFile, usage.newFileImportsFromOldFile, changes, checker, program, host, useEsModuleSyntax, quotePreference); const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromNewFile, useEsModuleSyntax); if (imports.length && body.length) { @@ -157674,7 +157739,7 @@ forEachImportInStatement(statement, (i) => deleteUnusedImports(oldFile, i, changes, (name) => toDelete.has(checker.getSymbolAtLocation(name)))); } } - function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols, newFilename) { + function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols, newFilename, quotePreference) { const checker = program.getTypeChecker(); for (const sourceFile of program.getSourceFiles()) { if (sourceFile === oldFile) @@ -157690,29 +157755,29 @@ deleteUnusedImports(sourceFile, importNode, changes, shouldMove); const pathToNewFileWithExtension = resolvePath(getDirectoryPath(oldFile.path), newFilename); const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.path, pathToNewFileWithExtension, createModuleSpecifierResolutionHost(program, host)); - const newImportDeclaration = filterImport(importNode, factory.createStringLiteral(newModuleSpecifier), shouldMove); + const newImportDeclaration = filterImport(importNode, makeStringLiteral(newModuleSpecifier, quotePreference), shouldMove); if (newImportDeclaration) changes.insertNodeAfter(sourceFile, statement, newImportDeclaration); const ns = getNamespaceLikeImport(importNode); if (ns) - updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, ns, importNode); + updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, ns, importNode, quotePreference); }); } } } function getNamespaceLikeImport(node) { switch (node.kind) { - case 269 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 271 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 272 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; + case 269 /* ImportEqualsDeclaration */: return node.name; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return tryCast(node.name, isIdentifier); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); } } - function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, oldImportId, oldImportNode) { + function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, oldImportId, oldImportNode, quotePreference) { const preferredNewNamespaceName = ts_codefix_exports.moduleSpecifierToValidIdentifier(newModuleSpecifier, 99 /* ESNext */); let needUniqueName = false; const toChange = []; @@ -157735,14 +157800,14 @@ for (const ref of toChange) { changes.replaceNode(sourceFile, ref, factory.createIdentifier(newNamespaceName)); } - changes.insertNodeAfter(sourceFile, oldImportNode, updateNamespaceLikeImportNode(oldImportNode, preferredNewNamespaceName, newModuleSpecifier)); + changes.insertNodeAfter(sourceFile, oldImportNode, updateNamespaceLikeImportNode(oldImportNode, preferredNewNamespaceName, newModuleSpecifier, quotePreference)); } } - function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifier) { + function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifier, quotePreference) { const newNamespaceId = factory.createIdentifier(newNamespaceName); - const newModuleString = factory.createStringLiteral(newModuleSpecifier); + const newModuleString = makeStringLiteral(newModuleSpecifier, quotePreference); switch (node.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: return factory.createImportDeclaration( /*modifiers*/ void 0, @@ -157757,7 +157822,7 @@ /*assertClause*/ void 0 ); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return factory.createImportEqualsDeclaration( /*modifiers*/ void 0, @@ -157766,7 +157831,7 @@ newNamespaceId, factory.createExternalModuleReference(newModuleString) ); - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return factory.createVariableDeclaration( newNamespaceId, /*exclamationToken*/ @@ -157780,7 +157845,7 @@ } } function moduleSpecifierFromImport(i) { - return i.kind === 269 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 268 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; + return i.kind === 270 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 269 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { if (isImportDeclaration(statement)) { @@ -157839,7 +157904,7 @@ factory.createObjectBindingPattern(bindingElements), /*type*/ void 0, - createRequireCall(factory.createStringLiteral(pathToNewFileWithCorrectExtension)) + createRequireCall(makeStringLiteral(pathToNewFileWithCorrectExtension, quotePreference)) ) : void 0; } } @@ -157879,15 +157944,15 @@ } function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { switch (importDecl.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused); break; - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: if (isUnused(importDecl.name)) { changes.delete(sourceFile, importDecl); } break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused); break; default: @@ -157899,7 +157964,7 @@ return; const { name, namedBindings } = importDecl.importClause; const defaultUnused = !name || isUnused(name); - const namedBindingsUnused = !namedBindings || (namedBindings.kind === 271 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); + const namedBindingsUnused = !namedBindings || (namedBindings.kind === 272 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); if (defaultUnused && namedBindingsUnused) { changes.delete(sourceFile, importDecl); } else { @@ -157919,7 +157984,7 @@ void 0 ) ); - } else if (namedBindings.kind === 272 /* NamedImports */) { + } else if (namedBindings.kind === 273 /* NamedImports */) { for (const element of namedBindings.elements) { if (isUnused(element.name)) changes.delete(sourceFile, element); @@ -157947,9 +158012,9 @@ } } break; - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: break; - case 203 /* ObjectBindingPattern */: + case 204 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { changes.delete( sourceFile, @@ -158070,14 +158135,14 @@ } function isInImport(decl) { switch (decl.kind) { - case 268 /* ImportEqualsDeclaration */: - case 273 /* ImportSpecifier */: - case 270 /* ImportClause */: - case 271 /* NamespaceImport */: + case 269 /* ImportEqualsDeclaration */: + case 274 /* ImportSpecifier */: + case 271 /* ImportClause */: + case 272 /* NamespaceImport */: return true; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return isVariableDeclarationInImport(decl); - case 205 /* BindingElement */: + case 206 /* BindingElement */: return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); default: return false; @@ -158092,7 +158157,7 @@ } function filterImport(i, moduleSpecifier, keep) { switch (i.kind) { - case 269 /* ImportDeclaration */: { + case 270 /* ImportDeclaration */: { const clause = i.importClause; if (!clause) return void 0; @@ -158107,9 +158172,9 @@ void 0 ) : void 0; } - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return keep(i.name) ? i : void 0; - case 257 /* VariableDeclaration */: { + case 258 /* VariableDeclaration */: { const name = filterBindingName(i.name, keep); return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; } @@ -158118,7 +158183,7 @@ } } function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 271 /* NamespaceImport */) { + if (namedBindings.kind === 272 /* NamespaceImport */) { return keep(namedBindings.name) ? namedBindings : void 0; } else { const newElements = namedBindings.elements.filter((e) => keep(e.name)); @@ -158129,9 +158194,9 @@ switch (name.kind) { case 79 /* Identifier */: return keep(name) ? name : void 0; - case 204 /* ArrayBindingPattern */: + case 205 /* ArrayBindingPattern */: return name; - case 203 /* ObjectBindingPattern */: { + case 204 /* ObjectBindingPattern */: { const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } @@ -158160,13 +158225,13 @@ } function isNonVariableTopLevelDeclaration(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 269 /* ImportEqualsDeclaration */: return true; default: return false; @@ -158174,17 +158239,17 @@ } function forEachTopLevelDeclaration(statement, cb) { switch (statement.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 269 /* ImportEqualsDeclaration */: return cb(statement); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 241 /* ExpressionStatement */: { + case 242 /* ExpressionStatement */: { const { expression } = statement; return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; } @@ -158194,8 +158259,8 @@ switch (name.kind) { case 79 /* Identifier */: return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 204 /* ArrayBindingPattern */: - case 203 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); default: return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); @@ -158206,9 +158271,9 @@ } function getTopLevelDeclarationStatement(d) { switch (d.kind) { - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: return d.parent.parent; - case 205 /* BindingElement */: + case 206 /* BindingElement */: return getTopLevelDeclarationStatement( cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) ); @@ -158239,26 +158304,26 @@ return useEs6Exports ? [addEs6Export(decl)] : addCommonjsExport(decl); } function addEs6Export(d) { - const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(93 /* ExportKeyword */)], getModifiers(d)) : void 0; + const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(94 /* ExportKeyword */)], getModifiers(d)) : void 0; switch (d.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const decorators = canHaveDecorators(d) ? getDecorators(d) : void 0; return factory.updateClassDeclaration(d, concatenate(decorators, modifiers), d.name, d.typeParameters, d.heritageClauses, d.members); - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 263 /* EnumDeclaration */: + case 264 /* EnumDeclaration */: return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 262 /* TypeAliasDeclaration */: + case 263 /* TypeAliasDeclaration */: return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 261 /* InterfaceDeclaration */: + case 262 /* InterfaceDeclaration */: return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 268 /* ImportEqualsDeclaration */: + case 269 /* ImportEqualsDeclaration */: return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return Debug.fail(); default: return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); @@ -158269,18 +158334,18 @@ } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { - case 259 /* FunctionDeclaration */: - case 260 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: return [decl.name.text]; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 261 /* InterfaceDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 262 /* InterfaceDeclaration */: + case 269 /* ImportEqualsDeclaration */: return emptyArray; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: return Debug.fail("Can't export an ExpressionStatement"); default: return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); @@ -158384,7 +158449,7 @@ const lastDeclaration = signatureDecls[signatureDecls.length - 1]; let updated = lastDeclaration; switch (lastDeclaration.kind) { - case 170 /* MethodSignature */: { + case 171 /* MethodSignature */: { updated = factory.updateMethodSignature( lastDeclaration, lastDeclaration.modifiers, @@ -158396,7 +158461,7 @@ ); break; } - case 171 /* MethodDeclaration */: { + case 172 /* MethodDeclaration */: { updated = factory.updateMethodDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -158410,7 +158475,7 @@ ); break; } - case 176 /* CallSignature */: { + case 177 /* CallSignature */: { updated = factory.updateCallSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -158419,7 +158484,7 @@ ); break; } - case 173 /* Constructor */: { + case 174 /* Constructor */: { updated = factory.updateConstructorDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -158428,7 +158493,7 @@ ); break; } - case 177 /* ConstructSignature */: { + case 178 /* ConstructSignature */: { updated = factory.updateConstructSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -158437,7 +158502,7 @@ ); break; } - case 259 /* FunctionDeclaration */: { + case 260 /* FunctionDeclaration */: { updated = factory.updateFunctionDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -158487,7 +158552,7 @@ p.dotDotDotToken, p.name, p.questionToken, - p.type || factory.createKeywordTypeNode(131 /* AnyKeyword */) + p.type || factory.createKeywordTypeNode(132 /* AnyKeyword */) ), p); const parameterDocComment = p.symbol && p.symbol.getDocumentationComment(checker); if (parameterDocComment) { @@ -158510,12 +158575,12 @@ } function isConvertableSignatureDeclaration(d) { switch (d.kind) { - case 170 /* MethodSignature */: - case 171 /* MethodDeclaration */: - case 176 /* CallSignature */: - case 173 /* Constructor */: - case 177 /* ConstructSignature */: - case 259 /* FunctionDeclaration */: + case 171 /* MethodSignature */: + case 172 /* MethodDeclaration */: + case 177 /* CallSignature */: + case 174 /* Constructor */: + case 178 /* ConstructSignature */: + case 260 /* FunctionDeclaration */: return true; } return false; @@ -159169,14 +159234,14 @@ const functionReference = entry.node; const parent2 = functionReference.parent; switch (parent2.kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); if (callOrNewExpression && callOrNewExpression.expression === functionReference) { return callOrNewExpression; } break; - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); @@ -159185,7 +159250,7 @@ } } break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); @@ -159203,13 +159268,13 @@ const reference = entry.node; const parent2 = reference.parent; switch (parent2.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; @@ -159251,22 +159316,22 @@ if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false; switch (functionDeclaration.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: if (isObjectLiteralExpression(functionDeclaration.parent)) { const contextualSymbol = getSymbolForContextualType(functionDeclaration.name, checker); return ((_a2 = contextualSymbol == null ? void 0 : contextualSymbol.declarations) == null ? void 0 : _a2.length) === 1 && isSingleImplementation(functionDeclaration, checker); } return isSingleImplementation(functionDeclaration, checker); - case 173 /* Constructor */: + case 174 /* Constructor */: if (isClassDeclaration(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); } - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return isValidVariableDeclaration(functionDeclaration.parent); } return false; @@ -159276,7 +159341,7 @@ } function hasNameOrDefault(functionOrClassDeclaration) { if (!functionOrClassDeclaration.name) { - const defaultKeyword = findModifier(functionOrClassDeclaration, 88 /* DefaultKeyword */); + const defaultKeyword = findModifier(functionOrClassDeclaration, 89 /* DefaultKeyword */); return !!defaultKeyword; } return true; @@ -159443,16 +159508,16 @@ } function getClassNames(constructorDeclaration) { switch (constructorDeclaration.parent.kind) { - case 260 /* ClassDeclaration */: + case 261 /* ClassDeclaration */: const classDeclaration = constructorDeclaration.parent; if (classDeclaration.name) return [classDeclaration.name]; const defaultModifier = Debug.checkDefined( - findModifier(classDeclaration, 88 /* DefaultKeyword */), + findModifier(classDeclaration, 89 /* DefaultKeyword */), "Nameless class declaration should be a default export" ); return [defaultModifier]; - case 228 /* ClassExpression */: + case 229 /* ClassExpression */: const classExpression = constructorDeclaration.parent; const variableDeclaration = constructorDeclaration.parent.parent; const className = classExpression.name; @@ -159463,29 +159528,29 @@ } function getFunctionNames(functionDeclaration) { switch (functionDeclaration.kind) { - case 259 /* FunctionDeclaration */: + case 260 /* FunctionDeclaration */: if (functionDeclaration.name) return [functionDeclaration.name]; const defaultModifier = Debug.checkDefined( - findModifier(functionDeclaration, 88 /* DefaultKeyword */), + findModifier(functionDeclaration, 89 /* DefaultKeyword */), "Nameless function declaration should be a default export" ); return [defaultModifier]; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return [functionDeclaration.name]; - case 173 /* Constructor */: + case 174 /* Constructor */: const ctrKeyword = Debug.checkDefined( - findChildOfKind(functionDeclaration, 135 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), + findChildOfKind(functionDeclaration, 136 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword" ); - if (functionDeclaration.parent.kind === 228 /* ClassExpression */) { + if (functionDeclaration.parent.kind === 229 /* ClassExpression */) { const variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; } return [ctrKeyword]; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return [functionDeclaration.parent.name]; - case 215 /* FunctionExpression */: + case 216 /* FunctionExpression */: if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name]; return [functionDeclaration.parent.name]; @@ -159583,11 +159648,11 @@ function getParentBinaryExpression(expr) { const container = findAncestor(expr.parent, (n) => { switch (n.kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return false; - case 225 /* TemplateExpression */: - case 223 /* BinaryExpression */: + case 226 /* TemplateExpression */: + case 224 /* BinaryExpression */: return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; @@ -160210,18 +160275,18 @@ function checkForStaticContext(nodeToCheck, containingClass) { let current = nodeToCheck; while (current !== containingClass) { - if (current.kind === 169 /* PropertyDeclaration */) { + if (current.kind === 170 /* PropertyDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 166 /* Parameter */) { + } else if (current.kind === 167 /* Parameter */) { const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 173 /* Constructor */) { + if (ctorOrMethod.kind === 174 /* Constructor */) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 171 /* MethodDeclaration */) { + } else if (current.kind === 172 /* MethodDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } @@ -160261,7 +160326,7 @@ /*includeClassComputedPropertyName*/ false ); - if (container.kind === 259 /* FunctionDeclaration */ || container.kind === 171 /* MethodDeclaration */ && container.parent.kind === 207 /* ObjectLiteralExpression */ || container.kind === 215 /* FunctionExpression */) { + if (container.kind === 260 /* FunctionDeclaration */ || container.kind === 172 /* MethodDeclaration */ && container.parent.kind === 208 /* ObjectLiteralExpression */ || container.kind === 216 /* FunctionExpression */) { rangeFacts |= 16 /* UsesThisInFunction */; } } @@ -160271,21 +160336,21 @@ return true; } if (isDeclaration(node2)) { - const declaringNode = node2.kind === 257 /* VariableDeclaration */ ? node2.parent.parent : node2; + const declaringNode = node2.kind === 258 /* VariableDeclaration */ ? node2.parent.parent : node2; if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } } switch (node2.kind) { - case 269 /* ImportDeclaration */: + case 270 /* ImportDeclaration */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); return true; - case 274 /* ExportAssignment */: + case 275 /* ExportAssignment */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; - case 106 /* SuperKeyword */: - if (node2.parent.kind === 210 /* CallExpression */) { + case 107 /* SuperKeyword */: + if (node2.parent.kind === 211 /* CallExpression */) { const containingClass2 = getContainingClass(node2); if (containingClass2 === void 0 || containingClass2.pos < span.start || containingClass2.end >= span.start + span.length) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractSuper)); @@ -160296,7 +160361,7 @@ thisNode = node2; } break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: forEachChild(node2, function check(n) { if (isThis(n)) { rangeFacts |= 8 /* UsesThis */; @@ -160307,34 +160372,34 @@ forEachChild(n, check); } }); - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); } - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return false; } const savedPermittedJumps = permittedJumps; switch (node2.kind) { - case 242 /* IfStatement */: + case 243 /* IfStatement */: permittedJumps &= ~4 /* Return */; break; - case 255 /* TryStatement */: + case 256 /* TryStatement */: permittedJumps = 0 /* None */; break; - case 238 /* Block */: - if (node2.parent && node2.parent.kind === 255 /* TryStatement */ && node2.parent.finallyBlock === node2) { + case 239 /* Block */: + if (node2.parent && node2.parent.kind === 256 /* TryStatement */ && node2.parent.finallyBlock === node2) { permittedJumps = 4 /* Return */; } break; - case 293 /* DefaultClause */: - case 292 /* CaseClause */: + case 294 /* DefaultClause */: + case 293 /* CaseClause */: permittedJumps |= 1 /* Break */; break; default: @@ -160348,39 +160413,39 @@ break; } switch (node2.kind) { - case 194 /* ThisType */: - case 108 /* ThisKeyword */: + case 195 /* ThisType */: + case 109 /* ThisKeyword */: rangeFacts |= 8 /* UsesThis */; thisNode = node2; break; - case 253 /* LabeledStatement */: { + case 254 /* LabeledStatement */: { const label = node2.label; (seenLabels || (seenLabels = [])).push(label.escapedText); forEachChild(node2, visit); seenLabels.pop(); break; } - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: { + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: { const label = node2.label; if (label) { if (!contains(seenLabels, label.escapedText)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { - if (!(permittedJumps & (node2.kind === 249 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { + if (!(permittedJumps & (node2.kind === 250 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; } - case 220 /* AwaitExpression */: + case 221 /* AwaitExpression */: rangeFacts |= 4 /* IsAsyncFunction */; break; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: rangeFacts |= 2 /* IsGenerator */; break; - case 250 /* ReturnStatement */: + case 251 /* ReturnStatement */: if (permittedJumps & 4 /* Return */) { rangeFacts |= 1 /* HasReturn */; } else { @@ -160430,12 +160495,12 @@ const scopes = []; while (true) { current = current.parent; - if (current.kind === 166 /* Parameter */) { + if (current.kind === 167 /* Parameter */) { current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; } if (isScope(current)) { scopes.push(current); - if (current.kind === 308 /* SourceFile */) { + if (current.kind === 309 /* SourceFile */) { return scopes; } } @@ -160511,28 +160576,28 @@ } function getDescriptionForFunctionLikeDeclaration(scope) { switch (scope.kind) { - case 173 /* Constructor */: + case 174 /* Constructor */: return "constructor"; - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return "arrow function"; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: return `method '${scope.name.getText()}'`; - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return `'get ${scope.name.getText()}'`; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: return `'set ${scope.name.getText()}'`; default: throw Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); } } function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 260 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; + return scope.kind === 261 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; } function getDescriptionForModuleLikeDeclaration(scope) { - return scope.kind === 265 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; + return scope.kind === 266 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; } function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParameterUsages, substitutions }, exposedVariableDeclarations, range, context) { const checker = context.program.getTypeChecker(); @@ -160587,12 +160652,12 @@ let newFunction; const callThis = !!(range.facts & 16 /* UsesThisInFunction */); if (isClassLike(scope)) { - const modifiers = isJS ? [] : [factory.createModifier(121 /* PrivateKeyword */)]; + const modifiers = isJS ? [] : [factory.createModifier(122 /* PrivateKeyword */)]; if (range.facts & 32 /* InStaticRegion */) { - modifiers.push(factory.createModifier(124 /* StaticKeyword */)); + modifiers.push(factory.createModifier(125 /* StaticKeyword */)); } if (range.facts & 4 /* IsAsyncFunction */) { - modifiers.push(factory.createModifier(132 /* AsyncKeyword */)); + modifiers.push(factory.createModifier(133 /* AsyncKeyword */)); } newFunction = factory.createMethodDeclaration( modifiers.length ? modifiers : void 0, @@ -160628,7 +160693,7 @@ ); } newFunction = factory.createFunctionDeclaration( - range.facts & 4 /* IsAsyncFunction */ ? [factory.createToken(132 /* AsyncKeyword */)] : void 0, + range.facts & 4 /* IsAsyncFunction */ ? [factory.createToken(133 /* AsyncKeyword */)] : void 0, range.facts & 2 /* IsGenerator */ ? factory.createToken(41 /* AsteriskToken */) : void 0, functionName, typeParameters, @@ -160840,7 +160905,7 @@ while (isParenthesizedTypeNode(withoutParens)) { withoutParens = withoutParens.type; } - return isUnionTypeNode(withoutParens) && find(withoutParens.types, (t) => t.kind === 155 /* UndefinedKeyword */) ? clone2 : factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]); + return isUnionTypeNode(withoutParens) && find(withoutParens.types, (t) => t.kind === 156 /* UndefinedKeyword */) ? clone2 : factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(156 /* UndefinedKeyword */)]); } } function extractConstantInScope(node, scope, { substitutions }, rangeFacts, context) { @@ -160862,11 +160927,11 @@ if (isClassLike(scope)) { Debug.assert(!isJS, "Cannot extract to a JS class"); const modifiers = []; - modifiers.push(factory.createModifier(121 /* PrivateKeyword */)); + modifiers.push(factory.createModifier(122 /* PrivateKeyword */)); if (rangeFacts & 32 /* InStaticRegion */) { - modifiers.push(factory.createModifier(124 /* StaticKeyword */)); + modifiers.push(factory.createModifier(125 /* StaticKeyword */)); } - modifiers.push(factory.createModifier(146 /* ReadonlyKeyword */)); + modifiers.push(factory.createModifier(147 /* ReadonlyKeyword */)); const newVariable = factory.createPropertyDeclaration( modifiers, localNameText, @@ -160909,7 +160974,7 @@ changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); const localReference = factory.createIdentifier(localNameText); changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 241 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { + } else if (node.parent.kind === 242 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { const newVariableStatement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -160939,7 +161004,7 @@ false ); } - if (node.parent.kind === 241 /* ExpressionStatement */) { + if (node.parent.kind === 242 /* ExpressionStatement */) { changeTracker.delete(context.file, node.parent); } else { let localReference = factory.createIdentifier(localNameText); @@ -161491,27 +161556,27 @@ function isExtractableExpression(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 302 /* EnumMember */: + case 303 /* EnumMember */: return false; } switch (node.kind) { case 10 /* StringLiteral */: - return parent2.kind !== 269 /* ImportDeclaration */ && parent2.kind !== 273 /* ImportSpecifier */; - case 227 /* SpreadElement */: - case 203 /* ObjectBindingPattern */: - case 205 /* BindingElement */: + return parent2.kind !== 270 /* ImportDeclaration */ && parent2.kind !== 274 /* ImportSpecifier */; + case 228 /* SpreadElement */: + case 204 /* ObjectBindingPattern */: + case 206 /* BindingElement */: return false; case 79 /* Identifier */: - return parent2.kind !== 205 /* BindingElement */ && parent2.kind !== 273 /* ImportSpecifier */ && parent2.kind !== 278 /* ExportSpecifier */; + return parent2.kind !== 206 /* BindingElement */ && parent2.kind !== 274 /* ImportSpecifier */ && parent2.kind !== 279 /* ExportSpecifier */; } return true; } function isBlockLike(node) { switch (node.kind) { - case 238 /* Block */: - case 308 /* SourceFile */: - case 265 /* ModuleBlock */: - case 292 /* CaseClause */: + case 239 /* Block */: + case 309 /* SourceFile */: + case 266 /* ModuleBlock */: + case 293 /* CaseClause */: return true; default: return false; @@ -161737,10 +161802,10 @@ } function isConvertibleDeclaration(node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: return true; default: return false; @@ -161868,7 +161933,7 @@ return getRenameInfoError(wouldRenameNodeModules); } const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 164 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; + const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 165 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; const displayName = specifierName || typeChecker.symbolToString(symbol); const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol); return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), node, sourceFile); @@ -161968,7 +162033,7 @@ case 80 /* PrivateIdentifier */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: return true; case 8 /* NumericLiteral */: return isLiteralNameOfPropertyDeclarationOrIndexAccess(node); @@ -162154,10 +162219,10 @@ ); } return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 212 /* TaggedTemplateExpression */) { + } else if (isTemplateHead(node) && parent2.parent.kind === 213 /* TaggedTemplateExpression */) { const templateExpression = parent2; const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 225 /* TemplateExpression */); + Debug.assert(templateExpression.kind === 226 /* TemplateExpression */); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { @@ -162224,17 +162289,17 @@ return void 0; const { parent: parent2 } = startingToken; switch (parent2.kind) { - case 214 /* ParenthesizedExpression */: - case 171 /* MethodDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 215 /* ParenthesizedExpression */: + case 172 /* MethodDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: const info = getArgumentOrParameterListInfo(startingToken, position, sourceFile); if (!info) return void 0; const { argumentIndex, argumentCount, argumentsSpan } = info; const contextualType = isMethodDeclaration(parent2) ? checker.getContextualTypeForObjectLiteralElement(parent2) : checker.getContextualType(parent2); return contextualType && { contextualType, argumentIndex, argumentCount, argumentsSpan }; - case 223 /* BinaryExpression */: { + case 224 /* BinaryExpression */: { const highestBinary = getHighestBinary(parent2); const contextualType2 = checker.getContextualType(highestBinary); const argumentIndex2 = startingToken.kind === 20 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; @@ -162308,7 +162373,7 @@ const template = taggedTemplate.template; const applicableSpanStart = template.getStart(); let applicableSpanEnd = template.getEnd(); - if (template.kind === 225 /* TemplateExpression */) { + if (template.kind === 226 /* TemplateExpression */) { const lastSpan = last(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia( @@ -162618,10 +162683,10 @@ const closeBraceToken = Debug.checkDefined(children.pop()); Debug.assertEqual(openBraceToken.kind, 18 /* OpenBraceToken */); Debug.assertEqual(closeBraceToken.kind, 19 /* CloseBraceToken */); - const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 146 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 57 /* QuestionToken */); + const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 147 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 57 /* QuestionToken */); const groupedWithBrackets = groupChildren( groupedWithPlusMinusTokens, - ({ kind }) => kind === 22 /* OpenBracketToken */ || kind === 165 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ + ({ kind }) => kind === 22 /* OpenBracketToken */ || kind === 166 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ ); return [ openBraceToken, @@ -162632,7 +162697,7 @@ } if (isPropertySignature(node)) { const children = groupChildren(node.getChildren(), (child) => child === node.name || contains(node.modifiers, child)); - const firstJSDocChild = ((_a2 = children[0]) == null ? void 0 : _a2.kind) === 323 /* JSDoc */ ? children[0] : void 0; + const firstJSDocChild = ((_a2 = children[0]) == null ? void 0 : _a2.kind) === 324 /* JSDoc */ ? children[0] : void 0; const withJSDocSeparated = firstJSDocChild ? children.slice(1) : children; const splittedChildren = splitChildren(withJSDocSeparated, ({ kind }) => kind === 58 /* ColonToken */); return firstJSDocChild ? [firstJSDocChild, createSyntaxList2(splittedChildren)] : splittedChildren; @@ -162693,19 +162758,19 @@ } function isListOpener(token) { const kind = token && token.kind; - return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 283 /* JsxOpeningElement */; + return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 284 /* JsxOpeningElement */; } function isListCloser(token) { const kind = token && token.kind; - return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 284 /* JsxClosingElement */; + return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 285 /* JsxClosingElement */; } function getEndPos(sourceFile, node) { switch (node.kind) { - case 344 /* JSDocParameterTag */: - case 341 /* JSDocCallbackTag */: - case 351 /* JSDocPropertyTag */: - case 349 /* JSDocTypedefTag */: - case 346 /* JSDocThisTag */: + case 345 /* JSDocParameterTag */: + case 342 /* JSDocCallbackTag */: + case 352 /* JSDocPropertyTag */: + case 350 /* JSDocTypedefTag */: + case 347 /* JSDocThisTag */: return sourceFile.getLineEndOfPosition(node.getStart()); default: return node.getEnd(); @@ -162740,7 +162805,7 @@ } const flags = getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 228 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; + return getDeclarationOfKind(symbol, 229 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; } if (flags & 384 /* Enum */) return "enum" /* enumElement */; @@ -162769,7 +162834,7 @@ if (typeChecker.isArgumentsSymbol(symbol)) { return "local var" /* localVariableElement */; } - if (location.kind === 108 /* ThisKeyword */ && isExpression(location) || isThisInTypeQuery(location)) { + if (location.kind === 109 /* ThisKeyword */ && isExpression(location) || isThisInTypeQuery(location)) { return "parameter" /* parameterElement */; } const flags = getCombinedLocalAndExportSymbolFlags(symbol); @@ -162853,26 +162918,26 @@ const symbolFlags = getCombinedLocalAndExportSymbolFlags(symbol); let symbolKind = semanticMeaning & 1 /* Value */ ? getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) : "" /* unknown */; let hasAddedSymbolInfo = false; - const isThisExpression = location.kind === 108 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location); + const isThisExpression = location.kind === 109 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location); let type; let documentationFromAlias; let tagsFromAlias; let hasMultipleSignatures = false; - if (location.kind === 108 /* ThisKeyword */ && !isThisExpression) { - return { displayParts: [keywordPart(108 /* ThisKeyword */)], documentation: [], symbolKind: "primitive type" /* primitiveType */, tags: void 0 }; + if (location.kind === 109 /* ThisKeyword */ && !isThisExpression) { + return { displayParts: [keywordPart(109 /* ThisKeyword */)], documentation: [], symbolKind: "primitive type" /* primitiveType */, tags: void 0 }; } if (symbolKind !== "" /* unknown */ || symbolFlags & 32 /* Class */ || symbolFlags & 2097152 /* Alias */) { if (symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */) { const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location); if (declaration) { switch (declaration.kind) { - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: symbolKind = "getter" /* memberGetAccessorElement */; break; - case 175 /* SetAccessor */: + case 176 /* SetAccessor */: symbolKind = "setter" /* memberSetAccessorElement */; break; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: symbolKind = "accessor" /* memberAccessorVariableElement */; break; default: @@ -162884,7 +162949,7 @@ } let signature; type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (location.parent && location.parent.kind === 208 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 209 /* PropertyAccessExpression */) { const right = location.parent.name; if (right === location || right && right.getFullWidth() === 0) { location = location.parent; @@ -162900,7 +162965,7 @@ } if (callExpressionLike) { signature = typeChecker.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 211 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 106 /* SuperKeyword */; + const useConstructSignatures = callExpressionLike.kind === 212 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 107 /* SuperKeyword */; const allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (signature && !contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : void 0; @@ -162915,10 +162980,10 @@ displayParts.push(spacePart()); if (useConstructSignatures) { if (signature.flags & 4 /* Abstract */) { - displayParts.push(keywordPart(126 /* AbstractKeyword */)); + displayParts.push(keywordPart(127 /* AbstractKeyword */)); displayParts.push(spacePart()); } - displayParts.push(keywordPart(103 /* NewKeyword */)); + displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); } addFullSymbolName(symbol); @@ -162948,10 +163013,10 @@ } if (useConstructSignatures) { if (signature.flags & 4 /* Abstract */) { - displayParts.push(keywordPart(126 /* AbstractKeyword */)); + displayParts.push(keywordPart(127 /* AbstractKeyword */)); displayParts.push(spacePart()); } - displayParts.push(keywordPart(103 /* NewKeyword */)); + displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); } addSignatureDisplayParts(signature, allSignatures, 262144 /* WriteArrowStyleSignature */); @@ -162963,21 +163028,21 @@ hasMultipleSignatures = allSignatures.length > 1; } } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || // name of function declaration - location.kind === 135 /* ConstructorKeyword */ && location.parent.kind === 173 /* Constructor */) { + location.kind === 136 /* ConstructorKeyword */ && location.parent.kind === 174 /* Constructor */) { const functionDeclaration = location.parent; - const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 135 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); + const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 136 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 173 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + const allSignatures = functionDeclaration.kind === 174 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 173 /* Constructor */) { + if (functionDeclaration.kind === 174 /* Constructor */) { symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 176 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 177 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -162989,10 +163054,10 @@ } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 228 /* ClassExpression */)) { + if (getDeclarationOfKind(symbol, 229 /* ClassExpression */)) { pushSymbolKind("local class" /* localClassElement */); } else { - displayParts.push(keywordPart(84 /* ClassKeyword */)); + displayParts.push(keywordPart(85 /* ClassKeyword */)); } displayParts.push(spacePart()); addFullSymbolName(symbol); @@ -163000,14 +163065,14 @@ } if (symbolFlags & 64 /* Interface */ && semanticMeaning & 2 /* Type */) { prefixNextMeaning(); - displayParts.push(keywordPart(118 /* InterfaceKeyword */)); + displayParts.push(keywordPart(119 /* InterfaceKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 524288 /* TypeAlias */ && semanticMeaning & 2 /* Type */) { prefixNextMeaning(); - displayParts.push(keywordPart(154 /* TypeKeyword */)); + displayParts.push(keywordPart(155 /* TypeKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); @@ -163019,18 +163084,18 @@ if (symbolFlags & 384 /* Enum */) { prefixNextMeaning(); if (some(symbol.declarations, (d) => isEnumDeclaration(d) && isEnumConst(d))) { - displayParts.push(keywordPart(85 /* ConstKeyword */)); + displayParts.push(keywordPart(86 /* ConstKeyword */)); displayParts.push(spacePart()); } - displayParts.push(keywordPart(92 /* EnumKeyword */)); + displayParts.push(keywordPart(93 /* EnumKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); } if (symbolFlags & 1536 /* Module */ && !isThisExpression) { prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 264 /* ModuleDeclaration */); + const declaration = getDeclarationOfKind(symbol, 265 /* ModuleDeclaration */); const isNamespace = declaration && declaration.name && declaration.name.kind === 79 /* Identifier */; - displayParts.push(keywordPart(isNamespace ? 143 /* NamespaceKeyword */ : 142 /* ModuleKeyword */)); + displayParts.push(keywordPart(isNamespace ? 144 /* NamespaceKeyword */ : 143 /* ModuleKeyword */)); displayParts.push(spacePart()); addFullSymbolName(symbol); } @@ -163046,7 +163111,7 @@ addFullSymbolName(symbol.parent, enclosingDeclaration); writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - const decl = getDeclarationOfKind(symbol, 165 /* TypeParameter */); + const decl = getDeclarationOfKind(symbol, 166 /* TypeParameter */); if (decl === void 0) return Debug.fail(); const declaration = decl.parent; @@ -163054,16 +163119,16 @@ if (isFunctionLike(declaration)) { addInPrefix(); const signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 177 /* ConstructSignature */) { - displayParts.push(keywordPart(103 /* NewKeyword */)); + if (declaration.kind === 178 /* ConstructSignature */) { + displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); - } else if (declaration.kind !== 176 /* CallSignature */ && declaration.name) { + } else if (declaration.kind !== 177 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); } else if (isTypeAliasDeclaration(declaration)) { addInPrefix(); - displayParts.push(keywordPart(154 /* TypeKeyword */)); + displayParts.push(keywordPart(155 /* TypeKeyword */)); displayParts.push(spacePart()); addFullSymbolName(declaration.symbol); writeTypeParametersOfSymbol(declaration.symbol, sourceFile); @@ -163075,7 +163140,7 @@ symbolKind = "enum member" /* enumMemberElement */; addPrefixForAnyFunctionOrVar(symbol, "enum member"); const declaration = (_a2 = symbol.declarations) == null ? void 0 : _a2[0]; - if ((declaration == null ? void 0 : declaration.kind) === 302 /* EnumMember */) { + if ((declaration == null ? void 0 : declaration.kind) === 303 /* EnumMember */) { const constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== void 0) { displayParts.push(spacePart()); @@ -163119,33 +163184,33 @@ } if (symbol.declarations) { switch (symbol.declarations[0].kind) { - case 267 /* NamespaceExportDeclaration */: - displayParts.push(keywordPart(93 /* ExportKeyword */)); + case 268 /* NamespaceExportDeclaration */: + displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); - displayParts.push(keywordPart(143 /* NamespaceKeyword */)); + displayParts.push(keywordPart(144 /* NamespaceKeyword */)); break; - case 274 /* ExportAssignment */: - displayParts.push(keywordPart(93 /* ExportKeyword */)); + case 275 /* ExportAssignment */: + displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); - displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 63 /* EqualsToken */ : 88 /* DefaultKeyword */)); + displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 63 /* EqualsToken */ : 89 /* DefaultKeyword */)); break; - case 278 /* ExportSpecifier */: - displayParts.push(keywordPart(93 /* ExportKeyword */)); + case 279 /* ExportSpecifier */: + displayParts.push(keywordPart(94 /* ExportKeyword */)); break; default: - displayParts.push(keywordPart(100 /* ImportKeyword */)); + displayParts.push(keywordPart(101 /* ImportKeyword */)); } } displayParts.push(spacePart()); addFullSymbolName(symbol); forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 268 /* ImportEqualsDeclaration */) { + if (declaration.kind === 269 /* ImportEqualsDeclaration */) { const importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); displayParts.push(operatorPart(63 /* EqualsToken */)); displayParts.push(spacePart()); - displayParts.push(keywordPart(147 /* RequireKeyword */)); + displayParts.push(keywordPart(148 /* RequireKeyword */)); displayParts.push(punctuationPart(20 /* OpenParenToken */)); displayParts.push(displayPart(getTextOfNode(getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), 8 /* stringLiteral */)); displayParts.push(punctuationPart(21 /* CloseParenToken */)); @@ -163167,7 +163232,7 @@ if (type) { if (isThisExpression) { prefixNextMeaning(); - displayParts.push(keywordPart(108 /* ThisKeyword */)); + displayParts.push(keywordPart(109 /* ThisKeyword */)); } else { addPrefixForAnyFunctionOrVar(symbol, symbolKind); } @@ -163207,9 +163272,9 @@ documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker); } if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 308 /* SourceFile */)) { + if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 309 /* SourceFile */)) { for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 223 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 224 /* BinaryExpression */) { continue; } const rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -163263,7 +163328,7 @@ } function addInPrefix() { displayParts.push(spacePart()); - displayParts.push(keywordPart(101 /* InKeyword */)); + displayParts.push(keywordPart(102 /* InKeyword */)); displayParts.push(spacePart()); } function addFullSymbolName(symbolToDisplay, enclosingDeclaration2) { @@ -163361,14 +163426,14 @@ return false; } return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 215 /* FunctionExpression */) { + if (declaration.kind === 216 /* FunctionExpression */) { return true; } - if (declaration.kind !== 257 /* VariableDeclaration */ && declaration.kind !== 259 /* FunctionDeclaration */) { + if (declaration.kind !== 258 /* VariableDeclaration */ && declaration.kind !== 260 /* FunctionDeclaration */) { return false; } for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 308 /* SourceFile */ || parent2.kind === 265 /* ModuleBlock */) { + if (parent2.kind === 309 /* SourceFile */ || parent2.kind === 266 /* ModuleBlock */) { return false; } } @@ -163542,16 +163607,16 @@ return newEnd !== end && (trailingTriviaOption === 2 /* Include */ || isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))) ? newEnd : end; } function isSeparator(node, candidate) { - return !!candidate && !!node.parent && (candidate.kind === 27 /* CommaToken */ || candidate.kind === 26 /* SemicolonToken */ && node.parent.kind === 207 /* ObjectLiteralExpression */); + return !!candidate && !!node.parent && (candidate.kind === 27 /* CommaToken */ || candidate.kind === 26 /* SemicolonToken */ && node.parent.kind === 208 /* ObjectLiteralExpression */); } function isThisTypeAnnotatable(containingFunction) { return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); } function updateJSDocHost(parent2) { - if (parent2.kind !== 216 /* ArrowFunction */) { + if (parent2.kind !== 217 /* ArrowFunction */) { return parent2; } - const jsDocNode = parent2.parent.kind === 169 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; + const jsDocNode = parent2.parent.kind === 170 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; jsDocNode.jsDoc = parent2.jsDoc; return jsDocNode; } @@ -163560,7 +163625,7 @@ return void 0; } switch (oldTag.kind) { - case 344 /* JSDocParameterTag */: { + case 345 /* JSDocParameterTag */: { const oldParam = oldTag; const newParam = newTag; return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag( @@ -163574,14 +163639,14 @@ oldParam.comment ) : void 0; } - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: return factory.createJSDocReturnTag( /*tagName*/ void 0, newTag.typeExpression, oldTag.comment ); - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return factory.createJSDocTypeTag( /*tagName*/ void 0, @@ -163952,7 +164017,7 @@ return !isInComment(sourceFile, position) && !isInString(sourceFile, position) && !isInTemplateString(sourceFile, position) && !isInJSXText(sourceFile, position); } function needSemicolonBetween(a, b) { - return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 164 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 165 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } function deleteNode(changes, sourceFile, node, options = { leadingTriviaOption: 1 /* IncludeAll */ }) { const startPosition = getAdjustedStartPosition(sourceFile, node, options); @@ -164202,7 +164267,7 @@ endNode2 = first(node.parameters); } } else { - endNode2 = (_a2 = node.kind === 257 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; + endNode2 = (_a2 = node.kind === 258 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; } this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); return true; @@ -164352,18 +164417,18 @@ } getInsertNodeAfterOptionsWorker(node) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: case 10 /* StringLiteral */: case 79 /* Identifier */: return { prefix: ", " }; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return { suffix: "," + this.newLineCharacter }; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return { prefix: " " }; - case 166 /* Parameter */: + case 167 /* Parameter */: return {}; default: Debug.assert(isStatement(node) || isClassOrTypeElement(node)); @@ -164372,22 +164437,22 @@ } insertName(sourceFile, node, name) { Debug.assert(!node.name); - if (node.kind === 216 /* ArrowFunction */) { + if (node.kind === 217 /* ArrowFunction */) { const arrow = findChildOfKind(node, 38 /* EqualsGreaterThanToken */, sourceFile); const lparen = findChildOfKind(node, 20 /* OpenParenToken */, sourceFile); if (lparen) { - this.insertNodesAt(sourceFile, lparen.getStart(sourceFile), [factory.createToken(98 /* FunctionKeyword */), factory.createIdentifier(name)], { joiner: " " }); + this.insertNodesAt(sourceFile, lparen.getStart(sourceFile), [factory.createToken(99 /* FunctionKeyword */), factory.createIdentifier(name)], { joiner: " " }); deleteNode(this, sourceFile, arrow); } else { this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); this.replaceRange(sourceFile, arrow, factory.createToken(21 /* CloseParenToken */)); } - if (node.body.kind !== 238 /* Block */) { - this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(18 /* OpenBraceToken */), factory.createToken(105 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); + if (node.body.kind !== 239 /* Block */) { + this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(18 /* OpenBraceToken */), factory.createToken(106 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); this.insertNodesAt(sourceFile, node.body.end, [factory.createToken(26 /* SemicolonToken */), factory.createToken(19 /* CloseBraceToken */)], { joiner: " " }); } } else { - const pos = findChildOfKind(node, node.kind === 215 /* FunctionExpression */ ? 98 /* FunctionKeyword */ : 84 /* ClassKeyword */, sourceFile).end; + const pos = findChildOfKind(node, node.kind === 216 /* FunctionExpression */ ? 99 /* FunctionKeyword */ : 85 /* ClassKeyword */, sourceFile).end; this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); } } @@ -164619,7 +164684,7 @@ ((_deleteDeclaration) => { function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { switch (node.kind) { - case 166 /* Parameter */: { + case 167 /* Parameter */: { const oldFunction = node.parent; if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 20 /* OpenParenToken */, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); @@ -164628,29 +164693,29 @@ } break; } - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: const isFirstImport = sourceFile.imports.length && node === first(sourceFile.imports).parent || node === find(sourceFile.statements, isAnyImportSyntax); deleteNode(changes, sourceFile, node, { leadingTriviaOption: isFirstImport ? 0 /* Exclude */ : hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; - case 205 /* BindingElement */: + case 206 /* BindingElement */: const pattern = node.parent; - const preserveComma = pattern.kind === 204 /* ArrayBindingPattern */ && node !== last(pattern.elements); + const preserveComma = pattern.kind === 205 /* ArrayBindingPattern */ && node !== last(pattern.elements); if (preserveComma) { deleteNode(changes, sourceFile, node); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 257 /* VariableDeclaration */: + case 258 /* VariableDeclaration */: deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); break; - case 165 /* TypeParameter */: + case 166 /* TypeParameter */: deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); break; - case 273 /* ImportSpecifier */: + case 274 /* ImportSpecifier */: const namedImports = node.parent; if (namedImports.elements.length === 1) { deleteImportBinding(changes, sourceFile, namedImports); @@ -164658,17 +164723,17 @@ deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 271 /* NamespaceImport */: + case 272 /* NamespaceImport */: deleteImportBinding(changes, sourceFile, node); break; case 26 /* SemicolonToken */: deleteNode(changes, sourceFile, node, { trailingTriviaOption: 0 /* Exclude */ }); break; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); break; - case 260 /* ClassDeclaration */: - case 259 /* FunctionDeclaration */: + case 261 /* ClassDeclaration */: + case 260 /* FunctionDeclaration */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -164710,13 +164775,13 @@ const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { - const importDecl = getAncestor(node, 269 /* ImportDeclaration */); + const importDecl = getAncestor(node, 270 /* ImportDeclaration */); deleteNode(changes, sourceFile, importDecl); } } function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { const { parent: parent2 } = node; - if (parent2.kind === 295 /* CatchClause */) { + if (parent2.kind === 296 /* CatchClause */) { changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 20 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 21 /* CloseParenToken */, sourceFile)); return; } @@ -164726,14 +164791,14 @@ } const gp = parent2.parent; switch (gp.kind) { - case 247 /* ForOfStatement */: - case 246 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 247 /* ForInStatement */: changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); break; - case 245 /* ForStatement */: + case 246 /* ForStatement */: deleteNode(changes, sourceFile, parent2); break; - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -164853,7 +164918,7 @@ function getFormattingScanner(text, languageVariant, startPos, endPos, cb) { const scanner2 = languageVariant === 1 /* JSX */ ? jsxScanner : standardScanner; scanner2.setText(text); - scanner2.setTextPos(startPos); + scanner2.resetTokenState(startPos); let wasNewLine = true; let leadingTrivia; let trailingTrivia; @@ -164870,9 +164935,13 @@ lastTrailingTriviaWasNewLine: () => wasNewLine, skipToEndOf, skipToStartOf, + getTokenFullStart: () => { + var _a2; + return (_a2 = lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) != null ? _a2 : scanner2.getTokenStart(); + }, getStartPos: () => { var _a2; - return (_a2 = lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) != null ? _a2 : scanner2.getTokenPos(); + return (_a2 = lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) != null ? _a2 : scanner2.getTokenStart(); } }); lastTokenInfo = void 0; @@ -164880,7 +164949,7 @@ return res; function advance() { lastTokenInfo = void 0; - const isStarted = scanner2.getStartPos() !== startPos; + const isStarted = scanner2.getTokenFullStart() !== startPos; if (isStarted) { wasNewLine = !!trailingTrivia && last(trailingTrivia).kind === 4 /* NewLineTrivia */; } else { @@ -164888,7 +164957,7 @@ } leadingTrivia = void 0; trailingTrivia = void 0; - let pos = scanner2.getStartPos(); + let pos = scanner2.getTokenFullStart(); while (pos < endPos) { const t = scanner2.getToken(); if (!isTrivia(t)) { @@ -164897,13 +164966,13 @@ scanner2.scan(); const item = { pos, - end: scanner2.getStartPos(), + end: scanner2.getTokenFullStart(), kind: t }; - pos = scanner2.getStartPos(); + pos = scanner2.getTokenFullStart(); leadingTrivia = append(leadingTrivia, item); } - savedPos = scanner2.getStartPos(); + savedPos = scanner2.getTokenFullStart(); } function shouldRescanGreaterThanToken(node) { switch (node.kind) { @@ -164919,10 +164988,10 @@ function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 288 /* JsxAttribute */: - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: - case 282 /* JsxSelfClosingElement */: + case 289 /* JsxAttribute */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: + case 283 /* JsxSelfClosingElement */: return isKeyword(node.kind) || node.kind === 79 /* Identifier */; } } @@ -164949,28 +165018,28 @@ if (lastTokenInfo && expectedScanAction === lastScanAction) { return fixTokenKind(lastTokenInfo, n); } - if (scanner2.getStartPos() !== savedPos) { + if (scanner2.getTokenFullStart() !== savedPos) { Debug.assert(lastTokenInfo !== void 0); - scanner2.setTextPos(savedPos); + scanner2.resetTokenState(savedPos); scanner2.scan(); } let currentToken = getNextToken(n, expectedScanAction); const token = createTextRangeWithKind( - scanner2.getStartPos(), - scanner2.getTextPos(), + scanner2.getTokenFullStart(), + scanner2.getTokenEnd(), currentToken ); if (trailingTrivia) { trailingTrivia = void 0; } - while (scanner2.getStartPos() < endPos) { + while (scanner2.getTokenFullStart() < endPos) { currentToken = scanner2.scan(); if (!isTrivia(currentToken)) { break; } const trivia = createTextRangeWithKind( - scanner2.getStartPos(), - scanner2.getTextPos(), + scanner2.getTokenFullStart(), + scanner2.getTokenEnd(), currentToken ); if (!trailingTrivia) { @@ -165035,7 +165104,7 @@ } function readEOFTokenRange() { Debug.assert(isOnEOF()); - return createTextRangeWithKind(scanner2.getStartPos(), scanner2.getTextPos(), 1 /* EndOfFileToken */); + return createTextRangeWithKind(scanner2.getTokenFullStart(), scanner2.getTokenEnd(), 1 /* EndOfFileToken */); } function isOnToken() { const current = lastTokenInfo ? lastTokenInfo.token.kind : scanner2.getToken(); @@ -165052,8 +165121,8 @@ return tokenInfo; } function skipToEndOf(node) { - scanner2.setTextPos(node.end); - savedPos = scanner2.getStartPos(); + scanner2.resetTokenState(node.end); + savedPos = scanner2.getTokenFullStart(); lastScanAction = void 0; lastTokenInfo = void 0; wasNewLine = false; @@ -165061,8 +165130,8 @@ trailingTrivia = void 0; } function skipToStartOf(node) { - scanner2.setTextPos(node.pos); - savedPos = scanner2.getStartPos(); + scanner2.resetTokenState(node.pos); + savedPos = scanner2.getTokenFullStart(); lastScanAction = void 0; lastTokenInfo = void 0; wasNewLine = false; @@ -165123,7 +165192,7 @@ // src/services/formatting/rules.ts function getAllRules() { const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 162 /* LastToken */; token++) { + for (let token = 0 /* FirstToken */; token <= 163 /* LastToken */; token++) { if (token !== 1 /* EndOfFileToken */) { allTokens.push(token); } @@ -165134,15 +165203,15 @@ const anyToken = { tokens: allTokens, isSpecific: false }; const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(81 /* FirstKeyword */, 162 /* LastKeyword */); + const keywords = tokenRangeFromRange(82 /* FirstKeyword */, 163 /* LastKeyword */); const binaryOperators = tokenRangeFromRange(29 /* FirstBinaryOperator */, 78 /* LastBinaryOperator */); const binaryKeywordOperators = [ - 101 /* InKeyword */, - 102 /* InstanceOfKeyword */, - 162 /* OfKeyword */, - 128 /* AsKeyword */, - 140 /* IsKeyword */, - 150 /* SatisfiesKeyword */ + 102 /* InKeyword */, + 103 /* InstanceOfKeyword */, + 163 /* OfKeyword */, + 129 /* AsKeyword */, + 141 /* IsKeyword */, + 151 /* SatisfiesKeyword */ ]; const unaryPrefixOperators = [45 /* PlusPlusToken */, 46 /* MinusMinusToken */, 54 /* TildeToken */, 53 /* ExclamationToken */]; const unaryPrefixExpressions = [ @@ -165152,18 +165221,18 @@ 20 /* OpenParenToken */, 22 /* OpenBracketToken */, 18 /* OpenBraceToken */, - 108 /* ThisKeyword */, - 103 /* NewKeyword */ + 109 /* ThisKeyword */, + 104 /* NewKeyword */ ]; - const unaryPreincrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 108 /* ThisKeyword */, 103 /* NewKeyword */]; - const unaryPostincrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 103 /* NewKeyword */]; - const unaryPredecrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 108 /* ThisKeyword */, 103 /* NewKeyword */]; - const unaryPostdecrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 103 /* NewKeyword */]; + const unaryPreincrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 109 /* ThisKeyword */, 104 /* NewKeyword */]; + const unaryPostincrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 104 /* NewKeyword */]; + const unaryPredecrementExpressions = [79 /* Identifier */, 20 /* OpenParenToken */, 109 /* ThisKeyword */, 104 /* NewKeyword */]; + const unaryPostdecrementExpressions = [79 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 104 /* NewKeyword */]; const comments = [2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]; const typeNames = [79 /* Identifier */, ...typeKeywords]; const functionOpenBraceLeftTokenRange = anyTokenIncludingMultilineComments; - const typeScriptOpenBraceLeftTokenRange = tokenRangeFrom([79 /* Identifier */, 3 /* MultiLineCommentTrivia */, 84 /* ClassKeyword */, 93 /* ExportKeyword */, 100 /* ImportKeyword */]); - const controlOpenBraceLeftTokenRange = tokenRangeFrom([21 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 90 /* DoKeyword */, 111 /* TryKeyword */, 96 /* FinallyKeyword */, 91 /* ElseKeyword */]); + const typeScriptOpenBraceLeftTokenRange = tokenRangeFrom([79 /* Identifier */, 3 /* MultiLineCommentTrivia */, 85 /* ClassKeyword */, 94 /* ExportKeyword */, 101 /* ImportKeyword */]); + const controlOpenBraceLeftTokenRange = tokenRangeFrom([21 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 91 /* DoKeyword */, 112 /* TryKeyword */, 97 /* FinallyKeyword */, 92 /* ElseKeyword */]); const highPriorityCommonRules = [ // Leave comments alone rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */), @@ -165177,7 +165246,7 @@ rule("NoSpaceAfterQuestionMark", 57 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBeforeDot", anyToken, [24 /* DotToken */, 28 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */), rule("NoSpaceAfterDot", [24 /* DotToken */, 28 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBetweenImportParenInImportType", 100 /* ImportKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), + rule("NoSpaceBetweenImportParenInImportType", 101 /* ImportKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), // Special handling of unary operators. // Prefix operators generally shouldn't have a space between // them and their target unary expression. @@ -165204,34 +165273,34 @@ rule("SpaceAfterCloseBrace", 19 /* CloseBraceToken */, anyTokenExcept(21 /* CloseParenToken */), [isNonJsxSameLineTokenContext, isAfterCodeBlockContext], 4 /* InsertSpace */), // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied // Also should not apply to }) - rule("SpaceBetweenCloseBraceAndElse", 19 /* CloseBraceToken */, 91 /* ElseKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBetweenCloseBraceAndWhile", 19 /* CloseBraceToken */, 115 /* WhileKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenCloseBraceAndElse", 19 /* CloseBraceToken */, 92 /* ElseKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenCloseBraceAndWhile", 19 /* CloseBraceToken */, 116 /* WhileKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), rule("NoSpaceBetweenEmptyBraceBrackets", 18 /* OpenBraceToken */, 19 /* CloseBraceToken */, [isNonJsxSameLineTokenContext, isObjectContext], 16 /* DeleteSpace */), // Add a space after control dec context if the next character is an open bracket ex: 'if (false)[a, b] = [1, 2];' -> 'if (false) [a, b] = [1, 2];' rule("SpaceAfterConditionalClosingParen", 21 /* CloseParenToken */, 22 /* OpenBracketToken */, [isControlDeclContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenFunctionKeywordAndStar", 98 /* FunctionKeyword */, 41 /* AsteriskToken */, [isFunctionDeclarationOrFunctionExpressionContext], 16 /* DeleteSpace */), + rule("NoSpaceBetweenFunctionKeywordAndStar", 99 /* FunctionKeyword */, 41 /* AsteriskToken */, [isFunctionDeclarationOrFunctionExpressionContext], 16 /* DeleteSpace */), rule("SpaceAfterStarInGeneratorDeclaration", 41 /* AsteriskToken */, 79 /* Identifier */, [isFunctionDeclarationOrFunctionExpressionContext], 4 /* InsertSpace */), - rule("SpaceAfterFunctionInFuncDecl", 98 /* FunctionKeyword */, anyToken, [isFunctionDeclContext], 4 /* InsertSpace */), + rule("SpaceAfterFunctionInFuncDecl", 99 /* FunctionKeyword */, anyToken, [isFunctionDeclContext], 4 /* InsertSpace */), // Insert new line after { and before } in multi-line contexts. rule("NewLineAfterOpenBraceInBlockContext", 18 /* OpenBraceToken */, anyToken, [isMultilineBlockContext], 8 /* InsertNewLine */), // For get/set members, we check for (identifier,identifier) since get/set don't have tokens and they are represented as just an identifier token. // Though, we do extra check on the context to make sure we are dealing with get/set node. Example: // get x() {} // set x(val) {} - rule("SpaceAfterGetSetInMember", [137 /* GetKeyword */, 151 /* SetKeyword */], 79 /* Identifier */, [isFunctionDeclContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenYieldKeywordAndStar", 125 /* YieldKeyword */, 41 /* AsteriskToken */, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 16 /* DeleteSpace */), - rule("SpaceBetweenYieldOrYieldStarAndOperand", [125 /* YieldKeyword */, 41 /* AsteriskToken */], anyToken, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 4 /* InsertSpace */), - rule("NoSpaceBetweenReturnAndSemicolon", 105 /* ReturnKeyword */, 26 /* SemicolonToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("SpaceAfterCertainKeywords", [113 /* VarKeyword */, 109 /* ThrowKeyword */, 103 /* NewKeyword */, 89 /* DeleteKeyword */, 105 /* ReturnKeyword */, 112 /* TypeOfKeyword */, 133 /* AwaitKeyword */], anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceAfterLetConstInVariableDeclaration", [119 /* LetKeyword */, 85 /* ConstKeyword */], anyToken, [isNonJsxSameLineTokenContext, isStartOfVariableDeclarationList], 4 /* InsertSpace */), + rule("SpaceAfterGetSetInMember", [138 /* GetKeyword */, 152 /* SetKeyword */], 79 /* Identifier */, [isFunctionDeclContext], 4 /* InsertSpace */), + rule("NoSpaceBetweenYieldKeywordAndStar", 126 /* YieldKeyword */, 41 /* AsteriskToken */, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 16 /* DeleteSpace */), + rule("SpaceBetweenYieldOrYieldStarAndOperand", [126 /* YieldKeyword */, 41 /* AsteriskToken */], anyToken, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 4 /* InsertSpace */), + rule("NoSpaceBetweenReturnAndSemicolon", 106 /* ReturnKeyword */, 26 /* SemicolonToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("SpaceAfterCertainKeywords", [114 /* VarKeyword */, 110 /* ThrowKeyword */, 104 /* NewKeyword */, 90 /* DeleteKeyword */, 106 /* ReturnKeyword */, 113 /* TypeOfKeyword */, 134 /* AwaitKeyword */], anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceAfterLetConstInVariableDeclaration", [120 /* LetKeyword */, 86 /* ConstKeyword */], anyToken, [isNonJsxSameLineTokenContext, isStartOfVariableDeclarationList], 4 /* InsertSpace */), rule("NoSpaceBeforeOpenParenInFuncCall", anyToken, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isFunctionCallOrNewContext, isPreviousTokenNotComma], 16 /* DeleteSpace */), // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. rule("SpaceBeforeBinaryKeywordOperator", anyToken, binaryKeywordOperators, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), rule("SpaceAfterBinaryKeywordOperator", binaryKeywordOperators, anyToken, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterVoidOperator", 114 /* VoidKeyword */, anyToken, [isNonJsxSameLineTokenContext, isVoidOpContext], 4 /* InsertSpace */), + rule("SpaceAfterVoidOperator", 115 /* VoidKeyword */, anyToken, [isNonJsxSameLineTokenContext, isVoidOpContext], 4 /* InsertSpace */), // Async-await - rule("SpaceBetweenAsyncAndOpenParen", 132 /* AsyncKeyword */, 20 /* OpenParenToken */, [isArrowFunctionContext, isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBetweenAsyncAndFunctionKeyword", 132 /* AsyncKeyword */, [98 /* FunctionKeyword */, 79 /* Identifier */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenAsyncAndOpenParen", 133 /* AsyncKeyword */, 20 /* OpenParenToken */, [isArrowFunctionContext, isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenAsyncAndFunctionKeyword", 133 /* AsyncKeyword */, [99 /* FunctionKeyword */, 79 /* Identifier */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), // Template string rule("NoSpaceBetweenTagAndTemplateString", [79 /* Identifier */, 21 /* CloseParenToken */], [14 /* NoSubstitutionTemplateLiteral */, 15 /* TemplateHead */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // JSX opening elements @@ -165242,35 +165311,35 @@ rule("NoSpaceAfterEqualInJsxAttribute", 63 /* EqualsToken */, anyToken, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // TypeScript-specific rules // Use of module as a function call. e.g.: import m2 = module("m2"); - rule("NoSpaceAfterModuleImport", [142 /* ModuleKeyword */, 147 /* RequireKeyword */], 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterModuleImport", [143 /* ModuleKeyword */, 148 /* RequireKeyword */], 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // Add a space around certain TypeScript keywords rule( "SpaceAfterCertainTypeScriptKeywords", [ - 126 /* AbstractKeyword */, - 127 /* AccessorKeyword */, - 84 /* ClassKeyword */, - 136 /* DeclareKeyword */, - 88 /* DefaultKeyword */, - 92 /* EnumKeyword */, - 93 /* ExportKeyword */, - 94 /* ExtendsKeyword */, - 137 /* GetKeyword */, - 117 /* ImplementsKeyword */, - 100 /* ImportKeyword */, - 118 /* InterfaceKeyword */, - 142 /* ModuleKeyword */, - 143 /* NamespaceKeyword */, - 121 /* PrivateKeyword */, - 123 /* PublicKeyword */, - 122 /* ProtectedKeyword */, - 146 /* ReadonlyKeyword */, - 151 /* SetKeyword */, - 124 /* StaticKeyword */, - 154 /* TypeKeyword */, - 158 /* FromKeyword */, - 141 /* KeyOfKeyword */, - 138 /* InferKeyword */ + 127 /* AbstractKeyword */, + 128 /* AccessorKeyword */, + 85 /* ClassKeyword */, + 137 /* DeclareKeyword */, + 89 /* DefaultKeyword */, + 93 /* EnumKeyword */, + 94 /* ExportKeyword */, + 95 /* ExtendsKeyword */, + 138 /* GetKeyword */, + 118 /* ImplementsKeyword */, + 101 /* ImportKeyword */, + 119 /* InterfaceKeyword */, + 143 /* ModuleKeyword */, + 144 /* NamespaceKeyword */, + 122 /* PrivateKeyword */, + 124 /* PublicKeyword */, + 123 /* ProtectedKeyword */, + 147 /* ReadonlyKeyword */, + 152 /* SetKeyword */, + 125 /* StaticKeyword */, + 155 /* TypeKeyword */, + 159 /* FromKeyword */, + 142 /* KeyOfKeyword */, + 139 /* InferKeyword */ ], anyToken, [isNonJsxSameLineTokenContext], @@ -165279,7 +165348,7 @@ rule( "SpaceBeforeCertainTypeScriptKeywords", anyToken, - [94 /* ExtendsKeyword */, 117 /* ImplementsKeyword */, 158 /* FromKeyword */], + [95 /* ExtendsKeyword */, 118 /* ImplementsKeyword */, 159 /* FromKeyword */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */ ), @@ -165312,17 +165381,17 @@ "SpaceAfterDecorator", anyToken, [ - 126 /* AbstractKeyword */, + 127 /* AbstractKeyword */, 79 /* Identifier */, - 93 /* ExportKeyword */, - 88 /* DefaultKeyword */, - 84 /* ClassKeyword */, - 124 /* StaticKeyword */, - 123 /* PublicKeyword */, - 121 /* PrivateKeyword */, - 122 /* ProtectedKeyword */, - 137 /* GetKeyword */, - 151 /* SetKeyword */, + 94 /* ExportKeyword */, + 89 /* DefaultKeyword */, + 85 /* ClassKeyword */, + 125 /* StaticKeyword */, + 124 /* PublicKeyword */, + 122 /* PrivateKeyword */, + 123 /* ProtectedKeyword */, + 138 /* GetKeyword */, + 152 /* SetKeyword */, 22 /* OpenBracketToken */, 41 /* AsteriskToken */ ], @@ -165330,18 +165399,18 @@ 4 /* InsertSpace */ ), rule("NoSpaceBeforeNonNullAssertionOperator", anyToken, 53 /* ExclamationToken */, [isNonJsxSameLineTokenContext, isNonNullAssertionContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterNewKeywordOnConstructorSignature", 103 /* NewKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isConstructorSignatureContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterNewKeywordOnConstructorSignature", 104 /* NewKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isConstructorSignatureContext], 16 /* DeleteSpace */), rule("SpaceLessThanAndNonJSXTypeAnnotation", 29 /* LessThanToken */, 29 /* LessThanToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) ]; const userConfigurableRules = [ // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - rule("SpaceAfterConstructor", 135 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("NoSpaceAfterConstructor", 135 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("SpaceAfterConstructor", 136 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("NoSpaceAfterConstructor", 136 /* ConstructorKeyword */, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("SpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen], 4 /* InsertSpace */), rule("NoSpaceAfterComma", 27 /* CommaToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext], 16 /* DeleteSpace */), // Insert space after function keyword for anonymous functions - rule("SpaceAfterAnonymousFunctionKeyword", [98 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), - rule("NoSpaceAfterAnonymousFunctionKeyword", [98 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 16 /* DeleteSpace */), + rule("SpaceAfterAnonymousFunctionKeyword", [99 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), + rule("NoSpaceAfterAnonymousFunctionKeyword", [99 /* FunctionKeyword */, 41 /* AsteriskToken */], 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 16 /* DeleteSpace */), // Insert space after keywords in control flow statements rule("SpaceAfterKeywordInControl", keywords, 20 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterKeywordsInControlFlowStatements"), isControlDeclContext], 4 /* InsertSpace */), rule("NoSpaceAfterKeywordInControl", keywords, 20 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterKeywordsInControlFlowStatements"), isControlDeclContext], 16 /* DeleteSpace */), @@ -165409,22 +165478,22 @@ rule("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock", typeScriptOpenBraceLeftTokenRange, 18 /* OpenBraceToken */, [isOptionDisabledOrUndefinedOrTokensOnSameLine("placeOpenBraceOnNewLineForFunctions"), isTypeScriptDeclWithBlockContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */), rule("NoSpaceBeforeComma", anyToken, 27 /* CommaToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), // No space before and after indexer `x[]` - rule("NoSpaceBeforeOpenBracket", anyTokenExcept(132 /* AsyncKeyword */, 82 /* CaseKeyword */), 22 /* OpenBracketToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceBeforeOpenBracket", anyTokenExcept(133 /* AsyncKeyword */, 83 /* CaseKeyword */), 22 /* OpenBracketToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceAfterCloseBracket", 23 /* CloseBracketToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBeforeBlockInFunctionDeclarationContext], 16 /* DeleteSpace */), rule("SpaceAfterSemicolon", 26 /* SemicolonToken */, anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), // Remove extra space between for and await - rule("SpaceBetweenForAndAwaitKeyword", 97 /* ForKeyword */, 133 /* AwaitKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), + rule("SpaceBetweenForAndAwaitKeyword", 98 /* ForKeyword */, 134 /* AwaitKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] rule( "SpaceBetweenStatements", - [21 /* CloseParenToken */, 90 /* DoKeyword */, 91 /* ElseKeyword */, 82 /* CaseKeyword */], + [21 /* CloseParenToken */, 91 /* DoKeyword */, 92 /* ElseKeyword */, 83 /* CaseKeyword */], anyToken, [isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNotForContext], 4 /* InsertSpace */ ), // This low-pri rule takes care of "try {", "catch {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - rule("SpaceAfterTryCatchFinally", [111 /* TryKeyword */, 83 /* CatchKeyword */, 96 /* FinallyKeyword */], 18 /* OpenBraceToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) + rule("SpaceAfterTryCatchFinally", [112 /* TryKeyword */, 84 /* CatchKeyword */, 97 /* FinallyKeyword */], 18 /* OpenBraceToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) ]; return [ ...highPriorityCommonRules, @@ -165469,40 +165538,40 @@ return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; } function isForContext(context) { - return context.contextNode.kind === 245 /* ForStatement */; + return context.contextNode.kind === 246 /* ForStatement */; } function isNotForContext(context) { return !isForContext(context); } function isBinaryOpContext(context) { switch (context.contextNode.kind) { - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: return context.contextNode.operatorToken.kind !== 27 /* CommaToken */; - case 224 /* ConditionalExpression */: - case 191 /* ConditionalType */: - case 231 /* AsExpression */: - case 278 /* ExportSpecifier */: - case 273 /* ImportSpecifier */: - case 179 /* TypePredicate */: - case 189 /* UnionType */: - case 190 /* IntersectionType */: - case 235 /* SatisfiesExpression */: + case 225 /* ConditionalExpression */: + case 192 /* ConditionalType */: + case 232 /* AsExpression */: + case 279 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 180 /* TypePredicate */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: + case 236 /* SatisfiesExpression */: return true; - case 205 /* BindingElement */: - case 262 /* TypeAliasDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 274 /* ExportAssignment */: - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 302 /* EnumMember */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: + case 206 /* BindingElement */: + case 263 /* TypeAliasDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 275 /* ExportAssignment */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 303 /* EnumMember */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: return context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 246 /* ForInStatement */: - case 165 /* TypeParameter */: - return context.currentTokenSpan.kind === 101 /* InKeyword */ || context.nextTokenSpan.kind === 101 /* InKeyword */ || context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 247 /* ForOfStatement */: - return context.currentTokenSpan.kind === 162 /* OfKeyword */ || context.nextTokenSpan.kind === 162 /* OfKeyword */; + case 247 /* ForInStatement */: + case 166 /* TypeParameter */: + return context.currentTokenSpan.kind === 102 /* InKeyword */ || context.nextTokenSpan.kind === 102 /* InKeyword */ || context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; + case 248 /* ForOfStatement */: + return context.currentTokenSpan.kind === 163 /* OfKeyword */ || context.nextTokenSpan.kind === 163 /* OfKeyword */; } return false; } @@ -165514,16 +165583,16 @@ } function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; - return contextKind === 169 /* PropertyDeclaration */ || contextKind === 168 /* PropertySignature */ || contextKind === 166 /* Parameter */ || contextKind === 257 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); + return contextKind === 170 /* PropertyDeclaration */ || contextKind === 169 /* PropertySignature */ || contextKind === 167 /* Parameter */ || contextKind === 258 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } function isConditionalOperatorContext(context) { - return context.contextNode.kind === 224 /* ConditionalExpression */ || context.contextNode.kind === 191 /* ConditionalType */; + return context.contextNode.kind === 225 /* ConditionalExpression */ || context.contextNode.kind === 192 /* ConditionalType */; } function isSameLineTokenOrBeforeBlockContext(context) { return context.TokensAreOnSameLine() || isBeforeBlockContext(context); } function isBraceWrappedContext(context) { - return context.contextNode.kind === 203 /* ObjectBindingPattern */ || context.contextNode.kind === 197 /* MappedType */ || isSingleLineBlockContext(context); + return context.contextNode.kind === 204 /* ObjectBindingPattern */ || context.contextNode.kind === 198 /* MappedType */ || isSingleLineBlockContext(context); } function isBeforeMultilineBlockContext(context) { return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -165545,26 +165614,26 @@ return true; } switch (node.kind) { - case 238 /* Block */: - case 266 /* CaseBlock */: - case 207 /* ObjectLiteralExpression */: - case 265 /* ModuleBlock */: + case 239 /* Block */: + case 267 /* CaseBlock */: + case 208 /* ObjectLiteralExpression */: + case 266 /* ModuleBlock */: return true; } return false; } function isFunctionDeclContext(context) { switch (context.contextNode.kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 176 /* CallSignature */: - case 215 /* FunctionExpression */: - case 173 /* Constructor */: - case 216 /* ArrowFunction */: - case 261 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 177 /* CallSignature */: + case 216 /* FunctionExpression */: + case 174 /* Constructor */: + case 217 /* ArrowFunction */: + case 262 /* InterfaceDeclaration */: return true; } return false; @@ -165573,39 +165642,39 @@ return !isFunctionDeclContext(context); } function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 259 /* FunctionDeclaration */ || context.contextNode.kind === 215 /* FunctionExpression */; + return context.contextNode.kind === 260 /* FunctionDeclaration */ || context.contextNode.kind === 216 /* FunctionExpression */; } function isTypeScriptDeclWithBlockContext(context) { return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); } function nodeIsTypeScriptDeclWithBlockContext(node) { switch (node.kind) { - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 184 /* TypeLiteral */: - case 264 /* ModuleDeclaration */: - case 275 /* ExportDeclaration */: - case 276 /* NamedExports */: - case 269 /* ImportDeclaration */: - case 272 /* NamedImports */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 185 /* TypeLiteral */: + case 265 /* ModuleDeclaration */: + case 276 /* ExportDeclaration */: + case 277 /* NamedExports */: + case 270 /* ImportDeclaration */: + case 273 /* NamedImports */: return true; } return false; } function isAfterCodeBlockContext(context) { switch (context.currentTokenParent.kind) { - case 260 /* ClassDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 295 /* CatchClause */: - case 265 /* ModuleBlock */: - case 252 /* SwitchStatement */: + case 261 /* ClassDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 296 /* CatchClause */: + case 266 /* ModuleBlock */: + case 253 /* SwitchStatement */: return true; - case 238 /* Block */: { + case 239 /* Block */: { const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 216 /* ArrowFunction */ && blockParent.kind !== 215 /* FunctionExpression */) { + if (!blockParent || blockParent.kind !== 217 /* ArrowFunction */ && blockParent.kind !== 216 /* FunctionExpression */) { return true; } } @@ -165614,29 +165683,29 @@ } function isControlDeclContext(context) { switch (context.contextNode.kind) { - case 242 /* IfStatement */: - case 252 /* SwitchStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 244 /* WhileStatement */: - case 255 /* TryStatement */: - case 243 /* DoStatement */: - case 251 /* WithStatement */: - case 295 /* CatchClause */: + case 243 /* IfStatement */: + case 253 /* SwitchStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 245 /* WhileStatement */: + case 256 /* TryStatement */: + case 244 /* DoStatement */: + case 252 /* WithStatement */: + case 296 /* CatchClause */: return true; default: return false; } } function isObjectContext(context) { - return context.contextNode.kind === 207 /* ObjectLiteralExpression */; + return context.contextNode.kind === 208 /* ObjectLiteralExpression */; } function isFunctionCallContext(context) { - return context.contextNode.kind === 210 /* CallExpression */; + return context.contextNode.kind === 211 /* CallExpression */; } function isNewContext(context) { - return context.contextNode.kind === 211 /* NewExpression */; + return context.contextNode.kind === 212 /* NewExpression */; } function isFunctionCallOrNewContext(context) { return isFunctionCallContext(context) || isNewContext(context); @@ -165651,10 +165720,10 @@ return context.nextTokenSpan.kind !== 21 /* CloseParenToken */; } function isArrowFunctionContext(context) { - return context.contextNode.kind === 216 /* ArrowFunction */; + return context.contextNode.kind === 217 /* ArrowFunction */; } function isImportTypeContext(context) { - return context.contextNode.kind === 202 /* ImportType */; + return context.contextNode.kind === 203 /* ImportType */; } function isNonJsxSameLineTokenContext(context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 11 /* JsxText */; @@ -165663,19 +165732,19 @@ return context.contextNode.kind !== 11 /* JsxText */; } function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 281 /* JsxElement */ && context.contextNode.kind !== 285 /* JsxFragment */; + return context.contextNode.kind !== 282 /* JsxElement */ && context.contextNode.kind !== 286 /* JsxFragment */; } function isJsxExpressionContext(context) { - return context.contextNode.kind === 291 /* JsxExpression */ || context.contextNode.kind === 290 /* JsxSpreadAttribute */; + return context.contextNode.kind === 292 /* JsxExpression */ || context.contextNode.kind === 291 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 288 /* JsxAttribute */; + return context.nextTokenParent.kind === 289 /* JsxAttribute */; } function isJsxAttributeContext(context) { - return context.contextNode.kind === 288 /* JsxAttribute */; + return context.contextNode.kind === 289 /* JsxAttribute */; } function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 282 /* JsxSelfClosingElement */; + return context.contextNode.kind === 283 /* JsxSelfClosingElement */; } function isNotBeforeBlockInFunctionDeclarationContext(context) { return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); @@ -165687,44 +165756,44 @@ while (node && isExpression(node)) { node = node.parent; } - return node && node.kind === 167 /* Decorator */; + return node && node.kind === 168 /* Decorator */; } function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 258 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; + return context.currentTokenParent.kind === 259 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; } function isNotFormatOnEnter(context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; } function isModuleDeclContext(context) { - return context.contextNode.kind === 264 /* ModuleDeclaration */; + return context.contextNode.kind === 265 /* ModuleDeclaration */; } function isObjectTypeContext(context) { - return context.contextNode.kind === 184 /* TypeLiteral */; + return context.contextNode.kind === 185 /* TypeLiteral */; } function isConstructorSignatureContext(context) { - return context.contextNode.kind === 177 /* ConstructSignature */; + return context.contextNode.kind === 178 /* ConstructSignature */; } function isTypeArgumentOrParameterOrAssertion(token, parent2) { if (token.kind !== 29 /* LessThanToken */ && token.kind !== 31 /* GreaterThanToken */) { return false; } switch (parent2.kind) { - case 180 /* TypeReference */: - case 213 /* TypeAssertionExpression */: - case 262 /* TypeAliasDeclaration */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 230 /* ExpressionWithTypeArguments */: + case 181 /* TypeReference */: + case 214 /* TypeAssertionExpression */: + case 263 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 231 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -165734,31 +165803,31 @@ return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); } function isTypeAssertionContext(context) { - return context.contextNode.kind === 213 /* TypeAssertionExpression */; + return context.contextNode.kind === 214 /* TypeAssertionExpression */; } function isNonTypeAssertionContext(context) { return !isTypeAssertionContext(context); } function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 114 /* VoidKeyword */ && context.currentTokenParent.kind === 219 /* VoidExpression */; + return context.currentTokenSpan.kind === 115 /* VoidKeyword */ && context.currentTokenParent.kind === 220 /* VoidExpression */; } function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 226 /* YieldExpression */ && context.contextNode.expression !== void 0; + return context.contextNode.kind === 227 /* YieldExpression */ && context.contextNode.expression !== void 0; } function isNonNullAssertionContext(context) { - return context.contextNode.kind === 232 /* NonNullExpression */; + return context.contextNode.kind === 233 /* NonNullExpression */; } function isNotStatementConditionContext(context) { return !isStatementConditionContext(context); } function isStatementConditionContext(context) { switch (context.contextNode.kind) { - case 242 /* IfStatement */: - case 245 /* ForStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 243 /* DoStatement */: - case 244 /* WhileStatement */: + case 243 /* IfStatement */: + case 246 /* ForStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 244 /* DoStatement */: + case 245 /* WhileStatement */: return true; default: return false; @@ -165784,16 +165853,16 @@ if (startLine === endLine) { return nextTokenKind === 19 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; } - if (nextTokenKind === 237 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { + if (nextTokenKind === 238 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { return false; } - if (context.contextNode.kind === 261 /* InterfaceDeclaration */ || context.contextNode.kind === 262 /* TypeAliasDeclaration */) { + if (context.contextNode.kind === 262 /* InterfaceDeclaration */ || context.contextNode.kind === 263 /* TypeAliasDeclaration */) { return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 20 /* OpenParenToken */; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; } - return context.currentTokenParent.kind !== 245 /* ForStatement */ && context.currentTokenParent.kind !== 239 /* EmptyStatement */ && context.currentTokenParent.kind !== 237 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 225 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; + return context.currentTokenParent.kind !== 246 /* ForStatement */ && context.currentTokenParent.kind !== 240 /* EmptyStatement */ && context.currentTokenParent.kind !== 238 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 226 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; } function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); @@ -165874,7 +165943,7 @@ return map2; } function getRuleBucketIndex(row, column) { - Debug.assert(row <= 162 /* LastKeyword */ && column <= 162 /* LastKeyword */, "Must compute formatting context from tokens"); + Debug.assert(row <= 163 /* LastKeyword */ && column <= 163 /* LastKeyword */, "Must compute formatting context from tokens"); return row * mapRowLength + column; } function addRule(rules, rule2, specificTokens, constructionState, rulesBucketIndex) { @@ -165904,7 +165973,7 @@ init_ts_formatting(); maskBitSize = 5; mask = 31; - mapRowLength = 162 /* LastToken */ + 1; + mapRowLength = 163 /* LastToken */ + 1; RulesPosition = ((RulesPosition2) => { RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; @@ -165996,17 +166065,17 @@ } function isListElement(parent2, node) { switch (parent2.kind) { - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: return rangeContainsRange(parent2.members, node); - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: const body = parent2.body; - return !!body && body.kind === 265 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 308 /* SourceFile */: - case 238 /* Block */: - case 265 /* ModuleBlock */: + return !!body && body.kind === 266 /* ModuleBlock */ && rangeContainsRange(body.statements, node); + case 309 /* SourceFile */: + case 239 /* Block */: + case 266 /* ModuleBlock */: return rangeContainsRange(parent2.statements, node); - case 295 /* CatchClause */: + case 296 /* CatchClause */: return rangeContainsRange(parent2.block.statements, node); } return false; @@ -166178,7 +166247,7 @@ } } } - if (previousRange && formattingScanner.getStartPos() >= originalRange.end) { + if (previousRange && formattingScanner.getTokenFullStart() >= originalRange.end) { const tokenInfo = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() : formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token : void 0; if (tokenInfo && tokenInfo.pos === previousRangeTriviaEnd) { const parent2 = ((_a2 = findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)) == null ? void 0 : _a2.parent) || previousParent; @@ -166238,24 +166307,24 @@ return modifier.kind; } switch (node.kind) { - case 260 /* ClassDeclaration */: - return 84 /* ClassKeyword */; - case 261 /* InterfaceDeclaration */: - return 118 /* InterfaceKeyword */; - case 259 /* FunctionDeclaration */: - return 98 /* FunctionKeyword */; - case 263 /* EnumDeclaration */: - return 263 /* EnumDeclaration */; - case 174 /* GetAccessor */: - return 137 /* GetKeyword */; - case 175 /* SetAccessor */: - return 151 /* SetKeyword */; - case 171 /* MethodDeclaration */: + case 261 /* ClassDeclaration */: + return 85 /* ClassKeyword */; + case 262 /* InterfaceDeclaration */: + return 119 /* InterfaceKeyword */; + case 260 /* FunctionDeclaration */: + return 99 /* FunctionKeyword */; + case 264 /* EnumDeclaration */: + return 264 /* EnumDeclaration */; + case 175 /* GetAccessor */: + return 138 /* GetKeyword */; + case 176 /* SetAccessor */: + return 152 /* SetKeyword */; + case 172 /* MethodDeclaration */: if (node.asteriskToken) { return 41 /* AsteriskToken */; } - case 169 /* PropertyDeclaration */: - case 166 /* Parameter */: + case 170 /* PropertyDeclaration */: + case 167 /* Parameter */: const name = getNameOfDeclaration(node); if (name) { return name.kind; @@ -166298,22 +166367,22 @@ case 18 /* OpenBraceToken */: case 19 /* CloseBraceToken */: case 21 /* CloseParenToken */: - case 91 /* ElseKeyword */: - case 115 /* WhileKeyword */: + case 92 /* ElseKeyword */: + case 116 /* WhileKeyword */: case 59 /* AtToken */: return false; case 43 /* SlashToken */: case 31 /* GreaterThanToken */: switch (container.kind) { - case 283 /* JsxOpeningElement */: - case 284 /* JsxClosingElement */: - case 282 /* JsxSelfClosingElement */: + case 284 /* JsxOpeningElement */: + case 285 /* JsxClosingElement */: + case 283 /* JsxSelfClosingElement */: return false; } break; case 22 /* OpenBracketToken */: case 23 /* CloseBracketToken */: - if (container.kind !== 197 /* MappedType */) { + if (container.kind !== 198 /* MappedType */) { return false; } break; @@ -166356,7 +166425,7 @@ processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); } ); - while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { const tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > Math.min(node.end, originalRange.end)) { break; @@ -166390,7 +166459,7 @@ if (child.getFullWidth() === 0) { return inheritedIndentation; } - while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { const tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > originalRange.end) { return inheritedIndentation; @@ -166403,7 +166472,7 @@ } consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node); } - if (!formattingScanner.isOnToken() || formattingScanner.getStartPos() >= originalRange.end) { + if (!formattingScanner.isOnToken() || formattingScanner.getTokenFullStart() >= originalRange.end) { return inheritedIndentation; } if (isToken(child)) { @@ -166414,11 +166483,11 @@ return inheritedIndentation; } } - const effectiveParentStartLine = child.kind === 167 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + const effectiveParentStartLine = child.kind === 168 /* Decorator */ ? childStartLine : undecoratedParentStartLine; const childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent2.kind === 206 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent2.kind === 207 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -166436,7 +166505,7 @@ return; } if (listStartToken !== 0 /* Unknown */) { - while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { const tokenInfo = formattingScanner.readTokenInfo(parent2); if (tokenInfo.token.end > nodes.pos) { break; @@ -166473,7 +166542,7 @@ ); } const listEndToken = getCloseTokenForOpenToken(listStartToken); - if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) { + if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { let tokenInfo = formattingScanner.readTokenInfo(parent2); if (tokenInfo.token.kind === 27 /* CommaToken */) { consumeTokenAndAdvanceScanner(tokenInfo, parent2, listDynamicIndentation, parent2); @@ -166839,50 +166908,50 @@ } function getOpenTokenForList(node, list) { switch (node.kind) { - case 173 /* Constructor */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 216 /* ArrowFunction */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 174 /* Constructor */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 217 /* ArrowFunction */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } else if (node.parameters === list) { return 20 /* OpenParenToken */; } break; - case 210 /* CallExpression */: - case 211 /* NewExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } else if (node.arguments === list) { return 20 /* OpenParenToken */; } break; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } break; - case 180 /* TypeReference */: - case 212 /* TaggedTemplateExpression */: - case 183 /* TypeQuery */: - case 230 /* ExpressionWithTypeArguments */: - case 202 /* ImportType */: + case 181 /* TypeReference */: + case 213 /* TaggedTemplateExpression */: + case 184 /* TypeQuery */: + case 231 /* ExpressionWithTypeArguments */: + case 203 /* ImportType */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } break; - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return 18 /* OpenBraceToken */; } return 0 /* Unknown */; @@ -166982,11 +167051,11 @@ } const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 207 /* ObjectLiteralExpression */; + const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 208 /* ObjectLiteralExpression */; if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { return getBlockIndent(sourceFile, position, options); } - if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 223 /* BinaryExpression */) { + if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 224 /* BinaryExpression */) { const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { return actualIndentation; @@ -166994,7 +167063,7 @@ } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [215 /* FunctionExpression */, 216 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [216 /* FunctionExpression */, 217 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -167136,7 +167205,7 @@ } } function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 308 /* SourceFile */ || !parentAndChildShareLine); + const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 309 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -167174,8 +167243,8 @@ } SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 242 /* IfStatement */ && parent2.elseStatement === child) { - const elseKeyword = findChildOfKind(parent2, 91 /* ElseKeyword */, sourceFile); + if (parent2.kind === 243 /* IfStatement */ && parent2.elseStatement === child) { + const elseKeyword = findChildOfKind(parent2, 92 /* ElseKeyword */, sourceFile); Debug.assert(elseKeyword !== void 0); const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; return elseKeywordStartLine === childStartLine; @@ -167225,42 +167294,42 @@ } function getListByRange(start, end, node, sourceFile) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return getList(node.typeArguments); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return getList(node.properties); - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: return getList(node.elements); - case 184 /* TypeLiteral */: + case 185 /* TypeLiteral */: return getList(node.members); - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: return getList(node.typeParameters) || getList(node.parameters); - case 174 /* GetAccessor */: + case 175 /* GetAccessor */: return getList(node.parameters); - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 348 /* JSDocTemplateTag */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 349 /* JSDocTemplateTag */: return getList(node.typeParameters); - case 211 /* NewExpression */: - case 210 /* CallExpression */: + case 212 /* NewExpression */: + case 211 /* CallExpression */: return getList(node.typeArguments) || getList(node.arguments); - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return getList(node.declarations); - case 272 /* NamedImports */: - case 276 /* NamedExports */: + case 273 /* NamedImports */: + case 277 /* NamedExports */: return getList(node.elements); - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return getList(node.elements); } function getList(list) { @@ -167283,7 +167352,7 @@ return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); } function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 258 /* VariableDeclarationList */) { + if (node.parent && node.parent.kind === 259 /* VariableDeclarationList */) { return -1 /* Unknown */; } const containingList = getContainingList(node, sourceFile); @@ -167344,95 +167413,95 @@ function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { const childKind = child ? child.kind : 0 /* Unknown */; switch (parent2.kind) { - case 241 /* ExpressionStatement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: - case 206 /* ArrayLiteralExpression */: - case 238 /* Block */: - case 265 /* ModuleBlock */: - case 207 /* ObjectLiteralExpression */: - case 184 /* TypeLiteral */: - case 197 /* MappedType */: - case 186 /* TupleType */: - case 266 /* CaseBlock */: - case 293 /* DefaultClause */: - case 292 /* CaseClause */: - case 214 /* ParenthesizedExpression */: - case 208 /* PropertyAccessExpression */: - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 240 /* VariableStatement */: - case 274 /* ExportAssignment */: - case 250 /* ReturnStatement */: - case 224 /* ConditionalExpression */: - case 204 /* ArrayBindingPattern */: - case 203 /* ObjectBindingPattern */: - case 283 /* JsxOpeningElement */: - case 286 /* JsxOpeningFragment */: - case 282 /* JsxSelfClosingElement */: - case 291 /* JsxExpression */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 166 /* Parameter */: - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 193 /* ParenthesizedType */: - case 212 /* TaggedTemplateExpression */: - case 220 /* AwaitExpression */: - case 276 /* NamedExports */: - case 272 /* NamedImports */: - case 278 /* ExportSpecifier */: - case 273 /* ImportSpecifier */: - case 169 /* PropertyDeclaration */: + case 242 /* ExpressionStatement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: + case 207 /* ArrayLiteralExpression */: + case 239 /* Block */: + case 266 /* ModuleBlock */: + case 208 /* ObjectLiteralExpression */: + case 185 /* TypeLiteral */: + case 198 /* MappedType */: + case 187 /* TupleType */: + case 267 /* CaseBlock */: + case 294 /* DefaultClause */: + case 293 /* CaseClause */: + case 215 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 241 /* VariableStatement */: + case 275 /* ExportAssignment */: + case 251 /* ReturnStatement */: + case 225 /* ConditionalExpression */: + case 205 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 284 /* JsxOpeningElement */: + case 287 /* JsxOpeningFragment */: + case 283 /* JsxSelfClosingElement */: + case 292 /* JsxExpression */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 167 /* Parameter */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 194 /* ParenthesizedType */: + case 213 /* TaggedTemplateExpression */: + case 221 /* AwaitExpression */: + case 277 /* NamedExports */: + case 273 /* NamedImports */: + case 279 /* ExportSpecifier */: + case 274 /* ImportSpecifier */: + case 170 /* PropertyDeclaration */: return true; - case 257 /* VariableDeclaration */: - case 299 /* PropertyAssignment */: - case 223 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 207 /* ObjectLiteralExpression */) { + case 258 /* VariableDeclaration */: + case 300 /* PropertyAssignment */: + case 224 /* BinaryExpression */: + if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 208 /* ObjectLiteralExpression */) { return rangeIsOnOneLine(sourceFile, child); } - if (parent2.kind === 223 /* BinaryExpression */ && sourceFile && child && childKind === 281 /* JsxElement */) { + if (parent2.kind === 224 /* BinaryExpression */ && sourceFile && child && childKind === 282 /* JsxElement */) { const parentStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, parent2.pos)).line; const childStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, child.pos)).line; return parentStartLine !== childStartLine; } - if (parent2.kind !== 223 /* BinaryExpression */) { + if (parent2.kind !== 224 /* BinaryExpression */) { return true; } break; - case 243 /* DoStatement */: - case 244 /* WhileStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 242 /* IfStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - return childKind !== 238 /* Block */; - case 216 /* ArrowFunction */: - if (sourceFile && childKind === 214 /* ParenthesizedExpression */) { + case 244 /* DoStatement */: + case 245 /* WhileStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 243 /* IfStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + return childKind !== 239 /* Block */; + case 217 /* ArrowFunction */: + if (sourceFile && childKind === 215 /* ParenthesizedExpression */) { return rangeIsOnOneLine(sourceFile, child); } - return childKind !== 238 /* Block */; - case 275 /* ExportDeclaration */: - return childKind !== 276 /* NamedExports */; - case 269 /* ImportDeclaration */: - return childKind !== 270 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 272 /* NamedImports */; - case 281 /* JsxElement */: - return childKind !== 284 /* JsxClosingElement */; - case 285 /* JsxFragment */: - return childKind !== 287 /* JsxClosingFragment */; - case 190 /* IntersectionType */: - case 189 /* UnionType */: - if (childKind === 184 /* TypeLiteral */ || childKind === 186 /* TupleType */) { + return childKind !== 239 /* Block */; + case 276 /* ExportDeclaration */: + return childKind !== 277 /* NamedExports */; + case 270 /* ImportDeclaration */: + return childKind !== 271 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 273 /* NamedImports */; + case 282 /* JsxElement */: + return childKind !== 285 /* JsxClosingElement */; + case 286 /* JsxFragment */: + return childKind !== 288 /* JsxClosingFragment */; + case 191 /* IntersectionType */: + case 190 /* UnionType */: + if (childKind === 185 /* TypeLiteral */ || childKind === 187 /* TupleType */) { return false; } break; @@ -167442,11 +167511,11 @@ SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; function isControlFlowEndingStatement(kind, parent2) { switch (kind) { - case 250 /* ReturnStatement */: - case 254 /* ThrowStatement */: - case 248 /* ContinueStatement */: - case 249 /* BreakStatement */: - return parent2.kind !== 238 /* Block */; + case 251 /* ReturnStatement */: + case 255 /* ThrowStatement */: + case 249 /* ContinueStatement */: + case 250 /* BreakStatement */: + return parent2.kind !== 239 /* Block */; default: return false; } @@ -167752,7 +167821,6 @@ ContextFlags: () => ContextFlags, CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, - DeprecationVersion: () => DeprecationVersion, DiagnosticCategory: () => DiagnosticCategory, Diagnostics: () => Diagnostics, DocumentHighlights: () => DocumentHighlights, diff --recursive --unified --new-file --exclude test --exclude Makefile 5.1.0-dev.20230307/lib/typingsInstaller.js 5.1.0-dev.20230308/lib/typingsInstaller.js --- 5.1.0-dev.20230307/lib/typingsInstaller.js 1985-10-26 09:15:00 +++ 5.1.0-dev.20230308/lib/typingsInstaller.js 1985-10-26 09:15:00 @@ -54,7 +54,7 @@ // src/compiler/corePublic.ts var versionMajorMinor = "5.1"; -var version = `${versionMajorMinor}.0-dev.20230307`; +var version = `${versionMajorMinor}.0-dev.20230308`; // src/compiler/core.ts var emptyArray = []; @@ -2598,304 +2598,305 @@ SyntaxKind4[SyntaxKind4["CaretEqualsToken"] = 78] = "CaretEqualsToken"; SyntaxKind4[SyntaxKind4["Identifier"] = 79] = "Identifier"; SyntaxKind4[SyntaxKind4["PrivateIdentifier"] = 80] = "PrivateIdentifier"; - SyntaxKind4[SyntaxKind4["BreakKeyword"] = 81] = "BreakKeyword"; - SyntaxKind4[SyntaxKind4["CaseKeyword"] = 82] = "CaseKeyword"; - SyntaxKind4[SyntaxKind4["CatchKeyword"] = 83] = "CatchKeyword"; - SyntaxKind4[SyntaxKind4["ClassKeyword"] = 84] = "ClassKeyword"; - SyntaxKind4[SyntaxKind4["ConstKeyword"] = 85] = "ConstKeyword"; - SyntaxKind4[SyntaxKind4["ContinueKeyword"] = 86] = "ContinueKeyword"; - SyntaxKind4[SyntaxKind4["DebuggerKeyword"] = 87] = "DebuggerKeyword"; - SyntaxKind4[SyntaxKind4["DefaultKeyword"] = 88] = "DefaultKeyword"; - SyntaxKind4[SyntaxKind4["DeleteKeyword"] = 89] = "DeleteKeyword"; - SyntaxKind4[SyntaxKind4["DoKeyword"] = 90] = "DoKeyword"; - SyntaxKind4[SyntaxKind4["ElseKeyword"] = 91] = "ElseKeyword"; - SyntaxKind4[SyntaxKind4["EnumKeyword"] = 92] = "EnumKeyword"; - SyntaxKind4[SyntaxKind4["ExportKeyword"] = 93] = "ExportKeyword"; - SyntaxKind4[SyntaxKind4["ExtendsKeyword"] = 94] = "ExtendsKeyword"; - SyntaxKind4[SyntaxKind4["FalseKeyword"] = 95] = "FalseKeyword"; - SyntaxKind4[SyntaxKind4["FinallyKeyword"] = 96] = "FinallyKeyword"; - SyntaxKind4[SyntaxKind4["ForKeyword"] = 97] = "ForKeyword"; - SyntaxKind4[SyntaxKind4["FunctionKeyword"] = 98] = "FunctionKeyword"; - SyntaxKind4[SyntaxKind4["IfKeyword"] = 99] = "IfKeyword"; - SyntaxKind4[SyntaxKind4["ImportKeyword"] = 100] = "ImportKeyword"; - SyntaxKind4[SyntaxKind4["InKeyword"] = 101] = "InKeyword"; - SyntaxKind4[SyntaxKind4["InstanceOfKeyword"] = 102] = "InstanceOfKeyword"; - SyntaxKind4[SyntaxKind4["NewKeyword"] = 103] = "NewKeyword"; - SyntaxKind4[SyntaxKind4["NullKeyword"] = 104] = "NullKeyword"; - SyntaxKind4[SyntaxKind4["ReturnKeyword"] = 105] = "ReturnKeyword"; - SyntaxKind4[SyntaxKind4["SuperKeyword"] = 106] = "SuperKeyword"; - SyntaxKind4[SyntaxKind4["SwitchKeyword"] = 107] = "SwitchKeyword"; - SyntaxKind4[SyntaxKind4["ThisKeyword"] = 108] = "ThisKeyword"; - SyntaxKind4[SyntaxKind4["ThrowKeyword"] = 109] = "ThrowKeyword"; - SyntaxKind4[SyntaxKind4["TrueKeyword"] = 110] = "TrueKeyword"; - SyntaxKind4[SyntaxKind4["TryKeyword"] = 111] = "TryKeyword"; - SyntaxKind4[SyntaxKind4["TypeOfKeyword"] = 112] = "TypeOfKeyword"; - SyntaxKind4[SyntaxKind4["VarKeyword"] = 113] = "VarKeyword"; - SyntaxKind4[SyntaxKind4["VoidKeyword"] = 114] = "VoidKeyword"; - SyntaxKind4[SyntaxKind4["WhileKeyword"] = 115] = "WhileKeyword"; - SyntaxKind4[SyntaxKind4["WithKeyword"] = 116] = "WithKeyword"; - SyntaxKind4[SyntaxKind4["ImplementsKeyword"] = 117] = "ImplementsKeyword"; - SyntaxKind4[SyntaxKind4["InterfaceKeyword"] = 118] = "InterfaceKeyword"; - SyntaxKind4[SyntaxKind4["LetKeyword"] = 119] = "LetKeyword"; - SyntaxKind4[SyntaxKind4["PackageKeyword"] = 120] = "PackageKeyword"; - SyntaxKind4[SyntaxKind4["PrivateKeyword"] = 121] = "PrivateKeyword"; - SyntaxKind4[SyntaxKind4["ProtectedKeyword"] = 122] = "ProtectedKeyword"; - SyntaxKind4[SyntaxKind4["PublicKeyword"] = 123] = "PublicKeyword"; - SyntaxKind4[SyntaxKind4["StaticKeyword"] = 124] = "StaticKeyword"; - SyntaxKind4[SyntaxKind4["YieldKeyword"] = 125] = "YieldKeyword"; - SyntaxKind4[SyntaxKind4["AbstractKeyword"] = 126] = "AbstractKeyword"; - SyntaxKind4[SyntaxKind4["AccessorKeyword"] = 127] = "AccessorKeyword"; - SyntaxKind4[SyntaxKind4["AsKeyword"] = 128] = "AsKeyword"; - SyntaxKind4[SyntaxKind4["AssertsKeyword"] = 129] = "AssertsKeyword"; - SyntaxKind4[SyntaxKind4["AssertKeyword"] = 130] = "AssertKeyword"; - SyntaxKind4[SyntaxKind4["AnyKeyword"] = 131] = "AnyKeyword"; - SyntaxKind4[SyntaxKind4["AsyncKeyword"] = 132] = "AsyncKeyword"; - SyntaxKind4[SyntaxKind4["AwaitKeyword"] = 133] = "AwaitKeyword"; - SyntaxKind4[SyntaxKind4["BooleanKeyword"] = 134] = "BooleanKeyword"; - SyntaxKind4[SyntaxKind4["ConstructorKeyword"] = 135] = "ConstructorKeyword"; - SyntaxKind4[SyntaxKind4["DeclareKeyword"] = 136] = "DeclareKeyword"; - SyntaxKind4[SyntaxKind4["GetKeyword"] = 137] = "GetKeyword"; - SyntaxKind4[SyntaxKind4["InferKeyword"] = 138] = "InferKeyword"; - SyntaxKind4[SyntaxKind4["IntrinsicKeyword"] = 139] = "IntrinsicKeyword"; - SyntaxKind4[SyntaxKind4["IsKeyword"] = 140] = "IsKeyword"; - SyntaxKind4[SyntaxKind4["KeyOfKeyword"] = 141] = "KeyOfKeyword"; - SyntaxKind4[SyntaxKind4["ModuleKeyword"] = 142] = "ModuleKeyword"; - SyntaxKind4[SyntaxKind4["NamespaceKeyword"] = 143] = "NamespaceKeyword"; - SyntaxKind4[SyntaxKind4["NeverKeyword"] = 144] = "NeverKeyword"; - SyntaxKind4[SyntaxKind4["OutKeyword"] = 145] = "OutKeyword"; - SyntaxKind4[SyntaxKind4["ReadonlyKeyword"] = 146] = "ReadonlyKeyword"; - SyntaxKind4[SyntaxKind4["RequireKeyword"] = 147] = "RequireKeyword"; - SyntaxKind4[SyntaxKind4["NumberKeyword"] = 148] = "NumberKeyword"; - SyntaxKind4[SyntaxKind4["ObjectKeyword"] = 149] = "ObjectKeyword"; - SyntaxKind4[SyntaxKind4["SatisfiesKeyword"] = 150] = "SatisfiesKeyword"; - SyntaxKind4[SyntaxKind4["SetKeyword"] = 151] = "SetKeyword"; - SyntaxKind4[SyntaxKind4["StringKeyword"] = 152] = "StringKeyword"; - SyntaxKind4[SyntaxKind4["SymbolKeyword"] = 153] = "SymbolKeyword"; - SyntaxKind4[SyntaxKind4["TypeKeyword"] = 154] = "TypeKeyword"; - SyntaxKind4[SyntaxKind4["UndefinedKeyword"] = 155] = "UndefinedKeyword"; - SyntaxKind4[SyntaxKind4["UniqueKeyword"] = 156] = "UniqueKeyword"; - SyntaxKind4[SyntaxKind4["UnknownKeyword"] = 157] = "UnknownKeyword"; - SyntaxKind4[SyntaxKind4["FromKeyword"] = 158] = "FromKeyword"; - SyntaxKind4[SyntaxKind4["GlobalKeyword"] = 159] = "GlobalKeyword"; - SyntaxKind4[SyntaxKind4["BigIntKeyword"] = 160] = "BigIntKeyword"; - SyntaxKind4[SyntaxKind4["OverrideKeyword"] = 161] = "OverrideKeyword"; - SyntaxKind4[SyntaxKind4["OfKeyword"] = 162] = "OfKeyword"; - SyntaxKind4[SyntaxKind4["QualifiedName"] = 163] = "QualifiedName"; - SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 164] = "ComputedPropertyName"; - SyntaxKind4[SyntaxKind4["TypeParameter"] = 165] = "TypeParameter"; - SyntaxKind4[SyntaxKind4["Parameter"] = 166] = "Parameter"; - SyntaxKind4[SyntaxKind4["Decorator"] = 167] = "Decorator"; - SyntaxKind4[SyntaxKind4["PropertySignature"] = 168] = "PropertySignature"; - SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 169] = "PropertyDeclaration"; - SyntaxKind4[SyntaxKind4["MethodSignature"] = 170] = "MethodSignature"; - SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 171] = "MethodDeclaration"; - SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 172] = "ClassStaticBlockDeclaration"; - SyntaxKind4[SyntaxKind4["Constructor"] = 173] = "Constructor"; - SyntaxKind4[SyntaxKind4["GetAccessor"] = 174] = "GetAccessor"; - SyntaxKind4[SyntaxKind4["SetAccessor"] = 175] = "SetAccessor"; - SyntaxKind4[SyntaxKind4["CallSignature"] = 176] = "CallSignature"; - SyntaxKind4[SyntaxKind4["ConstructSignature"] = 177] = "ConstructSignature"; - SyntaxKind4[SyntaxKind4["IndexSignature"] = 178] = "IndexSignature"; - SyntaxKind4[SyntaxKind4["TypePredicate"] = 179] = "TypePredicate"; - SyntaxKind4[SyntaxKind4["TypeReference"] = 180] = "TypeReference"; - SyntaxKind4[SyntaxKind4["FunctionType"] = 181] = "FunctionType"; - SyntaxKind4[SyntaxKind4["ConstructorType"] = 182] = "ConstructorType"; - SyntaxKind4[SyntaxKind4["TypeQuery"] = 183] = "TypeQuery"; - SyntaxKind4[SyntaxKind4["TypeLiteral"] = 184] = "TypeLiteral"; - SyntaxKind4[SyntaxKind4["ArrayType"] = 185] = "ArrayType"; - SyntaxKind4[SyntaxKind4["TupleType"] = 186] = "TupleType"; - SyntaxKind4[SyntaxKind4["OptionalType"] = 187] = "OptionalType"; - SyntaxKind4[SyntaxKind4["RestType"] = 188] = "RestType"; - SyntaxKind4[SyntaxKind4["UnionType"] = 189] = "UnionType"; - SyntaxKind4[SyntaxKind4["IntersectionType"] = 190] = "IntersectionType"; - SyntaxKind4[SyntaxKind4["ConditionalType"] = 191] = "ConditionalType"; - SyntaxKind4[SyntaxKind4["InferType"] = 192] = "InferType"; - SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 193] = "ParenthesizedType"; - SyntaxKind4[SyntaxKind4["ThisType"] = 194] = "ThisType"; - SyntaxKind4[SyntaxKind4["TypeOperator"] = 195] = "TypeOperator"; - SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 196] = "IndexedAccessType"; - SyntaxKind4[SyntaxKind4["MappedType"] = 197] = "MappedType"; - SyntaxKind4[SyntaxKind4["LiteralType"] = 198] = "LiteralType"; - SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 199] = "NamedTupleMember"; - SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 200] = "TemplateLiteralType"; - SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 201] = "TemplateLiteralTypeSpan"; - SyntaxKind4[SyntaxKind4["ImportType"] = 202] = "ImportType"; - SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 203] = "ObjectBindingPattern"; - SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 204] = "ArrayBindingPattern"; - SyntaxKind4[SyntaxKind4["BindingElement"] = 205] = "BindingElement"; - SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 206] = "ArrayLiteralExpression"; - SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 207] = "ObjectLiteralExpression"; - SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 208] = "PropertyAccessExpression"; - SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 209] = "ElementAccessExpression"; - SyntaxKind4[SyntaxKind4["CallExpression"] = 210] = "CallExpression"; - SyntaxKind4[SyntaxKind4["NewExpression"] = 211] = "NewExpression"; - SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 212] = "TaggedTemplateExpression"; - SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 213] = "TypeAssertionExpression"; - SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 214] = "ParenthesizedExpression"; - SyntaxKind4[SyntaxKind4["FunctionExpression"] = 215] = "FunctionExpression"; - SyntaxKind4[SyntaxKind4["ArrowFunction"] = 216] = "ArrowFunction"; - SyntaxKind4[SyntaxKind4["DeleteExpression"] = 217] = "DeleteExpression"; - SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 218] = "TypeOfExpression"; - SyntaxKind4[SyntaxKind4["VoidExpression"] = 219] = "VoidExpression"; - SyntaxKind4[SyntaxKind4["AwaitExpression"] = 220] = "AwaitExpression"; - SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 221] = "PrefixUnaryExpression"; - SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 222] = "PostfixUnaryExpression"; - SyntaxKind4[SyntaxKind4["BinaryExpression"] = 223] = "BinaryExpression"; - SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 224] = "ConditionalExpression"; - SyntaxKind4[SyntaxKind4["TemplateExpression"] = 225] = "TemplateExpression"; - SyntaxKind4[SyntaxKind4["YieldExpression"] = 226] = "YieldExpression"; - SyntaxKind4[SyntaxKind4["SpreadElement"] = 227] = "SpreadElement"; - SyntaxKind4[SyntaxKind4["ClassExpression"] = 228] = "ClassExpression"; - SyntaxKind4[SyntaxKind4["OmittedExpression"] = 229] = "OmittedExpression"; - SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 230] = "ExpressionWithTypeArguments"; - SyntaxKind4[SyntaxKind4["AsExpression"] = 231] = "AsExpression"; - SyntaxKind4[SyntaxKind4["NonNullExpression"] = 232] = "NonNullExpression"; - SyntaxKind4[SyntaxKind4["MetaProperty"] = 233] = "MetaProperty"; - SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 234] = "SyntheticExpression"; - SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 235] = "SatisfiesExpression"; - SyntaxKind4[SyntaxKind4["TemplateSpan"] = 236] = "TemplateSpan"; - SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 237] = "SemicolonClassElement"; - SyntaxKind4[SyntaxKind4["Block"] = 238] = "Block"; - SyntaxKind4[SyntaxKind4["EmptyStatement"] = 239] = "EmptyStatement"; - SyntaxKind4[SyntaxKind4["VariableStatement"] = 240] = "VariableStatement"; - SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 241] = "ExpressionStatement"; - SyntaxKind4[SyntaxKind4["IfStatement"] = 242] = "IfStatement"; - SyntaxKind4[SyntaxKind4["DoStatement"] = 243] = "DoStatement"; - SyntaxKind4[SyntaxKind4["WhileStatement"] = 244] = "WhileStatement"; - SyntaxKind4[SyntaxKind4["ForStatement"] = 245] = "ForStatement"; - SyntaxKind4[SyntaxKind4["ForInStatement"] = 246] = "ForInStatement"; - SyntaxKind4[SyntaxKind4["ForOfStatement"] = 247] = "ForOfStatement"; - SyntaxKind4[SyntaxKind4["ContinueStatement"] = 248] = "ContinueStatement"; - SyntaxKind4[SyntaxKind4["BreakStatement"] = 249] = "BreakStatement"; - SyntaxKind4[SyntaxKind4["ReturnStatement"] = 250] = "ReturnStatement"; - SyntaxKind4[SyntaxKind4["WithStatement"] = 251] = "WithStatement"; - SyntaxKind4[SyntaxKind4["SwitchStatement"] = 252] = "SwitchStatement"; - SyntaxKind4[SyntaxKind4["LabeledStatement"] = 253] = "LabeledStatement"; - SyntaxKind4[SyntaxKind4["ThrowStatement"] = 254] = "ThrowStatement"; - SyntaxKind4[SyntaxKind4["TryStatement"] = 255] = "TryStatement"; - SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 256] = "DebuggerStatement"; - SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 257] = "VariableDeclaration"; - SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 258] = "VariableDeclarationList"; - SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 259] = "FunctionDeclaration"; - SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 260] = "ClassDeclaration"; - SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 261] = "InterfaceDeclaration"; - SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 262] = "TypeAliasDeclaration"; - SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 263] = "EnumDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 264] = "ModuleDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleBlock"] = 265] = "ModuleBlock"; - SyntaxKind4[SyntaxKind4["CaseBlock"] = 266] = "CaseBlock"; - SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 267] = "NamespaceExportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 268] = "ImportEqualsDeclaration"; - SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 269] = "ImportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportClause"] = 270] = "ImportClause"; - SyntaxKind4[SyntaxKind4["NamespaceImport"] = 271] = "NamespaceImport"; - SyntaxKind4[SyntaxKind4["NamedImports"] = 272] = "NamedImports"; - SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 273] = "ImportSpecifier"; - SyntaxKind4[SyntaxKind4["ExportAssignment"] = 274] = "ExportAssignment"; - SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 275] = "ExportDeclaration"; - SyntaxKind4[SyntaxKind4["NamedExports"] = 276] = "NamedExports"; - SyntaxKind4[SyntaxKind4["NamespaceExport"] = 277] = "NamespaceExport"; - SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 278] = "ExportSpecifier"; - SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 279] = "MissingDeclaration"; - SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 280] = "ExternalModuleReference"; - SyntaxKind4[SyntaxKind4["JsxElement"] = 281] = "JsxElement"; - SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 282] = "JsxSelfClosingElement"; - SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 283] = "JsxOpeningElement"; - SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 284] = "JsxClosingElement"; - SyntaxKind4[SyntaxKind4["JsxFragment"] = 285] = "JsxFragment"; - SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 286] = "JsxOpeningFragment"; - SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 287] = "JsxClosingFragment"; - SyntaxKind4[SyntaxKind4["JsxAttribute"] = 288] = "JsxAttribute"; - SyntaxKind4[SyntaxKind4["JsxAttributes"] = 289] = "JsxAttributes"; - SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 290] = "JsxSpreadAttribute"; - SyntaxKind4[SyntaxKind4["JsxExpression"] = 291] = "JsxExpression"; - SyntaxKind4[SyntaxKind4["CaseClause"] = 292] = "CaseClause"; - SyntaxKind4[SyntaxKind4["DefaultClause"] = 293] = "DefaultClause"; - SyntaxKind4[SyntaxKind4["HeritageClause"] = 294] = "HeritageClause"; - SyntaxKind4[SyntaxKind4["CatchClause"] = 295] = "CatchClause"; - SyntaxKind4[SyntaxKind4["AssertClause"] = 296] = "AssertClause"; - SyntaxKind4[SyntaxKind4["AssertEntry"] = 297] = "AssertEntry"; - SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 298] = "ImportTypeAssertionContainer"; - SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 299] = "PropertyAssignment"; - SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 300] = "ShorthandPropertyAssignment"; - SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 301] = "SpreadAssignment"; - SyntaxKind4[SyntaxKind4["EnumMember"] = 302] = "EnumMember"; - SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 303] = "UnparsedPrologue"; - SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 304] = "UnparsedPrepend"; - SyntaxKind4[SyntaxKind4["UnparsedText"] = 305] = "UnparsedText"; - SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 306] = "UnparsedInternalText"; - SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 307] = "UnparsedSyntheticReference"; - SyntaxKind4[SyntaxKind4["SourceFile"] = 308] = "SourceFile"; - SyntaxKind4[SyntaxKind4["Bundle"] = 309] = "Bundle"; - SyntaxKind4[SyntaxKind4["UnparsedSource"] = 310] = "UnparsedSource"; - SyntaxKind4[SyntaxKind4["InputFiles"] = 311] = "InputFiles"; - SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 312] = "JSDocTypeExpression"; - SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 313] = "JSDocNameReference"; - SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 314] = "JSDocMemberName"; - SyntaxKind4[SyntaxKind4["JSDocAllType"] = 315] = "JSDocAllType"; - SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 316] = "JSDocUnknownType"; - SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 317] = "JSDocNullableType"; - SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 318] = "JSDocNonNullableType"; - SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 319] = "JSDocOptionalType"; - SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 320] = "JSDocFunctionType"; - SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 321] = "JSDocVariadicType"; - SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 322] = "JSDocNamepathType"; - SyntaxKind4[SyntaxKind4["JSDoc"] = 323] = "JSDoc"; - SyntaxKind4[SyntaxKind4["JSDocComment"] = 323 /* JSDoc */] = "JSDocComment"; - SyntaxKind4[SyntaxKind4["JSDocText"] = 324] = "JSDocText"; - SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 325] = "JSDocTypeLiteral"; - SyntaxKind4[SyntaxKind4["JSDocSignature"] = 326] = "JSDocSignature"; - SyntaxKind4[SyntaxKind4["JSDocLink"] = 327] = "JSDocLink"; - SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 328] = "JSDocLinkCode"; - SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 329] = "JSDocLinkPlain"; - SyntaxKind4[SyntaxKind4["JSDocTag"] = 330] = "JSDocTag"; - SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 331] = "JSDocAugmentsTag"; - SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 332] = "JSDocImplementsTag"; - SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 333] = "JSDocAuthorTag"; - SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 334] = "JSDocDeprecatedTag"; - SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 335] = "JSDocClassTag"; - SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 336] = "JSDocPublicTag"; - SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 337] = "JSDocPrivateTag"; - SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 338] = "JSDocProtectedTag"; - SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 339] = "JSDocReadonlyTag"; - SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 340] = "JSDocOverrideTag"; - SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 341] = "JSDocCallbackTag"; - SyntaxKind4[SyntaxKind4["JSDocOverloadTag"] = 342] = "JSDocOverloadTag"; - SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 343] = "JSDocEnumTag"; - SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 344] = "JSDocParameterTag"; - SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 345] = "JSDocReturnTag"; - SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 346] = "JSDocThisTag"; - SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 347] = "JSDocTypeTag"; - SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 348] = "JSDocTemplateTag"; - SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 349] = "JSDocTypedefTag"; - SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 350] = "JSDocSeeTag"; - SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 351] = "JSDocPropertyTag"; - SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 352] = "JSDocThrowsTag"; - SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag"; - SyntaxKind4[SyntaxKind4["SyntaxList"] = 354] = "SyntaxList"; - SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 355] = "NotEmittedStatement"; - SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression"; - SyntaxKind4[SyntaxKind4["CommaListExpression"] = 357] = "CommaListExpression"; - SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker"; - SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker"; - SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression"; - SyntaxKind4[SyntaxKind4["Count"] = 361] = "Count"; + SyntaxKind4[SyntaxKind4["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken"; + SyntaxKind4[SyntaxKind4["BreakKeyword"] = 82] = "BreakKeyword"; + SyntaxKind4[SyntaxKind4["CaseKeyword"] = 83] = "CaseKeyword"; + SyntaxKind4[SyntaxKind4["CatchKeyword"] = 84] = "CatchKeyword"; + SyntaxKind4[SyntaxKind4["ClassKeyword"] = 85] = "ClassKeyword"; + SyntaxKind4[SyntaxKind4["ConstKeyword"] = 86] = "ConstKeyword"; + SyntaxKind4[SyntaxKind4["ContinueKeyword"] = 87] = "ContinueKeyword"; + SyntaxKind4[SyntaxKind4["DebuggerKeyword"] = 88] = "DebuggerKeyword"; + SyntaxKind4[SyntaxKind4["DefaultKeyword"] = 89] = "DefaultKeyword"; + SyntaxKind4[SyntaxKind4["DeleteKeyword"] = 90] = "DeleteKeyword"; + SyntaxKind4[SyntaxKind4["DoKeyword"] = 91] = "DoKeyword"; + SyntaxKind4[SyntaxKind4["ElseKeyword"] = 92] = "ElseKeyword"; + SyntaxKind4[SyntaxKind4["EnumKeyword"] = 93] = "EnumKeyword"; + SyntaxKind4[SyntaxKind4["ExportKeyword"] = 94] = "ExportKeyword"; + SyntaxKind4[SyntaxKind4["ExtendsKeyword"] = 95] = "ExtendsKeyword"; + SyntaxKind4[SyntaxKind4["FalseKeyword"] = 96] = "FalseKeyword"; + SyntaxKind4[SyntaxKind4["FinallyKeyword"] = 97] = "FinallyKeyword"; + SyntaxKind4[SyntaxKind4["ForKeyword"] = 98] = "ForKeyword"; + SyntaxKind4[SyntaxKind4["FunctionKeyword"] = 99] = "FunctionKeyword"; + SyntaxKind4[SyntaxKind4["IfKeyword"] = 100] = "IfKeyword"; + SyntaxKind4[SyntaxKind4["ImportKeyword"] = 101] = "ImportKeyword"; + SyntaxKind4[SyntaxKind4["InKeyword"] = 102] = "InKeyword"; + SyntaxKind4[SyntaxKind4["InstanceOfKeyword"] = 103] = "InstanceOfKeyword"; + SyntaxKind4[SyntaxKind4["NewKeyword"] = 104] = "NewKeyword"; + SyntaxKind4[SyntaxKind4["NullKeyword"] = 105] = "NullKeyword"; + SyntaxKind4[SyntaxKind4["ReturnKeyword"] = 106] = "ReturnKeyword"; + SyntaxKind4[SyntaxKind4["SuperKeyword"] = 107] = "SuperKeyword"; + SyntaxKind4[SyntaxKind4["SwitchKeyword"] = 108] = "SwitchKeyword"; + SyntaxKind4[SyntaxKind4["ThisKeyword"] = 109] = "ThisKeyword"; + SyntaxKind4[SyntaxKind4["ThrowKeyword"] = 110] = "ThrowKeyword"; + SyntaxKind4[SyntaxKind4["TrueKeyword"] = 111] = "TrueKeyword"; + SyntaxKind4[SyntaxKind4["TryKeyword"] = 112] = "TryKeyword"; + SyntaxKind4[SyntaxKind4["TypeOfKeyword"] = 113] = "TypeOfKeyword"; + SyntaxKind4[SyntaxKind4["VarKeyword"] = 114] = "VarKeyword"; + SyntaxKind4[SyntaxKind4["VoidKeyword"] = 115] = "VoidKeyword"; + SyntaxKind4[SyntaxKind4["WhileKeyword"] = 116] = "WhileKeyword"; + SyntaxKind4[SyntaxKind4["WithKeyword"] = 117] = "WithKeyword"; + SyntaxKind4[SyntaxKind4["ImplementsKeyword"] = 118] = "ImplementsKeyword"; + SyntaxKind4[SyntaxKind4["InterfaceKeyword"] = 119] = "InterfaceKeyword"; + SyntaxKind4[SyntaxKind4["LetKeyword"] = 120] = "LetKeyword"; + SyntaxKind4[SyntaxKind4["PackageKeyword"] = 121] = "PackageKeyword"; + SyntaxKind4[SyntaxKind4["PrivateKeyword"] = 122] = "PrivateKeyword"; + SyntaxKind4[SyntaxKind4["ProtectedKeyword"] = 123] = "ProtectedKeyword"; + SyntaxKind4[SyntaxKind4["PublicKeyword"] = 124] = "PublicKeyword"; + SyntaxKind4[SyntaxKind4["StaticKeyword"] = 125] = "StaticKeyword"; + SyntaxKind4[SyntaxKind4["YieldKeyword"] = 126] = "YieldKeyword"; + SyntaxKind4[SyntaxKind4["AbstractKeyword"] = 127] = "AbstractKeyword"; + SyntaxKind4[SyntaxKind4["AccessorKeyword"] = 128] = "AccessorKeyword"; + SyntaxKind4[SyntaxKind4["AsKeyword"] = 129] = "AsKeyword"; + SyntaxKind4[SyntaxKind4["AssertsKeyword"] = 130] = "AssertsKeyword"; + SyntaxKind4[SyntaxKind4["AssertKeyword"] = 131] = "AssertKeyword"; + SyntaxKind4[SyntaxKind4["AnyKeyword"] = 132] = "AnyKeyword"; + SyntaxKind4[SyntaxKind4["AsyncKeyword"] = 133] = "AsyncKeyword"; + SyntaxKind4[SyntaxKind4["AwaitKeyword"] = 134] = "AwaitKeyword"; + SyntaxKind4[SyntaxKind4["BooleanKeyword"] = 135] = "BooleanKeyword"; + SyntaxKind4[SyntaxKind4["ConstructorKeyword"] = 136] = "ConstructorKeyword"; + SyntaxKind4[SyntaxKind4["DeclareKeyword"] = 137] = "DeclareKeyword"; + SyntaxKind4[SyntaxKind4["GetKeyword"] = 138] = "GetKeyword"; + SyntaxKind4[SyntaxKind4["InferKeyword"] = 139] = "InferKeyword"; + SyntaxKind4[SyntaxKind4["IntrinsicKeyword"] = 140] = "IntrinsicKeyword"; + SyntaxKind4[SyntaxKind4["IsKeyword"] = 141] = "IsKeyword"; + SyntaxKind4[SyntaxKind4["KeyOfKeyword"] = 142] = "KeyOfKeyword"; + SyntaxKind4[SyntaxKind4["ModuleKeyword"] = 143] = "ModuleKeyword"; + SyntaxKind4[SyntaxKind4["NamespaceKeyword"] = 144] = "NamespaceKeyword"; + SyntaxKind4[SyntaxKind4["NeverKeyword"] = 145] = "NeverKeyword"; + SyntaxKind4[SyntaxKind4["OutKeyword"] = 146] = "OutKeyword"; + SyntaxKind4[SyntaxKind4["ReadonlyKeyword"] = 147] = "ReadonlyKeyword"; + SyntaxKind4[SyntaxKind4["RequireKeyword"] = 148] = "RequireKeyword"; + SyntaxKind4[SyntaxKind4["NumberKeyword"] = 149] = "NumberKeyword"; + SyntaxKind4[SyntaxKind4["ObjectKeyword"] = 150] = "ObjectKeyword"; + SyntaxKind4[SyntaxKind4["SatisfiesKeyword"] = 151] = "SatisfiesKeyword"; + SyntaxKind4[SyntaxKind4["SetKeyword"] = 152] = "SetKeyword"; + SyntaxKind4[SyntaxKind4["StringKeyword"] = 153] = "StringKeyword"; + SyntaxKind4[SyntaxKind4["SymbolKeyword"] = 154] = "SymbolKeyword"; + SyntaxKind4[SyntaxKind4["TypeKeyword"] = 155] = "TypeKeyword"; + SyntaxKind4[SyntaxKind4["UndefinedKeyword"] = 156] = "UndefinedKeyword"; + SyntaxKind4[SyntaxKind4["UniqueKeyword"] = 157] = "UniqueKeyword"; + SyntaxKind4[SyntaxKind4["UnknownKeyword"] = 158] = "UnknownKeyword"; + SyntaxKind4[SyntaxKind4["FromKeyword"] = 159] = "FromKeyword"; + SyntaxKind4[SyntaxKind4["GlobalKeyword"] = 160] = "GlobalKeyword"; + SyntaxKind4[SyntaxKind4["BigIntKeyword"] = 161] = "BigIntKeyword"; + SyntaxKind4[SyntaxKind4["OverrideKeyword"] = 162] = "OverrideKeyword"; + SyntaxKind4[SyntaxKind4["OfKeyword"] = 163] = "OfKeyword"; + SyntaxKind4[SyntaxKind4["QualifiedName"] = 164] = "QualifiedName"; + SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 165] = "ComputedPropertyName"; + SyntaxKind4[SyntaxKind4["TypeParameter"] = 166] = "TypeParameter"; + SyntaxKind4[SyntaxKind4["Parameter"] = 167] = "Parameter"; + SyntaxKind4[SyntaxKind4["Decorator"] = 168] = "Decorator"; + SyntaxKind4[SyntaxKind4["PropertySignature"] = 169] = "PropertySignature"; + SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 170] = "PropertyDeclaration"; + SyntaxKind4[SyntaxKind4["MethodSignature"] = 171] = "MethodSignature"; + SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 172] = "MethodDeclaration"; + SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 173] = "ClassStaticBlockDeclaration"; + SyntaxKind4[SyntaxKind4["Constructor"] = 174] = "Constructor"; + SyntaxKind4[SyntaxKind4["GetAccessor"] = 175] = "GetAccessor"; + SyntaxKind4[SyntaxKind4["SetAccessor"] = 176] = "SetAccessor"; + SyntaxKind4[SyntaxKind4["CallSignature"] = 177] = "CallSignature"; + SyntaxKind4[SyntaxKind4["ConstructSignature"] = 178] = "ConstructSignature"; + SyntaxKind4[SyntaxKind4["IndexSignature"] = 179] = "IndexSignature"; + SyntaxKind4[SyntaxKind4["TypePredicate"] = 180] = "TypePredicate"; + SyntaxKind4[SyntaxKind4["TypeReference"] = 181] = "TypeReference"; + SyntaxKind4[SyntaxKind4["FunctionType"] = 182] = "FunctionType"; + SyntaxKind4[SyntaxKind4["ConstructorType"] = 183] = "ConstructorType"; + SyntaxKind4[SyntaxKind4["TypeQuery"] = 184] = "TypeQuery"; + SyntaxKind4[SyntaxKind4["TypeLiteral"] = 185] = "TypeLiteral"; + SyntaxKind4[SyntaxKind4["ArrayType"] = 186] = "ArrayType"; + SyntaxKind4[SyntaxKind4["TupleType"] = 187] = "TupleType"; + SyntaxKind4[SyntaxKind4["OptionalType"] = 188] = "OptionalType"; + SyntaxKind4[SyntaxKind4["RestType"] = 189] = "RestType"; + SyntaxKind4[SyntaxKind4["UnionType"] = 190] = "UnionType"; + SyntaxKind4[SyntaxKind4["IntersectionType"] = 191] = "IntersectionType"; + SyntaxKind4[SyntaxKind4["ConditionalType"] = 192] = "ConditionalType"; + SyntaxKind4[SyntaxKind4["InferType"] = 193] = "InferType"; + SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 194] = "ParenthesizedType"; + SyntaxKind4[SyntaxKind4["ThisType"] = 195] = "ThisType"; + SyntaxKind4[SyntaxKind4["TypeOperator"] = 196] = "TypeOperator"; + SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 197] = "IndexedAccessType"; + SyntaxKind4[SyntaxKind4["MappedType"] = 198] = "MappedType"; + SyntaxKind4[SyntaxKind4["LiteralType"] = 199] = "LiteralType"; + SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 200] = "NamedTupleMember"; + SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 201] = "TemplateLiteralType"; + SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 202] = "TemplateLiteralTypeSpan"; + SyntaxKind4[SyntaxKind4["ImportType"] = 203] = "ImportType"; + SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 204] = "ObjectBindingPattern"; + SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 205] = "ArrayBindingPattern"; + SyntaxKind4[SyntaxKind4["BindingElement"] = 206] = "BindingElement"; + SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 207] = "ArrayLiteralExpression"; + SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 208] = "ObjectLiteralExpression"; + SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 209] = "PropertyAccessExpression"; + SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 210] = "ElementAccessExpression"; + SyntaxKind4[SyntaxKind4["CallExpression"] = 211] = "CallExpression"; + SyntaxKind4[SyntaxKind4["NewExpression"] = 212] = "NewExpression"; + SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 213] = "TaggedTemplateExpression"; + SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 214] = "TypeAssertionExpression"; + SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 215] = "ParenthesizedExpression"; + SyntaxKind4[SyntaxKind4["FunctionExpression"] = 216] = "FunctionExpression"; + SyntaxKind4[SyntaxKind4["ArrowFunction"] = 217] = "ArrowFunction"; + SyntaxKind4[SyntaxKind4["DeleteExpression"] = 218] = "DeleteExpression"; + SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 219] = "TypeOfExpression"; + SyntaxKind4[SyntaxKind4["VoidExpression"] = 220] = "VoidExpression"; + SyntaxKind4[SyntaxKind4["AwaitExpression"] = 221] = "AwaitExpression"; + SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 222] = "PrefixUnaryExpression"; + SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 223] = "PostfixUnaryExpression"; + SyntaxKind4[SyntaxKind4["BinaryExpression"] = 224] = "BinaryExpression"; + SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 225] = "ConditionalExpression"; + SyntaxKind4[SyntaxKind4["TemplateExpression"] = 226] = "TemplateExpression"; + SyntaxKind4[SyntaxKind4["YieldExpression"] = 227] = "YieldExpression"; + SyntaxKind4[SyntaxKind4["SpreadElement"] = 228] = "SpreadElement"; + SyntaxKind4[SyntaxKind4["ClassExpression"] = 229] = "ClassExpression"; + SyntaxKind4[SyntaxKind4["OmittedExpression"] = 230] = "OmittedExpression"; + SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 231] = "ExpressionWithTypeArguments"; + SyntaxKind4[SyntaxKind4["AsExpression"] = 232] = "AsExpression"; + SyntaxKind4[SyntaxKind4["NonNullExpression"] = 233] = "NonNullExpression"; + SyntaxKind4[SyntaxKind4["MetaProperty"] = 234] = "MetaProperty"; + SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 235] = "SyntheticExpression"; + SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 236] = "SatisfiesExpression"; + SyntaxKind4[SyntaxKind4["TemplateSpan"] = 237] = "TemplateSpan"; + SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 238] = "SemicolonClassElement"; + SyntaxKind4[SyntaxKind4["Block"] = 239] = "Block"; + SyntaxKind4[SyntaxKind4["EmptyStatement"] = 240] = "EmptyStatement"; + SyntaxKind4[SyntaxKind4["VariableStatement"] = 241] = "VariableStatement"; + SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 242] = "ExpressionStatement"; + SyntaxKind4[SyntaxKind4["IfStatement"] = 243] = "IfStatement"; + SyntaxKind4[SyntaxKind4["DoStatement"] = 244] = "DoStatement"; + SyntaxKind4[SyntaxKind4["WhileStatement"] = 245] = "WhileStatement"; + SyntaxKind4[SyntaxKind4["ForStatement"] = 246] = "ForStatement"; + SyntaxKind4[SyntaxKind4["ForInStatement"] = 247] = "ForInStatement"; + SyntaxKind4[SyntaxKind4["ForOfStatement"] = 248] = "ForOfStatement"; + SyntaxKind4[SyntaxKind4["ContinueStatement"] = 249] = "ContinueStatement"; + SyntaxKind4[SyntaxKind4["BreakStatement"] = 250] = "BreakStatement"; + SyntaxKind4[SyntaxKind4["ReturnStatement"] = 251] = "ReturnStatement"; + SyntaxKind4[SyntaxKind4["WithStatement"] = 252] = "WithStatement"; + SyntaxKind4[SyntaxKind4["SwitchStatement"] = 253] = "SwitchStatement"; + SyntaxKind4[SyntaxKind4["LabeledStatement"] = 254] = "LabeledStatement"; + SyntaxKind4[SyntaxKind4["ThrowStatement"] = 255] = "ThrowStatement"; + SyntaxKind4[SyntaxKind4["TryStatement"] = 256] = "TryStatement"; + SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 257] = "DebuggerStatement"; + SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 258] = "VariableDeclaration"; + SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 259] = "VariableDeclarationList"; + SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 260] = "FunctionDeclaration"; + SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 261] = "ClassDeclaration"; + SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 262] = "InterfaceDeclaration"; + SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 263] = "TypeAliasDeclaration"; + SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 264] = "EnumDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 265] = "ModuleDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleBlock"] = 266] = "ModuleBlock"; + SyntaxKind4[SyntaxKind4["CaseBlock"] = 267] = "CaseBlock"; + SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 268] = "NamespaceExportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 269] = "ImportEqualsDeclaration"; + SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 270] = "ImportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportClause"] = 271] = "ImportClause"; + SyntaxKind4[SyntaxKind4["NamespaceImport"] = 272] = "NamespaceImport"; + SyntaxKind4[SyntaxKind4["NamedImports"] = 273] = "NamedImports"; + SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 274] = "ImportSpecifier"; + SyntaxKind4[SyntaxKind4["ExportAssignment"] = 275] = "ExportAssignment"; + SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 276] = "ExportDeclaration"; + SyntaxKind4[SyntaxKind4["NamedExports"] = 277] = "NamedExports"; + SyntaxKind4[SyntaxKind4["NamespaceExport"] = 278] = "NamespaceExport"; + SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 279] = "ExportSpecifier"; + SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 280] = "MissingDeclaration"; + SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 281] = "ExternalModuleReference"; + SyntaxKind4[SyntaxKind4["JsxElement"] = 282] = "JsxElement"; + SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 283] = "JsxSelfClosingElement"; + SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 284] = "JsxOpeningElement"; + SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 285] = "JsxClosingElement"; + SyntaxKind4[SyntaxKind4["JsxFragment"] = 286] = "JsxFragment"; + SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 287] = "JsxOpeningFragment"; + SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 288] = "JsxClosingFragment"; + SyntaxKind4[SyntaxKind4["JsxAttribute"] = 289] = "JsxAttribute"; + SyntaxKind4[SyntaxKind4["JsxAttributes"] = 290] = "JsxAttributes"; + SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 291] = "JsxSpreadAttribute"; + SyntaxKind4[SyntaxKind4["JsxExpression"] = 292] = "JsxExpression"; + SyntaxKind4[SyntaxKind4["CaseClause"] = 293] = "CaseClause"; + SyntaxKind4[SyntaxKind4["DefaultClause"] = 294] = "DefaultClause"; + SyntaxKind4[SyntaxKind4["HeritageClause"] = 295] = "HeritageClause"; + SyntaxKind4[SyntaxKind4["CatchClause"] = 296] = "CatchClause"; + SyntaxKind4[SyntaxKind4["AssertClause"] = 297] = "AssertClause"; + SyntaxKind4[SyntaxKind4["AssertEntry"] = 298] = "AssertEntry"; + SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 299] = "ImportTypeAssertionContainer"; + SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 300] = "PropertyAssignment"; + SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 301] = "ShorthandPropertyAssignment"; + SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 302] = "SpreadAssignment"; + SyntaxKind4[SyntaxKind4["EnumMember"] = 303] = "EnumMember"; + SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 304] = "UnparsedPrologue"; + SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 305] = "UnparsedPrepend"; + SyntaxKind4[SyntaxKind4["UnparsedText"] = 306] = "UnparsedText"; + SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 307] = "UnparsedInternalText"; + SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 308] = "UnparsedSyntheticReference"; + SyntaxKind4[SyntaxKind4["SourceFile"] = 309] = "SourceFile"; + SyntaxKind4[SyntaxKind4["Bundle"] = 310] = "Bundle"; + SyntaxKind4[SyntaxKind4["UnparsedSource"] = 311] = "UnparsedSource"; + SyntaxKind4[SyntaxKind4["InputFiles"] = 312] = "InputFiles"; + SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 313] = "JSDocTypeExpression"; + SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 314] = "JSDocNameReference"; + SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 315] = "JSDocMemberName"; + SyntaxKind4[SyntaxKind4["JSDocAllType"] = 316] = "JSDocAllType"; + SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 317] = "JSDocUnknownType"; + SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 318] = "JSDocNullableType"; + SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 319] = "JSDocNonNullableType"; + SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 320] = "JSDocOptionalType"; + SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 321] = "JSDocFunctionType"; + SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 322] = "JSDocVariadicType"; + SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 323] = "JSDocNamepathType"; + SyntaxKind4[SyntaxKind4["JSDoc"] = 324] = "JSDoc"; + SyntaxKind4[SyntaxKind4["JSDocComment"] = 324 /* JSDoc */] = "JSDocComment"; + SyntaxKind4[SyntaxKind4["JSDocText"] = 325] = "JSDocText"; + SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 326] = "JSDocTypeLiteral"; + SyntaxKind4[SyntaxKind4["JSDocSignature"] = 327] = "JSDocSignature"; + SyntaxKind4[SyntaxKind4["JSDocLink"] = 328] = "JSDocLink"; + SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 329] = "JSDocLinkCode"; + SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 330] = "JSDocLinkPlain"; + SyntaxKind4[SyntaxKind4["JSDocTag"] = 331] = "JSDocTag"; + SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 332] = "JSDocAugmentsTag"; + SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 333] = "JSDocImplementsTag"; + SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 334] = "JSDocAuthorTag"; + SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 335] = "JSDocDeprecatedTag"; + SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 336] = "JSDocClassTag"; + SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 337] = "JSDocPublicTag"; + SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 338] = "JSDocPrivateTag"; + SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 339] = "JSDocProtectedTag"; + SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 340] = "JSDocReadonlyTag"; + SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 341] = "JSDocOverrideTag"; + SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 342] = "JSDocCallbackTag"; + SyntaxKind4[SyntaxKind4["JSDocOverloadTag"] = 343] = "JSDocOverloadTag"; + SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 344] = "JSDocEnumTag"; + SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 345] = "JSDocParameterTag"; + SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 346] = "JSDocReturnTag"; + SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 347] = "JSDocThisTag"; + SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 348] = "JSDocTypeTag"; + SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 349] = "JSDocTemplateTag"; + SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 350] = "JSDocTypedefTag"; + SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 351] = "JSDocSeeTag"; + SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 352] = "JSDocPropertyTag"; + SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 353] = "JSDocThrowsTag"; + SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 354] = "JSDocSatisfiesTag"; + SyntaxKind4[SyntaxKind4["SyntaxList"] = 355] = "SyntaxList"; + SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 356] = "NotEmittedStatement"; + SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 357] = "PartiallyEmittedExpression"; + SyntaxKind4[SyntaxKind4["CommaListExpression"] = 358] = "CommaListExpression"; + SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 359] = "MergeDeclarationMarker"; + SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 360] = "EndOfDeclarationMarker"; + SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression"; + SyntaxKind4[SyntaxKind4["Count"] = 362] = "Count"; SyntaxKind4[SyntaxKind4["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment"; SyntaxKind4[SyntaxKind4["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment"; SyntaxKind4[SyntaxKind4["LastCompoundAssignment"] = 78 /* CaretEqualsToken */] = "LastCompoundAssignment"; - SyntaxKind4[SyntaxKind4["FirstReservedWord"] = 81 /* BreakKeyword */] = "FirstReservedWord"; - SyntaxKind4[SyntaxKind4["LastReservedWord"] = 116 /* WithKeyword */] = "LastReservedWord"; - SyntaxKind4[SyntaxKind4["FirstKeyword"] = 81 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind4[SyntaxKind4["LastKeyword"] = 162 /* OfKeyword */] = "LastKeyword"; - SyntaxKind4[SyntaxKind4["FirstFutureReservedWord"] = 117 /* ImplementsKeyword */] = "FirstFutureReservedWord"; - SyntaxKind4[SyntaxKind4["LastFutureReservedWord"] = 125 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 179 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind4[SyntaxKind4["LastTypeNode"] = 202 /* ImportType */] = "LastTypeNode"; + SyntaxKind4[SyntaxKind4["FirstReservedWord"] = 82 /* BreakKeyword */] = "FirstReservedWord"; + SyntaxKind4[SyntaxKind4["LastReservedWord"] = 117 /* WithKeyword */] = "LastReservedWord"; + SyntaxKind4[SyntaxKind4["FirstKeyword"] = 82 /* BreakKeyword */] = "FirstKeyword"; + SyntaxKind4[SyntaxKind4["LastKeyword"] = 163 /* OfKeyword */] = "LastKeyword"; + SyntaxKind4[SyntaxKind4["FirstFutureReservedWord"] = 118 /* ImplementsKeyword */] = "FirstFutureReservedWord"; + SyntaxKind4[SyntaxKind4["LastFutureReservedWord"] = 126 /* YieldKeyword */] = "LastFutureReservedWord"; + SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 180 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind4[SyntaxKind4["LastTypeNode"] = 203 /* ImportType */] = "LastTypeNode"; SyntaxKind4[SyntaxKind4["FirstPunctuation"] = 18 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind4[SyntaxKind4["LastPunctuation"] = 78 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind4[SyntaxKind4["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind4[SyntaxKind4["LastToken"] = 162 /* LastKeyword */] = "LastToken"; + SyntaxKind4[SyntaxKind4["LastToken"] = 163 /* LastKeyword */] = "LastToken"; SyntaxKind4[SyntaxKind4["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind4[SyntaxKind4["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind4[SyntaxKind4["FirstLiteralToken"] = 8 /* NumericLiteral */] = "FirstLiteralToken"; @@ -2904,15 +2905,15 @@ SyntaxKind4[SyntaxKind4["LastTemplateToken"] = 17 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind4[SyntaxKind4["FirstBinaryOperator"] = 29 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind4[SyntaxKind4["LastBinaryOperator"] = 78 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind4[SyntaxKind4["FirstStatement"] = 240 /* VariableStatement */] = "FirstStatement"; - SyntaxKind4[SyntaxKind4["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind4[SyntaxKind4["FirstNode"] = 163 /* QualifiedName */] = "FirstNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; - SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind4[SyntaxKind4["FirstStatement"] = 241 /* VariableStatement */] = "FirstStatement"; + SyntaxKind4[SyntaxKind4["LastStatement"] = 257 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind4[SyntaxKind4["FirstNode"] = 164 /* QualifiedName */] = "FirstNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 313 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 354 /* JSDocSatisfiesTag */] = "LastJSDocNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 331 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 354 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; + SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 127 /* AbstractKeyword */] = "FirstContextualKeyword"; + SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 163 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind4; })(SyntaxKind || {}); var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { @@ -3121,7 +3122,6 @@ TypeFlags2[TypeFlags2["DefinitelyFalsy"] = 117632] = "DefinitelyFalsy"; TypeFlags2[TypeFlags2["PossiblyFalsy"] = 117724] = "PossiblyFalsy"; TypeFlags2[TypeFlags2["Intrinsic"] = 67359327] = "Intrinsic"; - TypeFlags2[TypeFlags2["Primitive"] = 134348796] = "Primitive"; TypeFlags2[TypeFlags2["StringLike"] = 402653316] = "StringLike"; TypeFlags2[TypeFlags2["NumberLike"] = 296] = "NumberLike"; TypeFlags2[TypeFlags2["BigIntLike"] = 2112] = "BigIntLike"; @@ -3129,6 +3129,7 @@ TypeFlags2[TypeFlags2["EnumLike"] = 1056] = "EnumLike"; TypeFlags2[TypeFlags2["ESSymbolLike"] = 12288] = "ESSymbolLike"; TypeFlags2[TypeFlags2["VoidLike"] = 49152] = "VoidLike"; + TypeFlags2[TypeFlags2["Primitive"] = 402784252] = "Primitive"; TypeFlags2[TypeFlags2["DefinitelyNonNullable"] = 470302716] = "DefinitelyNonNullable"; TypeFlags2[TypeFlags2["DisjointDomains"] = 469892092] = "DisjointDomains"; TypeFlags2[TypeFlags2["UnionOrIntersection"] = 3145728] = "UnionOrIntersection"; @@ -3142,7 +3143,7 @@ TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable"; TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton"; TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable"; - TypeFlags2[TypeFlags2["IncludesMask"] = 205258751] = "IncludesMask"; + TypeFlags2[TypeFlags2["IncludesMask"] = 473694207] = "IncludesMask"; TypeFlags2[TypeFlags2["IncludesMissingType"] = 262144 /* TypeParameter */] = "IncludesMissingType"; TypeFlags2[TypeFlags2["IncludesNonWideningType"] = 4194304 /* Index */] = "IncludesNonWideningType"; TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard"; @@ -3216,6 +3217,7 @@ })(DiagnosticCategory || {}); var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => { ModuleResolutionKind2[ModuleResolutionKind2["Classic"] = 1] = "Classic"; + ModuleResolutionKind2[ModuleResolutionKind2["NodeJs"] = 2] = "NodeJs"; ModuleResolutionKind2[ModuleResolutionKind2["Node10"] = 2] = "Node10"; ModuleResolutionKind2[ModuleResolutionKind2["Node16"] = 3] = "Node16"; ModuleResolutionKind2[ModuleResolutionKind2["NodeNext"] = 99] = "NodeNext"; @@ -6210,12 +6212,14 @@ Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."), An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."), Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."), - Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecat_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), - Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."), + Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), + Option_0_has_been_removed_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."), Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."), Option_0_is_redundant_and_cannot_be_specified_with_option_1: diag(5104, 1 /* Error */, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."), Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: diag(5105, 1 /* Error */, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."), Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), + Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), + Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -7155,88 +7159,88 @@ return token === 31 /* GreaterThanToken */ || tokenIsIdentifierOrKeyword(token); } var textToKeywordObj = { - abstract: 126 /* AbstractKeyword */, - accessor: 127 /* AccessorKeyword */, - any: 131 /* AnyKeyword */, - as: 128 /* AsKeyword */, - asserts: 129 /* AssertsKeyword */, - assert: 130 /* AssertKeyword */, - bigint: 160 /* BigIntKeyword */, - boolean: 134 /* BooleanKeyword */, - break: 81 /* BreakKeyword */, - case: 82 /* CaseKeyword */, - catch: 83 /* CatchKeyword */, - class: 84 /* ClassKeyword */, - continue: 86 /* ContinueKeyword */, - const: 85 /* ConstKeyword */, - ["constructor"]: 135 /* ConstructorKeyword */, - debugger: 87 /* DebuggerKeyword */, - declare: 136 /* DeclareKeyword */, - default: 88 /* DefaultKeyword */, - delete: 89 /* DeleteKeyword */, - do: 90 /* DoKeyword */, - else: 91 /* ElseKeyword */, - enum: 92 /* EnumKeyword */, - export: 93 /* ExportKeyword */, - extends: 94 /* ExtendsKeyword */, - false: 95 /* FalseKeyword */, - finally: 96 /* FinallyKeyword */, - for: 97 /* ForKeyword */, - from: 158 /* FromKeyword */, - function: 98 /* FunctionKeyword */, - get: 137 /* GetKeyword */, - if: 99 /* IfKeyword */, - implements: 117 /* ImplementsKeyword */, - import: 100 /* ImportKeyword */, - in: 101 /* InKeyword */, - infer: 138 /* InferKeyword */, - instanceof: 102 /* InstanceOfKeyword */, - interface: 118 /* InterfaceKeyword */, - intrinsic: 139 /* IntrinsicKeyword */, - is: 140 /* IsKeyword */, - keyof: 141 /* KeyOfKeyword */, - let: 119 /* LetKeyword */, - module: 142 /* ModuleKeyword */, - namespace: 143 /* NamespaceKeyword */, - never: 144 /* NeverKeyword */, - new: 103 /* NewKeyword */, - null: 104 /* NullKeyword */, - number: 148 /* NumberKeyword */, - object: 149 /* ObjectKeyword */, - package: 120 /* PackageKeyword */, - private: 121 /* PrivateKeyword */, - protected: 122 /* ProtectedKeyword */, - public: 123 /* PublicKeyword */, - override: 161 /* OverrideKeyword */, - out: 145 /* OutKeyword */, - readonly: 146 /* ReadonlyKeyword */, - require: 147 /* RequireKeyword */, - global: 159 /* GlobalKeyword */, - return: 105 /* ReturnKeyword */, - satisfies: 150 /* SatisfiesKeyword */, - set: 151 /* SetKeyword */, - static: 124 /* StaticKeyword */, - string: 152 /* StringKeyword */, - super: 106 /* SuperKeyword */, - switch: 107 /* SwitchKeyword */, - symbol: 153 /* SymbolKeyword */, - this: 108 /* ThisKeyword */, - throw: 109 /* ThrowKeyword */, - true: 110 /* TrueKeyword */, - try: 111 /* TryKeyword */, - type: 154 /* TypeKeyword */, - typeof: 112 /* TypeOfKeyword */, - undefined: 155 /* UndefinedKeyword */, - unique: 156 /* UniqueKeyword */, - unknown: 157 /* UnknownKeyword */, - var: 113 /* VarKeyword */, - void: 114 /* VoidKeyword */, - while: 115 /* WhileKeyword */, - with: 116 /* WithKeyword */, - yield: 125 /* YieldKeyword */, - async: 132 /* AsyncKeyword */, - await: 133 /* AwaitKeyword */, - of: 162 /* OfKeyword */ + abstract: 127 /* AbstractKeyword */, + accessor: 128 /* AccessorKeyword */, + any: 132 /* AnyKeyword */, + as: 129 /* AsKeyword */, + asserts: 130 /* AssertsKeyword */, + assert: 131 /* AssertKeyword */, + bigint: 161 /* BigIntKeyword */, + boolean: 135 /* BooleanKeyword */, + break: 82 /* BreakKeyword */, + case: 83 /* CaseKeyword */, + catch: 84 /* CatchKeyword */, + class: 85 /* ClassKeyword */, + continue: 87 /* ContinueKeyword */, + const: 86 /* ConstKeyword */, + ["constructor"]: 136 /* ConstructorKeyword */, + debugger: 88 /* DebuggerKeyword */, + declare: 137 /* DeclareKeyword */, + default: 89 /* DefaultKeyword */, + delete: 90 /* DeleteKeyword */, + do: 91 /* DoKeyword */, + else: 92 /* ElseKeyword */, + enum: 93 /* EnumKeyword */, + export: 94 /* ExportKeyword */, + extends: 95 /* ExtendsKeyword */, + false: 96 /* FalseKeyword */, + finally: 97 /* FinallyKeyword */, + for: 98 /* ForKeyword */, + from: 159 /* FromKeyword */, + function: 99 /* FunctionKeyword */, + get: 138 /* GetKeyword */, + if: 100 /* IfKeyword */, + implements: 118 /* ImplementsKeyword */, + import: 101 /* ImportKeyword */, + in: 102 /* InKeyword */, + infer: 139 /* InferKeyword */, + instanceof: 103 /* InstanceOfKeyword */, + interface: 119 /* InterfaceKeyword */, + intrinsic: 140 /* IntrinsicKeyword */, + is: 141 /* IsKeyword */, + keyof: 142 /* KeyOfKeyword */, + let: 120 /* LetKeyword */, + module: 143 /* ModuleKeyword */, + namespace: 144 /* NamespaceKeyword */, + never: 145 /* NeverKeyword */, + new: 104 /* NewKeyword */, + null: 105 /* NullKeyword */, + number: 149 /* NumberKeyword */, + object: 150 /* ObjectKeyword */, + package: 121 /* PackageKeyword */, + private: 122 /* PrivateKeyword */, + protected: 123 /* ProtectedKeyword */, + public: 124 /* PublicKeyword */, + override: 162 /* OverrideKeyword */, + out: 146 /* OutKeyword */, + readonly: 147 /* ReadonlyKeyword */, + require: 148 /* RequireKeyword */, + global: 160 /* GlobalKeyword */, + return: 106 /* ReturnKeyword */, + satisfies: 151 /* SatisfiesKeyword */, + set: 152 /* SetKeyword */, + static: 125 /* StaticKeyword */, + string: 153 /* StringKeyword */, + super: 107 /* SuperKeyword */, + switch: 108 /* SwitchKeyword */, + symbol: 154 /* SymbolKeyword */, + this: 109 /* ThisKeyword */, + throw: 110 /* ThrowKeyword */, + true: 111 /* TrueKeyword */, + try: 112 /* TryKeyword */, + type: 155 /* TypeKeyword */, + typeof: 113 /* TypeOfKeyword */, + undefined: 156 /* UndefinedKeyword */, + unique: 157 /* UniqueKeyword */, + unknown: 158 /* UnknownKeyword */, + var: 114 /* VarKeyword */, + void: 115 /* VoidKeyword */, + while: 116 /* WhileKeyword */, + with: 117 /* WithKeyword */, + yield: 126 /* YieldKeyword */, + async: 133 /* AsyncKeyword */, + await: 134 /* AwaitKeyword */, + of: 163 /* OfKeyword */ }; var textToKeyword = new Map(Object.entries(textToKeywordObj)); var textToToken = new Map(Object.entries({ @@ -7732,8 +7736,8 @@ var text = textInitial; var pos; var end; - var startPos; - var tokenPos; + var fullStartPos; + var tokenStart; var token; var tokenValue; var tokenFlags; @@ -7741,18 +7745,21 @@ var inJSDocType = 0; setText(text, start, length2); var scanner = { - getStartPos: () => startPos, + getTokenFullStart: () => fullStartPos, + getStartPos: () => fullStartPos, + getTokenEnd: () => pos, getTextPos: () => pos, getToken: () => token, - getTokenPos: () => tokenPos, - getTokenText: () => text.substring(tokenPos, pos), + getTokenStart: () => tokenStart, + getTokenPos: () => tokenStart, + getTokenText: () => text.substring(tokenStart, pos), getTokenValue: () => tokenValue, hasUnicodeEscape: () => (tokenFlags & 1024 /* UnicodeEscape */) !== 0, hasExtendedUnicodeEscape: () => (tokenFlags & 8 /* ExtendedUnicodeEscape */) !== 0, hasPrecedingLineBreak: () => (tokenFlags & 1 /* PrecedingLineBreak */) !== 0, hasPrecedingJSDocComment: () => (tokenFlags & 2 /* PrecedingJSDocComment */) !== 0, - isIdentifier: () => token === 79 /* Identifier */ || token > 116 /* LastReservedWord */, - isReservedWord: () => token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */, + isIdentifier: () => token === 79 /* Identifier */ || token > 117 /* LastReservedWord */, + isReservedWord: () => token >= 82 /* FirstReservedWord */ && token <= 117 /* LastReservedWord */, isUnterminated: () => (tokenFlags & 4 /* Unterminated */) !== 0, getCommentDirectives: () => commentDirectives, getNumericLiteralFlags: () => tokenFlags & 1008 /* NumericLiteralFlags */, @@ -7772,6 +7779,7 @@ reScanInvalidIdentifier, scanJsxToken, scanJsDocToken, + scanJSDocCommentTextToken, scan, getText, clearCommentDirectives, @@ -7779,7 +7787,8 @@ setScriptTarget, setLanguageVariant, setOnError, - setTextPos, + resetTokenState, + setTextPos: resetTokenState, setInJSDocType, tryScan, lookAhead, @@ -7789,7 +7798,7 @@ Object.defineProperty(scanner, "__debugShowCurrentPositionInText", { get: () => { const text2 = scanner.getText(); - return text2.slice(0, scanner.getStartPos()) + "\u2551" + text2.slice(scanner.getStartPos()); + return text2.slice(0, scanner.getTokenFullStart()) + "\u2551" + text2.slice(scanner.getTokenFullStart()); } }); } @@ -8312,11 +8321,11 @@ } } function scan() { - startPos = pos; + fullStartPos = pos; tokenFlags = 0 /* None */; let asteriskSeen = false; while (true) { - tokenPos = pos; + tokenStart = pos; if (pos >= end) { return token = 1 /* EndOfFileToken */; } @@ -8475,9 +8484,9 @@ } commentDirectives = appendIfCommentDirective( commentDirectives, - text.slice(tokenPos, pos), + text.slice(tokenStart, pos), commentDirectiveRegExSingleLine, - tokenPos + tokenStart ); if (skipTrivia2) { continue; @@ -8491,7 +8500,7 @@ tokenFlags |= 2 /* PrecedingJSDocComment */; } let commentClosed = false; - let lastLineStart = tokenPos; + let lastLineStart = tokenStart; while (pos < end) { const ch2 = text.charCodeAt(pos); if (ch2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { @@ -8769,7 +8778,7 @@ } function reScanInvalidIdentifier() { Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."); - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; tokenFlags = 0; const ch = codePointAt(text, pos); const identifierKind = scanIdentifier(ch, 99 /* ESNext */); @@ -8785,7 +8794,7 @@ pos += charSize(ch); while (pos < end && isIdentifierPart(ch = codePointAt(text, pos), languageVersion2)) pos += charSize(ch); - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } @@ -8816,12 +8825,12 @@ } function reScanAsteriskEqualsToken() { Debug.assert(token === 66 /* AsteriskEqualsToken */, "'reScanAsteriskEqualsToken' should only be called on a '*='"); - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 63 /* EqualsToken */; } function reScanSlashToken() { if (token === 43 /* SlashToken */ || token === 68 /* SlashEqualsToken */) { - let p = tokenPos + 1; + let p = tokenStart + 1; let inEscape = false; let inCharacterClass = false; while (true) { @@ -8854,7 +8863,7 @@ p++; } pos = p; - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); token = 13 /* RegularExpressionLiteral */; } return token; @@ -8887,41 +8896,41 @@ } function reScanTemplateToken(isTaggedTemplate) { Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); - pos = tokenPos; + pos = tokenStart; return token = scanTemplateAndSetTokenValue(isTaggedTemplate); } function reScanTemplateHeadOrNoSubstitutionTemplate() { - pos = tokenPos; + pos = tokenStart; return token = scanTemplateAndSetTokenValue( /* isTaggedTemplate */ true ); } function reScanJsxToken(allowMultilineJsxText = true) { - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; return token = scanJsxToken(allowMultilineJsxText); } function reScanLessThanToken() { if (token === 47 /* LessThanLessThanToken */) { - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 29 /* LessThanToken */; } return token; } function reScanHashToken() { if (token === 80 /* PrivateIdentifier */) { - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 62 /* HashToken */; } return token; } function reScanQuestionToken() { Debug.assert(token === 60 /* QuestionQuestionToken */, "'reScanQuestionToken' should only be called on a '??'"); - pos = tokenPos + 1; + pos = tokenStart + 1; return token = 57 /* QuestionToken */; } function scanJsxToken(allowMultilineJsxText = true) { - startPos = tokenPos = pos; + fullStartPos = tokenStart = pos; if (pos >= end) { return token = 1 /* EndOfFileToken */; } @@ -8966,7 +8975,7 @@ } pos++; } - tokenValue = text.substring(startPos, pos); + tokenValue = text.substring(fullStartPos, pos); return firstNonWhitespace === -1 ? 12 /* JsxTextAllWhiteSpaces */ : 11 /* JsxText */; } function scanJsxIdentifier() { @@ -9000,7 +9009,7 @@ return token; } function scanJsxAttributeValue() { - startPos = pos; + fullStartPos = pos; switch (text.charCodeAt(pos)) { case 34 /* doubleQuote */: case 39 /* singleQuote */: @@ -9014,11 +9023,32 @@ } } function reScanJsxAttributeValue() { - pos = tokenPos = startPos; + pos = tokenStart = fullStartPos; return scanJsxAttributeValue(); } + function scanJSDocCommentTextToken(inBackticks) { + fullStartPos = tokenStart = pos; + tokenFlags = 0 /* None */; + if (pos >= end) { + return token = 1 /* EndOfFileToken */; + } + for (let ch = text.charCodeAt(pos); pos < end && (!isLineBreak(ch) && ch !== 96 /* backtick */); ch = codePointAt(text, ++pos)) { + if (!inBackticks) { + if (ch === 123 /* openBrace */) { + break; + } else if (ch === 64 /* at */ && pos - 1 >= 0 && isWhiteSpaceSingleLine(text.charCodeAt(pos - 1)) && !(pos + 1 < end && isWhiteSpaceLike(text.charCodeAt(pos + 1)))) { + break; + } + } + } + if (pos === tokenStart) { + return scanJsDocToken(); + } + tokenValue = text.substring(tokenStart, pos); + return token = 81 /* JSDocCommentTextToken */; + } function scanJsDocToken() { - startPos = tokenPos = pos; + fullStartPos = tokenStart = pos; tokenFlags = 0 /* None */; if (pos >= end) { return token = 1 /* EndOfFileToken */; @@ -9090,7 +9120,7 @@ let char = ch; while (pos < end && isIdentifierPart(char = codePointAt(text, pos), languageVersion) || text.charCodeAt(pos) === 45 /* minus */) pos += charSize(char); - tokenValue = text.substring(tokenPos, pos); + tokenValue = text.substring(tokenStart, pos); if (char === 92 /* backslash */) { tokenValue += scanIdentifierParts(); } @@ -9101,16 +9131,16 @@ } function speculationHelper(callback, isLookahead) { const savePos = pos; - const saveStartPos = startPos; - const saveTokenPos = tokenPos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; const saveToken = token; const saveTokenValue = tokenValue; const saveTokenFlags = tokenFlags; const result = callback(); if (!result || isLookahead) { pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; token = saveToken; tokenValue = saveTokenValue; tokenFlags = saveTokenFlags; @@ -9120,8 +9150,8 @@ function scanRange(start2, length3, callback) { const saveEnd = end; const savePos = pos; - const saveStartPos = startPos; - const saveTokenPos = tokenPos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; const saveToken = token; const saveTokenValue = tokenValue; const saveTokenFlags = tokenFlags; @@ -9130,8 +9160,8 @@ const result = callback(); end = saveEnd; pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; token = saveToken; tokenValue = saveTokenValue; tokenFlags = saveTokenFlags; @@ -9161,7 +9191,7 @@ function setText(newText, start2, length3) { text = newText || ""; end = length3 === void 0 ? text.length : start2 + length3; - setTextPos(start2 || 0); + resetTokenState(start2 || 0); } function setOnError(errorCallback) { onError = errorCallback; @@ -9172,11 +9202,11 @@ function setLanguageVariant(variant) { languageVariant = variant; } - function setTextPos(textPos) { - Debug.assert(textPos >= 0); - pos = textPos; - startPos = textPos; - tokenPos = textPos; + function resetTokenState(position) { + Debug.assert(position >= 0); + pos = position; + fullStartPos = position; + tokenStart = position; token = 0 /* Unknown */; tokenValue = void 0; tokenFlags = 0 /* None */; @@ -9306,30 +9336,30 @@ return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 241 /* ExpressionStatement */: + case 242 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 223 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { + if (expr.kind === 224 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 208 /* PropertyAccessExpression */: + case 209 /* PropertyAccessExpression */: return expr.name; - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 214 /* ParenthesizedExpression */: { + case 215 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 253 /* LabeledStatement */: { + case 254 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -9351,16 +9381,16 @@ switch (declaration.kind) { case 79 /* Identifier */: return declaration; - case 351 /* JSDocPropertyTag */: - case 344 /* JSDocParameterTag */: { + case 352 /* JSDocPropertyTag */: + case 345 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 163 /* QualifiedName */) { + if (name.kind === 164 /* QualifiedName */) { return name.right; } break; } - case 210 /* CallExpression */: - case 223 /* BinaryExpression */: { + case 211 /* CallExpression */: + case 224 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -9376,15 +9406,15 @@ return void 0; } } - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 343 /* JSDocEnumTag */: + case 344 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 274 /* ExportAssignment */: { + case 275 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 209 /* ElementAccessExpression */: + case 210 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -9553,7 +9583,7 @@ } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */ || kind === 210 /* CallExpression */ || kind === 232 /* NonNullExpression */); + return !!(node.flags & 32 /* OptionalChain */) && (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */ || kind === 211 /* CallExpression */ || kind === 233 /* NonNullExpression */); } function skipPartiallyEmittedExpressions(node) { return skipOuterExpressions(node, 8 /* PartiallyEmittedExpressions */); @@ -9562,10 +9592,10 @@ return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); } function isNamedExportBindings(node) { - return node.kind === 277 /* NamespaceExport */ || node.kind === 276 /* NamedExports */; + return node.kind === 278 /* NamespaceExport */ || node.kind === 277 /* NamedExports */; } function isNodeKind(kind) { - return kind >= 163 /* FirstNode */; + return kind >= 164 /* FirstNode */; } function isNodeArray(array) { return hasProperty(array, "pos") && hasProperty(array, "end"); @@ -9599,21 +9629,21 @@ } function isModifierKind(token) { switch (token) { - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 132 /* AsyncKeyword */: - case 85 /* ConstKeyword */: - case 136 /* DeclareKeyword */: - case 88 /* DefaultKeyword */: - case 93 /* ExportKeyword */: - case 101 /* InKeyword */: - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 124 /* StaticKeyword */: - case 145 /* OutKeyword */: - case 161 /* OverrideKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 133 /* AsyncKeyword */: + case 86 /* ConstKeyword */: + case 137 /* DeclareKeyword */: + case 89 /* DefaultKeyword */: + case 94 /* ExportKeyword */: + case 102 /* InKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 125 /* StaticKeyword */: + case 146 /* OutKeyword */: + case 162 /* OverrideKeyword */: return true; } return false; @@ -9622,35 +9652,35 @@ return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 124 /* StaticKeyword */ || idToken === 161 /* OverrideKeyword */ || idToken === 127 /* AccessorKeyword */; + return isParameterPropertyModifier(idToken) || idToken === 125 /* StaticKeyword */ || idToken === 162 /* OverrideKeyword */ || idToken === 128 /* AccessorKeyword */; } function isModifier(node) { return isModifierKind(node.kind); } function isEntityName(node) { const kind = node.kind; - return kind === 163 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 164 /* QualifiedName */ || kind === 79 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 164 /* ComputedPropertyName */; + return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 165 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 203 /* ObjectBindingPattern */ || kind === 204 /* ArrayBindingPattern */; + return kind === 79 /* Identifier */ || kind === 204 /* ObjectBindingPattern */ || kind === 205 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 259 /* FunctionDeclaration */: - case 171 /* MethodDeclaration */: - case 173 /* Constructor */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: + case 260 /* FunctionDeclaration */: + case 172 /* MethodDeclaration */: + case 174 /* Constructor */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: return true; default: return false; @@ -9658,14 +9688,14 @@ } function isFunctionLikeKind(kind) { switch (kind) { - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 326 /* JSDocSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 181 /* FunctionType */: - case 320 /* JSDocFunctionType */: - case 182 /* ConstructorType */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 327 /* JSDocSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 182 /* FunctionType */: + case 321 /* JSDocFunctionType */: + case 183 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -9673,16 +9703,16 @@ } function isClassElement(node) { const kind = node.kind; - return kind === 173 /* Constructor */ || kind === 169 /* PropertyDeclaration */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 178 /* IndexSignature */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 237 /* SemicolonClassElement */; + return kind === 174 /* Constructor */ || kind === 170 /* PropertyDeclaration */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 179 /* IndexSignature */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 238 /* SemicolonClassElement */; } function isAccessor(node) { - return node && (node.kind === 174 /* GetAccessor */ || node.kind === 175 /* SetAccessor */); + return node && (node.kind === 175 /* GetAccessor */ || node.kind === 176 /* SetAccessor */); } function isMethodOrAccessor(node) { switch (node.kind) { - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return true; default: return false; @@ -9693,19 +9723,19 @@ } function isTypeElement(node) { const kind = node.kind; - return kind === 177 /* ConstructSignature */ || kind === 176 /* CallSignature */ || kind === 168 /* PropertySignature */ || kind === 170 /* MethodSignature */ || kind === 178 /* IndexSignature */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 178 /* ConstructSignature */ || kind === 177 /* CallSignature */ || kind === 169 /* PropertySignature */ || kind === 171 /* MethodSignature */ || kind === 179 /* IndexSignature */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 301 /* SpreadAssignment */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */; + return kind === 300 /* PropertyAssignment */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 302 /* SpreadAssignment */ || kind === 172 /* MethodDeclaration */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 181 /* FunctionType */: - case 182 /* ConstructorType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: return true; } return false; @@ -9713,49 +9743,49 @@ function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 204 /* ArrayBindingPattern */ || kind === 203 /* ObjectBindingPattern */; + return kind === 205 /* ArrayBindingPattern */ || kind === 204 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 206 /* ArrayLiteralExpression */ || kind === 207 /* ObjectLiteralExpression */; + return kind === 207 /* ArrayLiteralExpression */ || kind === 208 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 205 /* BindingElement */ || kind === 229 /* OmittedExpression */; + return kind === 206 /* BindingElement */ || kind === 230 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 257 /* VariableDeclaration */: - case 166 /* Parameter */: - case 205 /* BindingElement */: + case 258 /* VariableDeclaration */: + case 167 /* Parameter */: + case 206 /* BindingElement */: return true; } return false; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 225 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; + return kind === 226 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 211 /* NewExpression */: - case 210 /* CallExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: - case 212 /* TaggedTemplateExpression */: - case 206 /* ArrayLiteralExpression */: - case 214 /* ParenthesizedExpression */: - case 207 /* ObjectLiteralExpression */: - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 212 /* NewExpression */: + case 211 /* CallExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: + case 213 /* TaggedTemplateExpression */: + case 207 /* ArrayLiteralExpression */: + case 215 /* ParenthesizedExpression */: + case 208 /* ObjectLiteralExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 13 /* RegularExpressionLiteral */: @@ -9763,17 +9793,17 @@ case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: - case 108 /* ThisKeyword */: - case 110 /* TrueKeyword */: - case 106 /* SuperKeyword */: - case 232 /* NonNullExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 233 /* MetaProperty */: - case 100 /* ImportKeyword */: - case 279 /* MissingDeclaration */: + case 226 /* TemplateExpression */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 109 /* ThisKeyword */: + case 111 /* TrueKeyword */: + case 107 /* SuperKeyword */: + case 233 /* NonNullExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 234 /* MetaProperty */: + case 101 /* ImportKeyword */: + case 280 /* MissingDeclaration */: return true; default: return false; @@ -9784,13 +9814,13 @@ } function isUnaryExpressionKind(kind) { switch (kind) { - case 221 /* PrefixUnaryExpression */: - case 222 /* PostfixUnaryExpression */: - case 217 /* DeleteExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 220 /* AwaitExpression */: - case 213 /* TypeAssertionExpression */: + case 222 /* PrefixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: + case 218 /* DeleteExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 221 /* AwaitExpression */: + case 214 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -9798,10 +9828,10 @@ } function isLiteralTypeLiteral(node) { switch (node.kind) { - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 221 /* PrefixUnaryExpression */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 222 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -9812,16 +9842,16 @@ } function isExpressionKind(kind) { switch (kind) { - case 224 /* ConditionalExpression */: - case 226 /* YieldExpression */: - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 227 /* SpreadElement */: - case 231 /* AsExpression */: - case 229 /* OmittedExpression */: - case 357 /* CommaListExpression */: - case 356 /* PartiallyEmittedExpression */: - case 235 /* SatisfiesExpression */: + case 225 /* ConditionalExpression */: + case 227 /* YieldExpression */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 228 /* SpreadElement */: + case 232 /* AsExpression */: + case 230 /* OmittedExpression */: + case 358 /* CommaListExpression */: + case 357 /* PartiallyEmittedExpression */: + case 236 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -9835,24 +9865,24 @@ } function isModuleBody(node) { const kind = node.kind; - return kind === 265 /* ModuleBlock */ || kind === 264 /* ModuleDeclaration */ || kind === 79 /* Identifier */; + return kind === 266 /* ModuleBlock */ || kind === 265 /* ModuleDeclaration */ || kind === 79 /* Identifier */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 272 /* NamedImports */ || kind === 271 /* NamespaceImport */; + return kind === 273 /* NamedImports */ || kind === 272 /* NamespaceImport */; } function isDeclarationKind(kind) { - return kind === 216 /* ArrowFunction */ || kind === 205 /* BindingElement */ || kind === 260 /* ClassDeclaration */ || kind === 228 /* ClassExpression */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 173 /* Constructor */ || kind === 263 /* EnumDeclaration */ || kind === 302 /* EnumMember */ || kind === 278 /* ExportSpecifier */ || kind === 259 /* FunctionDeclaration */ || kind === 215 /* FunctionExpression */ || kind === 174 /* GetAccessor */ || kind === 270 /* ImportClause */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 273 /* ImportSpecifier */ || kind === 261 /* InterfaceDeclaration */ || kind === 288 /* JsxAttribute */ || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 264 /* ModuleDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 271 /* NamespaceImport */ || kind === 277 /* NamespaceExport */ || kind === 166 /* Parameter */ || kind === 299 /* PropertyAssignment */ || kind === 169 /* PropertyDeclaration */ || kind === 168 /* PropertySignature */ || kind === 175 /* SetAccessor */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 262 /* TypeAliasDeclaration */ || kind === 165 /* TypeParameter */ || kind === 257 /* VariableDeclaration */ || kind === 349 /* JSDocTypedefTag */ || kind === 341 /* JSDocCallbackTag */ || kind === 351 /* JSDocPropertyTag */; + return kind === 217 /* ArrowFunction */ || kind === 206 /* BindingElement */ || kind === 261 /* ClassDeclaration */ || kind === 229 /* ClassExpression */ || kind === 173 /* ClassStaticBlockDeclaration */ || kind === 174 /* Constructor */ || kind === 264 /* EnumDeclaration */ || kind === 303 /* EnumMember */ || kind === 279 /* ExportSpecifier */ || kind === 260 /* FunctionDeclaration */ || kind === 216 /* FunctionExpression */ || kind === 175 /* GetAccessor */ || kind === 271 /* ImportClause */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 274 /* ImportSpecifier */ || kind === 262 /* InterfaceDeclaration */ || kind === 289 /* JsxAttribute */ || kind === 172 /* MethodDeclaration */ || kind === 171 /* MethodSignature */ || kind === 265 /* ModuleDeclaration */ || kind === 268 /* NamespaceExportDeclaration */ || kind === 272 /* NamespaceImport */ || kind === 278 /* NamespaceExport */ || kind === 167 /* Parameter */ || kind === 300 /* PropertyAssignment */ || kind === 170 /* PropertyDeclaration */ || kind === 169 /* PropertySignature */ || kind === 176 /* SetAccessor */ || kind === 301 /* ShorthandPropertyAssignment */ || kind === 263 /* TypeAliasDeclaration */ || kind === 166 /* TypeParameter */ || kind === 258 /* VariableDeclaration */ || kind === 350 /* JSDocTypedefTag */ || kind === 342 /* JSDocCallbackTag */ || kind === 352 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 259 /* FunctionDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 267 /* NamespaceExportDeclaration */; + return kind === 260 /* FunctionDeclaration */ || kind === 280 /* MissingDeclaration */ || kind === 261 /* ClassDeclaration */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 276 /* ExportDeclaration */ || kind === 275 /* ExportAssignment */ || kind === 268 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 355 /* NotEmittedStatement */ || kind === 359 /* EndOfDeclarationMarker */ || kind === 358 /* MergeDeclarationMarker */; + return kind === 250 /* BreakStatement */ || kind === 249 /* ContinueStatement */ || kind === 257 /* DebuggerStatement */ || kind === 244 /* DoStatement */ || kind === 242 /* ExpressionStatement */ || kind === 240 /* EmptyStatement */ || kind === 247 /* ForInStatement */ || kind === 248 /* ForOfStatement */ || kind === 246 /* ForStatement */ || kind === 243 /* IfStatement */ || kind === 254 /* LabeledStatement */ || kind === 251 /* ReturnStatement */ || kind === 253 /* SwitchStatement */ || kind === 255 /* ThrowStatement */ || kind === 256 /* TryStatement */ || kind === 241 /* VariableStatement */ || kind === 245 /* WhileStatement */ || kind === 252 /* WithStatement */ || kind === 356 /* NotEmittedStatement */ || kind === 360 /* EndOfDeclarationMarker */ || kind === 359 /* MergeDeclarationMarker */; } function isDeclaration(node) { - if (node.kind === 165 /* TypeParameter */) { - return node.parent && node.parent.kind !== 348 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 166 /* TypeParameter */) { + return node.parent && node.parent.kind !== 349 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -9861,10 +9891,10 @@ return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 238 /* Block */) + if (node.kind !== 239 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 255 /* TryStatement */ || node.parent.kind === 295 /* CatchClause */) { + if (node.parent.kind === 256 /* TryStatement */ || node.parent.kind === 296 /* CatchClause */) { return false; } } @@ -9872,34 +9902,34 @@ } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 238 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 239 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 280 /* ExternalModuleReference */ || kind === 163 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 281 /* ExternalModuleReference */ || kind === 164 /* QualifiedName */ || kind === 79 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 108 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 208 /* PropertyAccessExpression */; + return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 209 /* PropertyAccessExpression */; } function isJsxChild(node) { const kind = node.kind; - return kind === 281 /* JsxElement */ || kind === 291 /* JsxExpression */ || kind === 282 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 285 /* JsxFragment */; + return kind === 282 /* JsxElement */ || kind === 292 /* JsxExpression */ || kind === 283 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 286 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 288 /* JsxAttribute */ || kind === 290 /* JsxSpreadAttribute */; + return kind === 289 /* JsxAttribute */ || kind === 291 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 10 /* StringLiteral */ || kind === 291 /* JsxExpression */; + return kind === 10 /* StringLiteral */ || kind === 292 /* JsxExpression */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */; + return kind === 293 /* CaseClause */ || kind === 294 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */; + return node.kind >= 313 /* FirstJSDocNode */ && node.kind <= 354 /* LastJSDocNode */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) @@ -9977,7 +10007,7 @@ } } function getSourceFileOfNode(node) { - while (node && node.kind !== 308 /* SourceFile */) { + while (node && node.kind !== 309 /* SourceFile */) { node = node.parent; } return node; @@ -10035,7 +10065,7 @@ return !!(module2.flags & 1024 /* GlobalAugmentation */); } function isComputedNonLiteralName(name) { - return name.kind === 164 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 165 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a2; @@ -10047,7 +10077,7 @@ case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 164 /* ComputedPropertyName */: + case 165 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; @@ -10082,12 +10112,12 @@ pos ); scanner.scan(); - const start = scanner.getTokenPos(); - return createTextSpanFromBounds(start, scanner.getTextPos()); + const start = scanner.getTokenStart(); + return createTextSpanFromBounds(start, scanner.getTokenEnd()); } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 238 /* Block */) { + if (node.body && node.body.kind === 239 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -10099,7 +10129,7 @@ function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 308 /* SourceFile */: { + case 309 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -10111,35 +10141,35 @@ } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 257 /* VariableDeclaration */: - case 205 /* BindingElement */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 261 /* InterfaceDeclaration */: - case 264 /* ModuleDeclaration */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 262 /* TypeAliasDeclaration */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 271 /* NamespaceImport */: + case 258 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 262 /* InterfaceDeclaration */: + case 265 /* ModuleDeclaration */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 263 /* TypeAliasDeclaration */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 272 /* NamespaceImport */: errorNode = node.name; break; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 292 /* CaseClause */: - case 293 /* DefaultClause */: { + case 293 /* CaseClause */: + case 294 /* DefaultClause */: { const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); } - case 250 /* ReturnStatement */: - case 226 /* YieldExpression */: { + case 251 /* ReturnStatement */: + case 227 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } @@ -10166,7 +10196,7 @@ return file.scriptKind === 6 /* JSON */; } function isPrologueDirective(node) { - return node.kind === 241 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; + return node.kind === 242 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -10181,31 +10211,31 @@ return isCustomPrologue(node) && isVariableStatement(node) && every(node.declarationList.declarations, isHoistedVariable); } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 166 /* Parameter */ || node.kind === 165 /* TypeParameter */ || node.kind === 215 /* FunctionExpression */ || node.kind === 216 /* ArrowFunction */ || node.kind === 214 /* ParenthesizedExpression */ || node.kind === 257 /* VariableDeclaration */ || node.kind === 278 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 167 /* Parameter */ || node.kind === 166 /* TypeParameter */ || node.kind === 216 /* FunctionExpression */ || node.kind === 217 /* ArrowFunction */ || node.kind === 215 /* ParenthesizedExpression */ || node.kind === 258 /* VariableDeclaration */ || node.kind === 279 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } function isVariableLike(node) { if (node) { switch (node.kind) { - case 205 /* BindingElement */: - case 302 /* EnumMember */: - case 166 /* Parameter */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 300 /* ShorthandPropertyAssignment */: - case 257 /* VariableDeclaration */: + case 206 /* BindingElement */: + case 303 /* EnumMember */: + case 167 /* Parameter */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 301 /* ShorthandPropertyAssignment */: + case 258 /* VariableDeclaration */: return true; } } return false; } function isFunctionBlock(node) { - return node && node.kind === 238 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 239 /* Block */ && isFunctionLike(node.parent); } function isSuperProperty(node) { const kind = node.kind; - return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && node.expression.kind === 106 /* SuperKeyword */; + return (kind === 209 /* PropertyAccessExpression */ || kind === 210 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; } function isInJSFile(node) { return !!node && !!(node.flags & 262144 /* JavaScriptFile */); @@ -10247,14 +10277,14 @@ return isElementAccessExpression(node) && isStringOrNumericLiteralLike(node.argumentExpression); } function isBindableStaticAccessExpression(node, excludeThisKeyword) { - return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 108 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( + return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 109 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( node.expression, /*excludeThisKeyword*/ true )) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); } function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 108 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( + return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 109 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( node.expression, /*excludeThisKeyword*/ true @@ -10315,7 +10345,7 @@ return void 0; } function getAssignmentDeclarationPropertyAccessKind(lhs) { - if (lhs.expression.kind === 108 /* ThisKeyword */) { + if (lhs.expression.kind === 109 /* ThisKeyword */) { return 4 /* ThisProperty */; } else if (isModuleExportsAccessExpression(lhs)) { return 2 /* ModuleExports */; @@ -10357,12 +10387,12 @@ } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 240 /* VariableStatement */: + case 241 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return node.initializer; - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return node.initializer; } } @@ -10370,75 +10400,75 @@ return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 264 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 265 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveJSDoc(node) { switch (node.kind) { - case 216 /* ArrowFunction */: - case 223 /* BinaryExpression */: - case 238 /* Block */: - case 249 /* BreakStatement */: - case 176 /* CallSignature */: - case 292 /* CaseClause */: - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: - case 172 /* ClassStaticBlockDeclaration */: - case 173 /* Constructor */: - case 182 /* ConstructorType */: - case 177 /* ConstructSignature */: - case 248 /* ContinueStatement */: - case 256 /* DebuggerStatement */: - case 243 /* DoStatement */: - case 209 /* ElementAccessExpression */: - case 239 /* EmptyStatement */: + case 217 /* ArrowFunction */: + case 224 /* BinaryExpression */: + case 239 /* Block */: + case 250 /* BreakStatement */: + case 177 /* CallSignature */: + case 293 /* CaseClause */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: + case 173 /* ClassStaticBlockDeclaration */: + case 174 /* Constructor */: + case 183 /* ConstructorType */: + case 178 /* ConstructSignature */: + case 249 /* ContinueStatement */: + case 257 /* DebuggerStatement */: + case 244 /* DoStatement */: + case 210 /* ElementAccessExpression */: + case 240 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 263 /* EnumDeclaration */: - case 302 /* EnumMember */: - case 274 /* ExportAssignment */: - case 275 /* ExportDeclaration */: - case 278 /* ExportSpecifier */: - case 241 /* ExpressionStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 259 /* FunctionDeclaration */: - case 215 /* FunctionExpression */: - case 181 /* FunctionType */: - case 174 /* GetAccessor */: + case 264 /* EnumDeclaration */: + case 303 /* EnumMember */: + case 275 /* ExportAssignment */: + case 276 /* ExportDeclaration */: + case 279 /* ExportSpecifier */: + case 242 /* ExpressionStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 260 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 182 /* FunctionType */: + case 175 /* GetAccessor */: case 79 /* Identifier */: - case 242 /* IfStatement */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 320 /* JSDocFunctionType */: - case 326 /* JSDocSignature */: - case 253 /* LabeledStatement */: - case 171 /* MethodDeclaration */: - case 170 /* MethodSignature */: - case 264 /* ModuleDeclaration */: - case 199 /* NamedTupleMember */: - case 267 /* NamespaceExportDeclaration */: - case 207 /* ObjectLiteralExpression */: - case 166 /* Parameter */: - case 214 /* ParenthesizedExpression */: - case 208 /* PropertyAccessExpression */: - case 299 /* PropertyAssignment */: - case 169 /* PropertyDeclaration */: - case 168 /* PropertySignature */: - case 250 /* ReturnStatement */: - case 175 /* SetAccessor */: - case 300 /* ShorthandPropertyAssignment */: - case 301 /* SpreadAssignment */: - case 252 /* SwitchStatement */: - case 254 /* ThrowStatement */: - case 255 /* TryStatement */: - case 262 /* TypeAliasDeclaration */: - case 165 /* TypeParameter */: - case 257 /* VariableDeclaration */: - case 240 /* VariableStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: + case 243 /* IfStatement */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 321 /* JSDocFunctionType */: + case 327 /* JSDocSignature */: + case 254 /* LabeledStatement */: + case 172 /* MethodDeclaration */: + case 171 /* MethodSignature */: + case 265 /* ModuleDeclaration */: + case 200 /* NamedTupleMember */: + case 268 /* NamespaceExportDeclaration */: + case 208 /* ObjectLiteralExpression */: + case 167 /* Parameter */: + case 215 /* ParenthesizedExpression */: + case 209 /* PropertyAccessExpression */: + case 300 /* PropertyAssignment */: + case 170 /* PropertyDeclaration */: + case 169 /* PropertySignature */: + case 251 /* ReturnStatement */: + case 176 /* SetAccessor */: + case 301 /* ShorthandPropertyAssignment */: + case 302 /* SpreadAssignment */: + case 253 /* SwitchStatement */: + case 255 /* ThrowStatement */: + case 256 /* TryStatement */: + case 263 /* TypeAliasDeclaration */: + case 166 /* TypeParameter */: + case 258 /* VariableDeclaration */: + case 241 /* VariableStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: return true; default: return false; @@ -10454,11 +10484,11 @@ if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 166 /* Parameter */) { + if (node.kind === 167 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 165 /* TypeParameter */) { + if (node.kind === 166 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -10478,7 +10508,7 @@ } function getNextJSDocCommentLocation(node) { const parent = node.parent; - if (parent.kind === 299 /* PropertyAssignment */ || parent.kind === 274 /* ExportAssignment */ || parent.kind === 169 /* PropertyDeclaration */ || parent.kind === 241 /* ExpressionStatement */ && node.kind === 208 /* PropertyAccessExpression */ || parent.kind === 250 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { + if (parent.kind === 300 /* PropertyAssignment */ || parent.kind === 275 /* ExportAssignment */ || parent.kind === 170 /* PropertyDeclaration */ || parent.kind === 242 /* ExpressionStatement */ && node.kind === 209 /* PropertyAccessExpression */ || parent.kind === 251 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { return parent; } else if (parent.parent && (getSingleVariableOfVariableStatement(parent.parent) === node || isBinaryExpression(parent) && parent.operatorToken.kind === 63 /* EqualsToken */)) { return parent.parent; @@ -10491,7 +10521,7 @@ return skipOuterExpressions(node, flags); } function isKeyword(token) { - return 81 /* FirstKeyword */ <= token && token <= 162 /* LastKeyword */; + return 82 /* FirstKeyword */ <= token && token <= 163 /* LastKeyword */; } function isStringOrNumericLiteralLike(node) { return isStringLiteralLike(node) || isNumericLiteral(node); @@ -10500,7 +10530,7 @@ return isPrefixUnaryExpression(node) && (node.operator === 39 /* PlusToken */ || node.operator === 40 /* MinusToken */) && isNumericLiteral(node.operand); } function isDynamicName(name) { - if (!(name.kind === 164 /* ComputedPropertyName */ || name.kind === 209 /* ElementAccessExpression */)) { + if (!(name.kind === 165 /* ComputedPropertyName */ || name.kind === 210 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -10514,22 +10544,22 @@ } function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 211 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 212 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 211 /* NewExpression */: + case 212 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 221 /* PrefixUnaryExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 220 /* AwaitExpression */: - case 224 /* ConditionalExpression */: - case 226 /* YieldExpression */: + case 222 /* PrefixUnaryExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 221 /* AwaitExpression */: + case 225 /* ConditionalExpression */: + case 227 /* YieldExpression */: return 1 /* Right */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (operator) { case 42 /* AsteriskAsteriskToken */: case 63 /* EqualsToken */: @@ -10555,13 +10585,13 @@ } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 211 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 212 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 223 /* BinaryExpression */) { + if (expression.kind === 224 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 221 /* PrefixUnaryExpression */ || expression.kind === 222 /* PostfixUnaryExpression */) { + } else if (expression.kind === 222 /* PrefixUnaryExpression */ || expression.kind === 223 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -10569,15 +10599,15 @@ } function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 357 /* CommaListExpression */: + case 358 /* CommaListExpression */: return 0 /* Comma */; - case 227 /* SpreadElement */: + case 228 /* SpreadElement */: return 1 /* Spread */; - case 226 /* YieldExpression */: + case 227 /* YieldExpression */: return 2 /* Yield */; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: return 4 /* Conditional */; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: switch (operatorKind) { case 27 /* CommaToken */: return 0 /* Comma */; @@ -10601,51 +10631,51 @@ default: return getBinaryOperatorPrecedence(operatorKind); } - case 213 /* TypeAssertionExpression */: - case 232 /* NonNullExpression */: - case 221 /* PrefixUnaryExpression */: - case 218 /* TypeOfExpression */: - case 219 /* VoidExpression */: - case 217 /* DeleteExpression */: - case 220 /* AwaitExpression */: + case 214 /* TypeAssertionExpression */: + case 233 /* NonNullExpression */: + case 222 /* PrefixUnaryExpression */: + case 219 /* TypeOfExpression */: + case 220 /* VoidExpression */: + case 218 /* DeleteExpression */: + case 221 /* AwaitExpression */: return 16 /* Unary */; - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: return 17 /* Update */; - case 210 /* CallExpression */: + case 211 /* CallExpression */: return 18 /* LeftHandSide */; - case 211 /* NewExpression */: + case 212 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 212 /* TaggedTemplateExpression */: - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: - case 233 /* MetaProperty */: + case 213 /* TaggedTemplateExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: + case 234 /* MetaProperty */: return 19 /* Member */; - case 231 /* AsExpression */: - case 235 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 236 /* SatisfiesExpression */: return 11 /* Relational */; - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: - case 206 /* ArrayLiteralExpression */: - case 207 /* ObjectLiteralExpression */: - case 215 /* FunctionExpression */: - case 216 /* ArrowFunction */: - case 228 /* ClassExpression */: + case 207 /* ArrayLiteralExpression */: + case 208 /* ObjectLiteralExpression */: + case 216 /* FunctionExpression */: + case 217 /* ArrowFunction */: + case 229 /* ClassExpression */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 225 /* TemplateExpression */: - case 214 /* ParenthesizedExpression */: - case 229 /* OmittedExpression */: - case 281 /* JsxElement */: - case 282 /* JsxSelfClosingElement */: - case 285 /* JsxFragment */: + case 226 /* TemplateExpression */: + case 215 /* ParenthesizedExpression */: + case 230 /* OmittedExpression */: + case 282 /* JsxElement */: + case 283 /* JsxSelfClosingElement */: + case 286 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -10674,10 +10704,10 @@ case 31 /* GreaterThanToken */: case 32 /* LessThanEqualsToken */: case 33 /* GreaterThanEqualsToken */: - case 102 /* InstanceOfKeyword */: - case 101 /* InKeyword */: - case 128 /* AsKeyword */: - case 150 /* SatisfiesKeyword */: + case 103 /* InstanceOfKeyword */: + case 102 /* InKeyword */: + case 129 /* AsKeyword */: + case 151 /* SatisfiesKeyword */: return 11 /* Relational */; case 47 /* LessThanLessThanToken */: case 48 /* GreaterThanGreaterThanToken */: @@ -10768,7 +10798,7 @@ return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 162 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 163 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -10827,37 +10857,37 @@ } function modifierToFlag(token) { switch (token) { - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: return 32 /* Static */; - case 123 /* PublicKeyword */: + case 124 /* PublicKeyword */: return 4 /* Public */; - case 122 /* ProtectedKeyword */: + case 123 /* ProtectedKeyword */: return 16 /* Protected */; - case 121 /* PrivateKeyword */: + case 122 /* PrivateKeyword */: return 8 /* Private */; - case 126 /* AbstractKeyword */: + case 127 /* AbstractKeyword */: return 256 /* Abstract */; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: return 128 /* Accessor */; - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: return 1 /* Export */; - case 136 /* DeclareKeyword */: + case 137 /* DeclareKeyword */: return 2 /* Ambient */; - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: return 2048 /* Const */; - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return 1024 /* Default */; - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: return 512 /* Async */; - case 146 /* ReadonlyKeyword */: + case 147 /* ReadonlyKeyword */: return 64 /* Readonly */; - case 161 /* OverrideKeyword */: + case 162 /* OverrideKeyword */: return 16384 /* Override */; - case 101 /* InKeyword */: + case 102 /* InKeyword */: return 32768 /* In */; - case 145 /* OutKeyword */: + case 146 /* OutKeyword */: return 65536 /* Out */; - case 167 /* Decorator */: + case 168 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -10923,36 +10953,36 @@ return lastChild; } function isTypeNodeKind(kind) { - return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 139 /* IntrinsicKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */; + return kind >= 180 /* FirstTypeNode */ && kind <= 203 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 158 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 161 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 156 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 140 /* IntrinsicKeyword */ || kind === 231 /* ExpressionWithTypeArguments */ || kind === 316 /* JSDocAllType */ || kind === 317 /* JSDocUnknownType */ || kind === 318 /* JSDocNullableType */ || kind === 319 /* JSDocNonNullableType */ || kind === 320 /* JSDocOptionalType */ || kind === 321 /* JSDocFunctionType */ || kind === 322 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */; + return node.kind === 209 /* PropertyAccessExpression */ || node.kind === 210 /* ElementAccessExpression */; } function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 222 /* PostfixUnaryExpression */: + case 223 /* PostfixUnaryExpression */: node = node.operand; continue; - case 223 /* BinaryExpression */: + case 224 /* BinaryExpression */: node = node.left; continue; - case 224 /* ConditionalExpression */: + case 225 /* ConditionalExpression */: node = node.condition; continue; - case 212 /* TaggedTemplateExpression */: + case 213 /* TaggedTemplateExpression */: node = node.tag; continue; - case 210 /* CallExpression */: + case 211 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 231 /* AsExpression */: - case 209 /* ElementAccessExpression */: - case 208 /* PropertyAccessExpression */: - case 232 /* NonNullExpression */: - case 356 /* PartiallyEmittedExpression */: - case 235 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 210 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 233 /* NonNullExpression */: + case 357 /* PartiallyEmittedExpression */: + case 236 /* SatisfiesExpression */: node = node.expression; continue; } @@ -11708,16 +11738,16 @@ return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(223 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(223 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(224 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(224 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 216 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 217 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 226 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 227 /* YieldExpression */) { return false; } return true; @@ -11751,7 +11781,7 @@ if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { + if (node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -11764,7 +11794,7 @@ } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 214 /* ParenthesizedExpression */) { + if (skipped.kind === 215 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -11790,7 +11820,7 @@ return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(224 /* ConditionalExpression */, 57 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(225 /* ConditionalExpression */, 57 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -11811,8 +11841,8 @@ /*stopAtCallExpression*/ false ).kind) { - case 228 /* ClassExpression */: - case 215 /* FunctionExpression */: + case 229 /* ClassExpression */: + case 216 /* FunctionExpression */: needsParens = true; } } @@ -11825,16 +11855,16 @@ true ); switch (leftmostExpr.kind) { - case 210 /* CallExpression */: + case 211 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 211 /* NewExpression */: + case 212 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 211 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 212 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -11852,7 +11882,7 @@ function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(223 /* BinaryExpression */, 27 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(224 /* BinaryExpression */, 27 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -11860,7 +11890,7 @@ if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 215 /* FunctionExpression */ || kind === 216 /* ArrowFunction */) { + if (kind === 216 /* FunctionExpression */ || kind === 217 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -11875,7 +11905,7 @@ /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 207 /* ObjectLiteralExpression */ || leftmostExpressionKind === 215 /* FunctionExpression */) { + if (leftmostExpressionKind === 208 /* ObjectLiteralExpression */ || leftmostExpressionKind === 216 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -11885,31 +11915,31 @@ body, /*stopAtCallExpressions*/ false - ).kind === 207 /* ObjectLiteralExpression */)) { + ).kind === 208 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 181 /* FunctionType */: - case 182 /* ConstructorType */: - case 191 /* ConditionalType */: + case 182 /* FunctionType */: + case 183 /* ConstructorType */: + case 192 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 191 /* ConditionalType */: + case 192 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -11919,8 +11949,8 @@ } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 189 /* UnionType */: - case 190 /* IntersectionType */: + case 190 /* UnionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -11930,23 +11960,23 @@ } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 190 /* IntersectionType */: + case 191 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 195 /* TypeOperator */: + case 196 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 192 /* InferType */: - case 195 /* TypeOperator */: - case 183 /* TypeQuery */: + case 193 /* InferType */: + case 196 /* TypeOperator */: + case 184 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -12104,11 +12134,11 @@ } function convertToAssignmentPattern(node) { switch (node.kind) { - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 203 /* ObjectBindingPattern */: - case 207 /* ObjectLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 208 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -12455,40 +12485,40 @@ updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(315 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(316 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(316 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(317 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(318 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(319 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(318 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(319 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(317 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(318 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(317 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(318 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(319 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(320 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(319 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(320 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(321 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(322 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(321 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(322 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(322 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(323 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(322 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(323 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -12528,82 +12558,82 @@ updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(347 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(348 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(347 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(345 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(346 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(345 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(346 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(346 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(347 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(346 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(347 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(333 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(334 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(333 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(334 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(335 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(336 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(335 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(336 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(339 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(339 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(340 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(340 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(341 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(341 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(334 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(335 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(334 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(335 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(352 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(353 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(354 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(354 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -13066,50 +13096,50 @@ return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 162 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 163 /* LastToken */, "Invalid token"); Debug.assert(token <= 14 /* FirstTemplateToken */ || token >= 17 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 8 /* FirstLiteralToken */ || token >= 14 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 79 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); const node = createBaseToken(token); let transformFlags = 0 /* None */; switch (token) { - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; break; - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 146 /* ReadonlyKeyword */: - case 126 /* AbstractKeyword */: - case 136 /* DeclareKeyword */: - case 85 /* ConstKeyword */: - case 131 /* AnyKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 144 /* NeverKeyword */: - case 149 /* ObjectKeyword */: - case 101 /* InKeyword */: - case 145 /* OutKeyword */: - case 161 /* OverrideKeyword */: - case 152 /* StringKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 114 /* VoidKeyword */: - case 157 /* UnknownKeyword */: - case 155 /* UndefinedKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 147 /* ReadonlyKeyword */: + case 127 /* AbstractKeyword */: + case 137 /* DeclareKeyword */: + case 86 /* ConstKeyword */: + case 132 /* AnyKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 145 /* NeverKeyword */: + case 150 /* ObjectKeyword */: + case 102 /* InKeyword */: + case 146 /* OutKeyword */: + case 162 /* OverrideKeyword */: + case 153 /* StringKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 115 /* VoidKeyword */: + case 158 /* UnknownKeyword */: + case 156 /* UndefinedKeyword */: transformFlags = 1 /* ContainsTypeScript */; break; - case 106 /* SuperKeyword */: + case 107 /* SuperKeyword */: transformFlags = 1024 /* ContainsES2015 */ | 134217728 /* ContainsLexicalSuper */; node.flowNode = void 0; break; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: transformFlags = 1024 /* ContainsES2015 */; break; - case 127 /* AccessorKeyword */: + case 128 /* AccessorKeyword */: transformFlags = 16777216 /* ContainsClassFields */; break; - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: transformFlags = 16384 /* ContainsLexicalThis */; node.flowNode = void 0; break; @@ -13120,19 +13150,19 @@ return node; } function createSuper() { - return createToken(106 /* SuperKeyword */); + return createToken(107 /* SuperKeyword */); } function createThis() { - return createToken(108 /* ThisKeyword */); + return createToken(109 /* ThisKeyword */); } function createNull() { - return createToken(104 /* NullKeyword */); + return createToken(105 /* NullKeyword */); } function createTrue() { - return createToken(110 /* TrueKeyword */); + return createToken(111 /* TrueKeyword */); } function createFalse() { - return createToken(95 /* FalseKeyword */); + return createToken(96 /* FalseKeyword */); } function createModifier(kind) { return createToken(kind); @@ -13140,39 +13170,39 @@ function createModifiersFromModifierFlags(flags2) { const result = []; if (flags2 & 1 /* Export */) - result.push(createModifier(93 /* ExportKeyword */)); + result.push(createModifier(94 /* ExportKeyword */)); if (flags2 & 2 /* Ambient */) - result.push(createModifier(136 /* DeclareKeyword */)); + result.push(createModifier(137 /* DeclareKeyword */)); if (flags2 & 1024 /* Default */) - result.push(createModifier(88 /* DefaultKeyword */)); + result.push(createModifier(89 /* DefaultKeyword */)); if (flags2 & 2048 /* Const */) - result.push(createModifier(85 /* ConstKeyword */)); + result.push(createModifier(86 /* ConstKeyword */)); if (flags2 & 4 /* Public */) - result.push(createModifier(123 /* PublicKeyword */)); + result.push(createModifier(124 /* PublicKeyword */)); if (flags2 & 8 /* Private */) - result.push(createModifier(121 /* PrivateKeyword */)); + result.push(createModifier(122 /* PrivateKeyword */)); if (flags2 & 16 /* Protected */) - result.push(createModifier(122 /* ProtectedKeyword */)); + result.push(createModifier(123 /* ProtectedKeyword */)); if (flags2 & 256 /* Abstract */) - result.push(createModifier(126 /* AbstractKeyword */)); + result.push(createModifier(127 /* AbstractKeyword */)); if (flags2 & 32 /* Static */) - result.push(createModifier(124 /* StaticKeyword */)); + result.push(createModifier(125 /* StaticKeyword */)); if (flags2 & 16384 /* Override */) - result.push(createModifier(161 /* OverrideKeyword */)); + result.push(createModifier(162 /* OverrideKeyword */)); if (flags2 & 64 /* Readonly */) - result.push(createModifier(146 /* ReadonlyKeyword */)); + result.push(createModifier(147 /* ReadonlyKeyword */)); if (flags2 & 128 /* Accessor */) - result.push(createModifier(127 /* AccessorKeyword */)); + result.push(createModifier(128 /* AccessorKeyword */)); if (flags2 & 512 /* Async */) - result.push(createModifier(132 /* AsyncKeyword */)); + result.push(createModifier(133 /* AsyncKeyword */)); if (flags2 & 32768 /* In */) - result.push(createModifier(101 /* InKeyword */)); + result.push(createModifier(102 /* InKeyword */)); if (flags2 & 65536 /* Out */) - result.push(createModifier(145 /* OutKeyword */)); + result.push(createModifier(146 /* OutKeyword */)); return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(163 /* QualifiedName */); + const node = createBaseNode(164 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -13183,7 +13213,7 @@ return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(164 /* ComputedPropertyName */); + const node = createBaseNode(165 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -13192,7 +13222,7 @@ return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(165 /* TypeParameter */); + const node = createBaseDeclaration(166 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -13207,7 +13237,7 @@ } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { var _a2, _b; - const node = createBaseDeclaration(166 /* Parameter */); + const node = createBaseDeclaration(167 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -13226,7 +13256,7 @@ return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(167 /* Decorator */); + const node = createBaseNode(168 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -13239,7 +13269,7 @@ return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(168 /* PropertySignature */); + const node = createBaseDeclaration(169 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -13259,7 +13289,7 @@ return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(169 /* PropertyDeclaration */); + const node = createBaseDeclaration(170 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; @@ -13275,7 +13305,7 @@ return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(170 /* MethodSignature */); + const node = createBaseDeclaration(171 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -13293,7 +13323,7 @@ return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(171 /* MethodDeclaration */); + const node = createBaseDeclaration(172 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -13330,7 +13360,7 @@ return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(172 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(173 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -13351,7 +13381,7 @@ return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(173 /* Constructor */); + const node = createBaseDeclaration(174 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; @@ -13377,7 +13407,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(174 /* GetAccessor */); + const node = createBaseDeclaration(175 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -13408,7 +13438,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(175 /* SetAccessor */); + const node = createBaseDeclaration(176 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -13440,7 +13470,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(176 /* CallSignature */); + const node = createBaseDeclaration(177 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -13455,7 +13485,7 @@ return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(177 /* ConstructSignature */); + const node = createBaseDeclaration(178 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -13470,7 +13500,7 @@ return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(178 /* IndexSignature */); + const node = createBaseDeclaration(179 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -13485,7 +13515,7 @@ return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(201 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(202 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -13498,7 +13528,7 @@ return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(179 /* TypePredicate */); + const node = createBaseNode(180 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -13509,7 +13539,7 @@ return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(180 /* TypeReference */); + const node = createBaseNode(181 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -13519,7 +13549,7 @@ return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(181 /* FunctionType */); + const node = createBaseDeclaration(182 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -13544,7 +13574,7 @@ return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(182 /* ConstructorType */); + const node = createBaseDeclaration(183 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -13575,7 +13605,7 @@ return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(183 /* TypeQuery */); + const node = createBaseNode(184 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -13585,7 +13615,7 @@ return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(184 /* TypeLiteral */); + const node = createBaseDeclaration(185 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13594,7 +13624,7 @@ return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(185 /* ArrayType */); + const node = createBaseNode(186 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13603,7 +13633,7 @@ return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(186 /* TupleType */); + const node = createBaseNode(187 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13612,7 +13642,7 @@ return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(199 /* NamedTupleMember */); + const node = createBaseDeclaration(200 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -13625,7 +13655,7 @@ return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(187 /* OptionalType */); + const node = createBaseNode(188 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13634,7 +13664,7 @@ return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(188 /* RestType */); + const node = createBaseNode(189 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13652,19 +13682,19 @@ return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(189 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(190 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(190 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(191 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(191 /* ConditionalType */); + const node = createBaseNode(192 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -13678,7 +13708,7 @@ return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(192 /* InferType */); + const node = createBaseNode(193 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13687,7 +13717,7 @@ return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(200 /* TemplateLiteralType */); + const node = createBaseNode(201 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -13697,7 +13727,7 @@ return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(202 /* ImportType */); + const node = createBaseNode(203 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -13710,7 +13740,7 @@ return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(193 /* ParenthesizedType */); + const node = createBaseNode(194 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13719,14 +13749,14 @@ return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(194 /* ThisType */); + const node = createBaseNode(195 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(195 /* TypeOperator */); + const node = createBaseNode(196 /* TypeOperator */); node.operator = operator; - node.type = operator === 146 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); + node.type = operator === 147 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; } @@ -13734,7 +13764,7 @@ return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(196 /* IndexedAccessType */); + const node = createBaseNode(197 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -13744,7 +13774,7 @@ return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(197 /* MappedType */); + const node = createBaseDeclaration(198 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -13760,7 +13790,7 @@ return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(198 /* LiteralType */); + const node = createBaseNode(199 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13769,7 +13799,7 @@ return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(203 /* ObjectBindingPattern */); + const node = createBaseNode(204 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -13781,7 +13811,7 @@ return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(204 /* ArrayBindingPattern */); + const node = createBaseNode(205 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -13790,7 +13820,7 @@ return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(205 /* BindingElement */); + const node = createBaseDeclaration(206 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -13803,7 +13833,7 @@ return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(206 /* ArrayLiteralExpression */); + const node = createBaseNode(207 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -13815,7 +13845,7 @@ return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(207 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(208 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -13826,7 +13856,7 @@ return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(208 /* PropertyAccessExpression */); + const node = createBaseDeclaration(209 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -13876,7 +13906,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(209 /* ElementAccessExpression */); + const node = createBaseDeclaration(210 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -13926,7 +13956,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(210 /* CallExpression */); + const node = createBaseDeclaration(211 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -13983,7 +14013,7 @@ return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(211 /* NewExpression */); + const node = createBaseDeclaration(212 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -13997,7 +14027,7 @@ return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(212 /* TaggedTemplateExpression */); + const node = createBaseNode(213 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -14018,7 +14048,7 @@ return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(213 /* TypeAssertionExpression */); + const node = createBaseNode(214 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -14028,7 +14058,7 @@ return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(214 /* ParenthesizedExpression */); + const node = createBaseNode(215 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -14038,7 +14068,7 @@ return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(215 /* FunctionExpression */); + const node = createBaseDeclaration(216 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -14063,7 +14093,7 @@ return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(216 /* ArrowFunction */); + const node = createBaseDeclaration(217 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -14085,7 +14115,7 @@ return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(217 /* DeleteExpression */); + const node = createBaseNode(218 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -14094,7 +14124,7 @@ return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(218 /* TypeOfExpression */); + const node = createBaseNode(219 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -14103,7 +14133,7 @@ return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(219 /* VoidExpression */); + const node = createBaseNode(220 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -14112,7 +14142,7 @@ return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(220 /* AwaitExpression */); + const node = createBaseNode(221 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -14121,7 +14151,7 @@ return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(221 /* PrefixUnaryExpression */); + const node = createBaseNode(222 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -14134,7 +14164,7 @@ return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(222 /* PostfixUnaryExpression */); + const node = createBaseNode(223 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -14147,7 +14177,7 @@ return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(223 /* BinaryExpression */); + const node = createBaseDeclaration(224 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -14167,7 +14197,7 @@ } else if (isLogicalOrCoalescingAssignmentOperator(operatorKind)) { node.transformFlags |= 16 /* ContainsES2021 */; } - if (operatorKind === 101 /* InKeyword */ && isPrivateIdentifier(node.left)) { + if (operatorKind === 102 /* InKeyword */ && isPrivateIdentifier(node.left)) { node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */; } node.jsDoc = void 0; @@ -14180,7 +14210,7 @@ return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(224 /* ConditionalExpression */); + const node = createBaseNode(225 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken != null ? questionToken : createToken(57 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -14193,7 +14223,7 @@ return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(225 /* TemplateExpression */); + const node = createBaseNode(226 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -14268,7 +14298,7 @@ } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(226 /* YieldExpression */); + const node = createBaseNode(227 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -14278,7 +14308,7 @@ return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(227 /* SpreadElement */); + const node = createBaseNode(228 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -14287,7 +14317,7 @@ return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(228 /* ClassExpression */); + const node = createBaseDeclaration(229 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -14301,10 +14331,10 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(229 /* OmittedExpression */); + return createBaseNode(230 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(230 /* ExpressionWithTypeArguments */); + const node = createBaseNode(231 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -14318,7 +14348,7 @@ return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(231 /* AsExpression */); + const node = createBaseNode(232 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -14328,7 +14358,7 @@ return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(232 /* NonNullExpression */); + const node = createBaseNode(233 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -14344,7 +14374,7 @@ return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(235 /* SatisfiesExpression */); + const node = createBaseNode(236 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -14354,7 +14384,7 @@ return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(232 /* NonNullExpression */); + const node = createBaseNode(233 /* NonNullExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, @@ -14369,15 +14399,15 @@ return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(233 /* MetaProperty */); + const node = createBaseNode(234 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); switch (keywordToken) { - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: node.transformFlags |= 1024 /* ContainsES2015 */; break; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: node.transformFlags |= 4 /* ContainsESNext */; break; default: @@ -14390,7 +14420,7 @@ return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(236 /* TemplateSpan */); + const node = createBaseNode(237 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -14400,12 +14430,12 @@ return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(237 /* SemicolonClassElement */); + const node = createBaseNode(238 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(238 /* Block */); + const node = createBaseNode(239 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -14418,7 +14448,7 @@ return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(240 /* VariableStatement */); + const node = createBaseNode(241 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -14433,12 +14463,12 @@ return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(239 /* EmptyStatement */); + const node = createBaseNode(240 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(241 /* ExpressionStatement */); + const node = createBaseNode(242 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -14449,7 +14479,7 @@ return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(242 /* IfStatement */); + const node = createBaseNode(243 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -14462,7 +14492,7 @@ return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(243 /* DoStatement */); + const node = createBaseNode(244 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -14474,7 +14504,7 @@ return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(244 /* WhileStatement */); + const node = createBaseNode(245 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -14486,7 +14516,7 @@ return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(245 /* ForStatement */); + const node = createBaseNode(246 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -14502,7 +14532,7 @@ return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(246 /* ForInStatement */); + const node = createBaseNode(247 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -14517,7 +14547,7 @@ return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(247 /* ForOfStatement */); + const node = createBaseNode(248 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -14535,7 +14565,7 @@ return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(248 /* ContinueStatement */); + const node = createBaseNode(249 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -14546,7 +14576,7 @@ return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(249 /* BreakStatement */); + const node = createBaseNode(250 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -14557,7 +14587,7 @@ return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(250 /* ReturnStatement */); + const node = createBaseNode(251 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -14568,7 +14598,7 @@ return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(251 /* WithStatement */); + const node = createBaseNode(252 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -14580,7 +14610,7 @@ return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(252 /* SwitchStatement */); + const node = createBaseNode(253 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -14593,7 +14623,7 @@ return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(253 /* LabeledStatement */); + const node = createBaseNode(254 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -14605,7 +14635,7 @@ return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(254 /* ThrowStatement */); + const node = createBaseNode(255 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -14616,7 +14646,7 @@ return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(255 /* TryStatement */); + const node = createBaseNode(256 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -14629,14 +14659,14 @@ return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(256 /* DebuggerStatement */); + const node = createBaseNode(257 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { var _a2; - const node = createBaseDeclaration(257 /* VariableDeclaration */); + const node = createBaseDeclaration(258 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -14649,7 +14679,7 @@ return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(258 /* VariableDeclarationList */); + const node = createBaseNode(259 /* VariableDeclarationList */); node.flags |= flags2 & 3 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -14662,7 +14692,7 @@ return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(259 /* FunctionDeclaration */); + const node = createBaseDeclaration(260 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -14698,7 +14728,7 @@ return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(260 /* ClassDeclaration */); + const node = createBaseDeclaration(261 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -14719,7 +14749,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(261 /* InterfaceDeclaration */); + const node = createBaseDeclaration(262 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -14733,7 +14763,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(262 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(263 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -14748,7 +14778,7 @@ return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(263 /* EnumDeclaration */); + const node = createBaseDeclaration(264 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -14761,7 +14791,7 @@ return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(264 /* ModuleDeclaration */); + const node = createBaseDeclaration(265 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); node.name = name; @@ -14781,7 +14811,7 @@ return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(265 /* ModuleBlock */); + const node = createBaseNode(266 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -14791,7 +14821,7 @@ return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(266 /* CaseBlock */); + const node = createBaseNode(267 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -14802,7 +14832,7 @@ return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(267 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(268 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -14819,7 +14849,7 @@ return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(268 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(269 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -14836,7 +14866,7 @@ return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(269 /* ImportDeclaration */); + const node = createBaseNode(270 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -14850,7 +14880,7 @@ return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(270 /* ImportClause */); + const node = createBaseDeclaration(271 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -14865,7 +14895,7 @@ return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(296 /* AssertClause */); + const node = createBaseNode(297 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -14875,7 +14905,7 @@ return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(297 /* AssertEntry */); + const node = createBaseNode(298 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -14885,7 +14915,7 @@ return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(298 /* ImportTypeAssertionContainer */); + const node = createBaseNode(299 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -14894,7 +14924,7 @@ return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(271 /* NamespaceImport */); + const node = createBaseDeclaration(272 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -14904,7 +14934,7 @@ return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(277 /* NamespaceExport */); + const node = createBaseDeclaration(278 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -14914,7 +14944,7 @@ return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(272 /* NamedImports */); + const node = createBaseNode(273 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -14924,7 +14954,7 @@ return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(273 /* ImportSpecifier */); + const node = createBaseDeclaration(274 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -14936,7 +14966,7 @@ return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(274 /* ExportAssignment */); + const node = createBaseDeclaration(275 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -14954,7 +14984,7 @@ return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(275 /* ExportDeclaration */); + const node = createBaseDeclaration(276 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -14977,7 +15007,7 @@ return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(276 /* NamedExports */); + const node = createBaseNode(277 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -14987,7 +15017,7 @@ return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(278 /* ExportSpecifier */); + const node = createBaseNode(279 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -15000,12 +15030,12 @@ return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(279 /* MissingDeclaration */); + const node = createBaseDeclaration(280 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(280 /* ExternalModuleReference */); + const node = createBaseNode(281 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -15037,7 +15067,7 @@ return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(320 /* JSDocFunctionType */); + const node = createBaseDeclaration(321 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -15051,7 +15081,7 @@ return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(325 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(326 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -15060,7 +15090,7 @@ return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(312 /* JSDocTypeExpression */); + const node = createBaseNode(313 /* JSDocTypeExpression */); node.type = type; return node; } @@ -15068,7 +15098,7 @@ return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(326 /* JSDocSignature */); + const node = createBaseDeclaration(327 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -15097,7 +15127,7 @@ return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(348 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); + const node = createBaseJSDocTag(349 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -15106,7 +15136,7 @@ return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(349 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(350 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -15118,7 +15148,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(344 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(345 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -15129,7 +15159,7 @@ return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(351 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(352 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -15140,7 +15170,7 @@ return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(341 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(342 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -15152,7 +15182,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(342 /* JSDocOverloadTag */, tagName != null ? tagName : createIdentifier("overload"), comment); + const node = createBaseJSDocTag(343 /* JSDocOverloadTag */, tagName != null ? tagName : createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -15160,7 +15190,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(331 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); + const node = createBaseJSDocTag(332 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); node.class = className; return node; } @@ -15168,12 +15198,12 @@ return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(332 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); + const node = createBaseJSDocTag(333 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(350 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); + const node = createBaseJSDocTag(351 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); node.name = name; return node; } @@ -15181,7 +15211,7 @@ return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(313 /* JSDocNameReference */); + const node = createBaseNode(314 /* JSDocNameReference */); node.name = name; return node; } @@ -15189,7 +15219,7 @@ return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(314 /* JSDocMemberName */); + const node = createBaseNode(315 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -15199,7 +15229,7 @@ return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(327 /* JSDocLink */); + const node = createBaseNode(328 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -15208,7 +15238,7 @@ return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(328 /* JSDocLinkCode */); + const node = createBaseNode(329 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -15217,7 +15247,7 @@ return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(329 /* JSDocLinkPlain */); + const node = createBaseNode(330 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -15244,14 +15274,14 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(330 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(331 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(343 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(343 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(344 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(344 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -15261,7 +15291,7 @@ return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(324 /* JSDocText */); + const node = createBaseNode(325 /* JSDocText */); node.text = text; return node; } @@ -15269,7 +15299,7 @@ return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(323 /* JSDoc */); + const node = createBaseNode(324 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -15278,7 +15308,7 @@ return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(281 /* JsxElement */); + const node = createBaseNode(282 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -15289,7 +15319,7 @@ return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(282 /* JsxSelfClosingElement */); + const node = createBaseNode(283 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -15303,7 +15333,7 @@ return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(283 /* JsxOpeningElement */); + const node = createBaseNode(284 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -15317,7 +15347,7 @@ return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(284 /* JsxClosingElement */); + const node = createBaseNode(285 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -15326,7 +15356,7 @@ return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(285 /* JsxFragment */); + const node = createBaseNode(286 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -15347,17 +15377,17 @@ return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(286 /* JsxOpeningFragment */); + const node = createBaseNode(287 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(287 /* JsxClosingFragment */); + const node = createBaseNode(288 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(288 /* JsxAttribute */); + const node = createBaseDeclaration(289 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -15367,7 +15397,7 @@ return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(289 /* JsxAttributes */); + const node = createBaseDeclaration(290 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -15376,7 +15406,7 @@ return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(290 /* JsxSpreadAttribute */); + const node = createBaseNode(291 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -15385,7 +15415,7 @@ return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(291 /* JsxExpression */); + const node = createBaseNode(292 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -15395,7 +15425,7 @@ return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(292 /* CaseClause */); + const node = createBaseNode(293 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -15406,7 +15436,7 @@ return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(293 /* DefaultClause */); + const node = createBaseNode(294 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -15415,15 +15445,15 @@ return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(294 /* HeritageClause */); + const node = createBaseNode(295 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); switch (token) { - case 94 /* ExtendsKeyword */: + case 95 /* ExtendsKeyword */: node.transformFlags |= 1024 /* ContainsES2015 */; break; - case 117 /* ImplementsKeyword */: + case 118 /* ImplementsKeyword */: node.transformFlags |= 1 /* ContainsTypeScript */; break; default: @@ -15435,7 +15465,7 @@ return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(295 /* CatchClause */); + const node = createBaseNode(296 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -15447,7 +15477,7 @@ return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(299 /* PropertyAssignment */); + const node = createBaseDeclaration(300 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -15469,7 +15499,7 @@ return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(300 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(301 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -15493,7 +15523,7 @@ return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(301 /* SpreadAssignment */); + const node = createBaseDeclaration(302 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -15503,7 +15533,7 @@ return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(302 /* EnumMember */); + const node = createBaseDeclaration(303 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -15514,7 +15544,7 @@ return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(309 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -15595,7 +15625,7 @@ return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(309 /* SourceFile */); node.flags |= source.flags & ~8 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { @@ -15629,7 +15659,7 @@ return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(309 /* Bundle */); + const node = createBaseNode(310 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; @@ -15642,7 +15672,7 @@ return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(310 /* UnparsedSource */); + const node = createBaseNode(311 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -15659,48 +15689,48 @@ return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(303 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(304 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(304 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(305 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 306 /* UnparsedInternalText */ : 305 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 307 /* UnparsedInternalText */ : 306 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(307 /* UnparsedSyntheticReference */); + const node = createBaseNode(308 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles() { - const node = createBaseNode(311 /* InputFiles */); + const node = createBaseNode(312 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(234 /* SyntheticExpression */); + const node = createBaseNode(235 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList(children) { - const node = createBaseNode(354 /* SyntaxList */); + const node = createBaseNode(355 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(355 /* NotEmittedStatement */); + const node = createBaseNode(356 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(356 /* PartiallyEmittedExpression */); + const node = createBaseNode(357 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -15722,7 +15752,7 @@ return node; } function createCommaListExpression(elements) { - const node = createBaseNode(357 /* CommaListExpression */); + const node = createBaseNode(358 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -15731,19 +15761,19 @@ return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createEndOfDeclarationMarker(original) { - const node = createBaseNode(359 /* EndOfDeclarationMarker */); + const node = createBaseNode(360 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createMergeDeclarationMarker(original) { - const node = createBaseNode(358 /* MergeDeclarationMarker */); + const node = createBaseNode(359 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(360 /* SyntheticReferenceExpression */); + const node = createBaseNode(361 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -15976,17 +16006,17 @@ } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 213 /* TypeAssertionExpression */: + case 214 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 231 /* AsExpression */: + case 232 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 235 /* SatisfiesExpression */: + case 236 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -16021,18 +16051,18 @@ switch (target.kind) { case 79 /* Identifier */: return cacheIdentifiers; - case 108 /* ThisKeyword */: + case 109 /* ThisKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: return false; - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -16344,43 +16374,43 @@ } function getDefaultTagNameForKind(kind) { switch (kind) { - case 347 /* JSDocTypeTag */: + case 348 /* JSDocTypeTag */: return "type"; - case 345 /* JSDocReturnTag */: + case 346 /* JSDocReturnTag */: return "returns"; - case 346 /* JSDocThisTag */: + case 347 /* JSDocThisTag */: return "this"; - case 343 /* JSDocEnumTag */: + case 344 /* JSDocEnumTag */: return "enum"; - case 333 /* JSDocAuthorTag */: + case 334 /* JSDocAuthorTag */: return "author"; - case 335 /* JSDocClassTag */: + case 336 /* JSDocClassTag */: return "class"; - case 336 /* JSDocPublicTag */: + case 337 /* JSDocPublicTag */: return "public"; - case 337 /* JSDocPrivateTag */: + case 338 /* JSDocPrivateTag */: return "private"; - case 338 /* JSDocProtectedTag */: + case 339 /* JSDocProtectedTag */: return "protected"; - case 339 /* JSDocReadonlyTag */: + case 340 /* JSDocReadonlyTag */: return "readonly"; - case 340 /* JSDocOverrideTag */: + case 341 /* JSDocOverrideTag */: return "override"; - case 348 /* JSDocTemplateTag */: + case 349 /* JSDocTemplateTag */: return "template"; - case 349 /* JSDocTypedefTag */: + case 350 /* JSDocTypedefTag */: return "typedef"; - case 344 /* JSDocParameterTag */: + case 345 /* JSDocParameterTag */: return "param"; - case 351 /* JSDocPropertyTag */: + case 352 /* JSDocPropertyTag */: return "prop"; - case 341 /* JSDocCallbackTag */: + case 342 /* JSDocCallbackTag */: return "callback"; - case 342 /* JSDocOverloadTag */: + case 343 /* JSDocOverloadTag */: return "overload"; - case 331 /* JSDocAugmentsTag */: + case 332 /* JSDocAugmentsTag */: return "augments"; - case 332 /* JSDocImplementsTag */: + case 333 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -16464,70 +16494,70 @@ children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */) { + if (kind >= 180 /* FirstTypeNode */ && kind <= 203 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 210 /* CallExpression */: - case 211 /* NewExpression */: - case 206 /* ArrayLiteralExpression */: + case 211 /* CallExpression */: + case 212 /* NewExpression */: + case 207 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 264 /* ModuleDeclaration */: + case 265 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 166 /* Parameter */: + case 167 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 216 /* ArrowFunction */: + case 217 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 215 /* FunctionExpression */: - case 259 /* FunctionDeclaration */: + case 216 /* FunctionExpression */: + case 260 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 258 /* VariableDeclarationList */: + case 259 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 260 /* ClassDeclaration */: - case 228 /* ClassExpression */: + case 261 /* ClassDeclaration */: + case 229 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 173 /* Constructor */: + case 174 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 169 /* PropertyDeclaration */: + case 170 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 171 /* MethodDeclaration */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: + case 172 /* MethodDeclaration */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; - case 131 /* AnyKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 144 /* NeverKeyword */: - case 152 /* StringKeyword */: - case 149 /* ObjectKeyword */: - case 134 /* BooleanKeyword */: - case 153 /* SymbolKeyword */: - case 114 /* VoidKeyword */: - case 165 /* TypeParameter */: - case 168 /* PropertySignature */: - case 170 /* MethodSignature */: - case 176 /* CallSignature */: - case 177 /* ConstructSignature */: - case 178 /* IndexSignature */: - case 261 /* InterfaceDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 132 /* AnyKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 145 /* NeverKeyword */: + case 153 /* StringKeyword */: + case 150 /* ObjectKeyword */: + case 135 /* BooleanKeyword */: + case 154 /* SymbolKeyword */: + case 115 /* VoidKeyword */: + case 166 /* TypeParameter */: + case 169 /* PropertySignature */: + case 171 /* MethodSignature */: + case 177 /* CallSignature */: + case 178 /* ConstructSignature */: + case 179 /* IndexSignature */: + case 262 /* InterfaceDeclaration */: + case 263 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 295 /* CatchClause */: + case 296 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 213 /* TypeAssertionExpression */: - case 235 /* SatisfiesExpression */: - case 231 /* AsExpression */: - case 356 /* PartiallyEmittedExpression */: - case 214 /* ParenthesizedExpression */: - case 106 /* SuperKeyword */: + case 214 /* TypeAssertionExpression */: + case 236 /* SatisfiesExpression */: + case 232 /* AsExpression */: + case 357 /* PartiallyEmittedExpression */: + case 215 /* ParenthesizedExpression */: + case 107 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 208 /* PropertyAccessExpression */: - case 209 /* ElementAccessExpression */: + case 209 /* PropertyAccessExpression */: + case 210 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -16612,7 +16642,7 @@ var _a2; if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 308 /* SourceFile */) { + if (node.kind === 309 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = (_a2 = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node)))) != null ? _a2 : Debug.fail("Could not determine parsed source file."); @@ -16749,358 +16779,358 @@ return node.kind === 80 /* PrivateIdentifier */; } function isExportModifier(node) { - return node.kind === 93 /* ExportKeyword */; + return node.kind === 94 /* ExportKeyword */; } function isAsyncModifier(node) { - return node.kind === 132 /* AsyncKeyword */; + return node.kind === 133 /* AsyncKeyword */; } function isAssertsKeyword(node) { - return node.kind === 129 /* AssertsKeyword */; + return node.kind === 130 /* AssertsKeyword */; } function isAwaitKeyword(node) { - return node.kind === 133 /* AwaitKeyword */; + return node.kind === 134 /* AwaitKeyword */; } function isReadonlyKeyword(node) { - return node.kind === 146 /* ReadonlyKeyword */; + return node.kind === 147 /* ReadonlyKeyword */; } function isSuperKeyword(node) { - return node.kind === 106 /* SuperKeyword */; + return node.kind === 107 /* SuperKeyword */; } function isImportKeyword(node) { - return node.kind === 100 /* ImportKeyword */; + return node.kind === 101 /* ImportKeyword */; } function isComputedPropertyName(node) { - return node.kind === 164 /* ComputedPropertyName */; + return node.kind === 165 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 165 /* TypeParameter */; + return node.kind === 166 /* TypeParameter */; } function isParameter(node) { - return node.kind === 166 /* Parameter */; + return node.kind === 167 /* Parameter */; } function isDecorator(node) { - return node.kind === 167 /* Decorator */; + return node.kind === 168 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 168 /* PropertySignature */; + return node.kind === 169 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 169 /* PropertyDeclaration */; + return node.kind === 170 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 170 /* MethodSignature */; + return node.kind === 171 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 171 /* MethodDeclaration */; + return node.kind === 172 /* MethodDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 173 /* Constructor */; + return node.kind === 174 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 174 /* GetAccessor */; + return node.kind === 175 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 175 /* SetAccessor */; + return node.kind === 176 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 176 /* CallSignature */; + return node.kind === 177 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 177 /* ConstructSignature */; + return node.kind === 178 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 178 /* IndexSignature */; + return node.kind === 179 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 179 /* TypePredicate */; + return node.kind === 180 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 180 /* TypeReference */; + return node.kind === 181 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 181 /* FunctionType */; + return node.kind === 182 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 182 /* ConstructorType */; + return node.kind === 183 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 183 /* TypeQuery */; + return node.kind === 184 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 184 /* TypeLiteral */; + return node.kind === 185 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 185 /* ArrayType */; + return node.kind === 186 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 186 /* TupleType */; + return node.kind === 187 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 199 /* NamedTupleMember */; + return node.kind === 200 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 187 /* OptionalType */; + return node.kind === 188 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 188 /* RestType */; + return node.kind === 189 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 189 /* UnionType */; + return node.kind === 190 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 190 /* IntersectionType */; + return node.kind === 191 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 191 /* ConditionalType */; + return node.kind === 192 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 192 /* InferType */; + return node.kind === 193 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 193 /* ParenthesizedType */; + return node.kind === 194 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 194 /* ThisType */; + return node.kind === 195 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 195 /* TypeOperator */; + return node.kind === 196 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 196 /* IndexedAccessType */; + return node.kind === 197 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 197 /* MappedType */; + return node.kind === 198 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 198 /* LiteralType */; + return node.kind === 199 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 202 /* ImportType */; + return node.kind === 203 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 201 /* TemplateLiteralTypeSpan */; + return node.kind === 202 /* TemplateLiteralTypeSpan */; } function isObjectBindingPattern(node) { - return node.kind === 203 /* ObjectBindingPattern */; + return node.kind === 204 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 204 /* ArrayBindingPattern */; + return node.kind === 205 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 205 /* BindingElement */; + return node.kind === 206 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 206 /* ArrayLiteralExpression */; + return node.kind === 207 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 207 /* ObjectLiteralExpression */; + return node.kind === 208 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 208 /* PropertyAccessExpression */; + return node.kind === 209 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 209 /* ElementAccessExpression */; + return node.kind === 210 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 210 /* CallExpression */; + return node.kind === 211 /* CallExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 212 /* TaggedTemplateExpression */; + return node.kind === 213 /* TaggedTemplateExpression */; } function isParenthesizedExpression(node) { - return node.kind === 214 /* ParenthesizedExpression */; + return node.kind === 215 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 215 /* FunctionExpression */; + return node.kind === 216 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 216 /* ArrowFunction */; + return node.kind === 217 /* ArrowFunction */; } function isVoidExpression(node) { - return node.kind === 219 /* VoidExpression */; + return node.kind === 220 /* VoidExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 221 /* PrefixUnaryExpression */; + return node.kind === 222 /* PrefixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 223 /* BinaryExpression */; + return node.kind === 224 /* BinaryExpression */; } function isSpreadElement(node) { - return node.kind === 227 /* SpreadElement */; + return node.kind === 228 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 228 /* ClassExpression */; + return node.kind === 229 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 229 /* OmittedExpression */; + return node.kind === 230 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 230 /* ExpressionWithTypeArguments */; + return node.kind === 231 /* ExpressionWithTypeArguments */; } function isNonNullExpression(node) { - return node.kind === 232 /* NonNullExpression */; + return node.kind === 233 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 233 /* MetaProperty */; + return node.kind === 234 /* MetaProperty */; } function isCommaListExpression(node) { - return node.kind === 357 /* CommaListExpression */; + return node.kind === 358 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 236 /* TemplateSpan */; + return node.kind === 237 /* TemplateSpan */; } function isBlock(node) { - return node.kind === 238 /* Block */; + return node.kind === 239 /* Block */; } function isVariableStatement(node) { - return node.kind === 240 /* VariableStatement */; + return node.kind === 241 /* VariableStatement */; } function isExpressionStatement(node) { - return node.kind === 241 /* ExpressionStatement */; + return node.kind === 242 /* ExpressionStatement */; } function isLabeledStatement(node) { - return node.kind === 253 /* LabeledStatement */; + return node.kind === 254 /* LabeledStatement */; } function isVariableDeclaration(node) { - return node.kind === 257 /* VariableDeclaration */; + return node.kind === 258 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 258 /* VariableDeclarationList */; + return node.kind === 259 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 259 /* FunctionDeclaration */; + return node.kind === 260 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 260 /* ClassDeclaration */; + return node.kind === 261 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 261 /* InterfaceDeclaration */; + return node.kind === 262 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 262 /* TypeAliasDeclaration */; + return node.kind === 263 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 263 /* EnumDeclaration */; + return node.kind === 264 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 264 /* ModuleDeclaration */; + return node.kind === 265 /* ModuleDeclaration */; } function isCaseBlock(node) { - return node.kind === 266 /* CaseBlock */; + return node.kind === 267 /* CaseBlock */; } function isImportEqualsDeclaration(node) { - return node.kind === 268 /* ImportEqualsDeclaration */; + return node.kind === 269 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 269 /* ImportDeclaration */; + return node.kind === 270 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 270 /* ImportClause */; + return node.kind === 271 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 298 /* ImportTypeAssertionContainer */; + return node.kind === 299 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 296 /* AssertClause */; + return node.kind === 297 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 297 /* AssertEntry */; + return node.kind === 298 /* AssertEntry */; } function isImportSpecifier(node) { - return node.kind === 273 /* ImportSpecifier */; + return node.kind === 274 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 274 /* ExportAssignment */; + return node.kind === 275 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 275 /* ExportDeclaration */; + return node.kind === 276 /* ExportDeclaration */; } function isExportSpecifier(node) { - return node.kind === 278 /* ExportSpecifier */; + return node.kind === 279 /* ExportSpecifier */; } function isNotEmittedStatement(node) { - return node.kind === 355 /* NotEmittedStatement */; + return node.kind === 356 /* NotEmittedStatement */; } function isExternalModuleReference(node) { - return node.kind === 280 /* ExternalModuleReference */; + return node.kind === 281 /* ExternalModuleReference */; } function isJsxOpeningElement(node) { - return node.kind === 283 /* JsxOpeningElement */; + return node.kind === 284 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 284 /* JsxClosingElement */; + return node.kind === 285 /* JsxClosingElement */; } function isJsxOpeningFragment(node) { - return node.kind === 286 /* JsxOpeningFragment */; + return node.kind === 287 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 287 /* JsxClosingFragment */; + return node.kind === 288 /* JsxClosingFragment */; } function isJsxAttributes(node) { - return node.kind === 289 /* JsxAttributes */; + return node.kind === 290 /* JsxAttributes */; } function isDefaultClause(node) { - return node.kind === 293 /* DefaultClause */; + return node.kind === 294 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 294 /* HeritageClause */; + return node.kind === 295 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 295 /* CatchClause */; + return node.kind === 296 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 299 /* PropertyAssignment */; + return node.kind === 300 /* PropertyAssignment */; } function isEnumMember(node) { - return node.kind === 302 /* EnumMember */; + return node.kind === 303 /* EnumMember */; } function isSourceFile(node) { - return node.kind === 308 /* SourceFile */; + return node.kind === 309 /* SourceFile */; } function isJSDocTypeExpression(node) { - return node.kind === 312 /* JSDocTypeExpression */; + return node.kind === 313 /* JSDocTypeExpression */; } function isJSDocNullableType(node) { - return node.kind === 317 /* JSDocNullableType */; + return node.kind === 318 /* JSDocNullableType */; } function isJSDocFunctionType(node) { - return node.kind === 320 /* JSDocFunctionType */; + return node.kind === 321 /* JSDocFunctionType */; } function isJSDoc(node) { - return node.kind === 323 /* JSDoc */; + return node.kind === 324 /* JSDoc */; } function isJSDocPublicTag(node) { - return node.kind === 336 /* JSDocPublicTag */; + return node.kind === 337 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 337 /* JSDocPrivateTag */; + return node.kind === 338 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 338 /* JSDocProtectedTag */; + return node.kind === 339 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 339 /* JSDocReadonlyTag */; + return node.kind === 340 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 340 /* JSDocOverrideTag */; + return node.kind === 341 /* JSDocOverrideTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 334 /* JSDocDeprecatedTag */; + return node.kind === 335 /* JSDocDeprecatedTag */; } function isJSDocParameterTag(node) { - return node.kind === 344 /* JSDocParameterTag */; + return node.kind === 345 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 345 /* JSDocReturnTag */; + return node.kind === 346 /* JSDocReturnTag */; } function isJSDocTypeTag(node) { - return node.kind === 347 /* JSDocTypeTag */; + return node.kind === 348 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 348 /* JSDocTemplateTag */; + return node.kind === 349 /* JSDocTemplateTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 353 /* JSDocSatisfiesTag */; + return node.kind === 354 /* JSDocSatisfiesTag */; } // src/compiler/factory/utilities.ts @@ -17123,7 +17153,7 @@ return void 0; } function isCommaExpression(node) { - return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */; + return node.kind === 224 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -17133,19 +17163,19 @@ } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 214 /* ParenthesizedExpression */: + case 215 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 213 /* TypeAssertionExpression */: - case 231 /* AsExpression */: - case 230 /* ExpressionWithTypeArguments */: - case 235 /* SatisfiesExpression */: + case 214 /* TypeAssertionExpression */: + case 232 /* AsExpression */: + case 231 /* ExpressionWithTypeArguments */: + case 236 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 232 /* NonNullExpression */: + case 233 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 356 /* PartiallyEmittedExpression */: + case 357 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -17169,11 +17199,11 @@ } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 299 /* PropertyAssignment */: + case 300 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 300 /* ShorthandPropertyAssignment */: + case 301 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 301 /* SpreadAssignment */: + case 302 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -17192,11 +17222,11 @@ } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 203 /* ObjectBindingPattern */: - case 204 /* ArrayBindingPattern */: - case 206 /* ArrayLiteralExpression */: + case 204 /* ObjectBindingPattern */: + case 205 /* ArrayBindingPattern */: + case 207 /* ArrayLiteralExpression */: return name.elements; - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: return name.properties; } } @@ -17248,7 +17278,7 @@ return isShiftOperator(kind) || isAdditiveOperatorOrHigher(kind); } function isRelationalOperator(kind) { - return kind === 29 /* LessThanToken */ || kind === 32 /* LessThanEqualsToken */ || kind === 31 /* GreaterThanToken */ || kind === 33 /* GreaterThanEqualsToken */ || kind === 102 /* InstanceOfKeyword */ || kind === 101 /* InKeyword */; + return kind === 29 /* LessThanToken */ || kind === 32 /* LessThanEqualsToken */ || kind === 31 /* GreaterThanToken */ || kind === 33 /* GreaterThanEqualsToken */ || kind === 103 /* InstanceOfKeyword */ || kind === 102 /* InKeyword */; } function isRelationalOperatorOrHigher(kind) { return isRelationalOperator(kind) || isShiftOperatorOrHigher(kind); @@ -17429,7 +17459,7 @@ } function canHaveModifiers(node) { const kind = node.kind; - return kind === 165 /* TypeParameter */ || kind === 166 /* Parameter */ || kind === 168 /* PropertySignature */ || kind === 169 /* PropertyDeclaration */ || kind === 170 /* MethodSignature */ || kind === 171 /* MethodDeclaration */ || kind === 173 /* Constructor */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */ || kind === 178 /* IndexSignature */ || kind === 182 /* ConstructorType */ || kind === 215 /* FunctionExpression */ || kind === 216 /* ArrowFunction */ || kind === 228 /* ClassExpression */ || kind === 240 /* VariableStatement */ || kind === 259 /* FunctionDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 275 /* ExportDeclaration */; + return kind === 166 /* TypeParameter */ || kind === 167 /* Parameter */ || kind === 169 /* PropertySignature */ || kind === 170 /* PropertyDeclaration */ || kind === 171 /* MethodSignature */ || kind === 172 /* MethodDeclaration */ || kind === 174 /* Constructor */ || kind === 175 /* GetAccessor */ || kind === 176 /* SetAccessor */ || kind === 179 /* IndexSignature */ || kind === 183 /* ConstructorType */ || kind === 216 /* FunctionExpression */ || kind === 217 /* ArrowFunction */ || kind === 229 /* ClassExpression */ || kind === 241 /* VariableStatement */ || kind === 260 /* FunctionDeclaration */ || kind === 261 /* ClassDeclaration */ || kind === 262 /* InterfaceDeclaration */ || kind === 263 /* TypeAliasDeclaration */ || kind === 264 /* EnumDeclaration */ || kind === 265 /* ModuleDeclaration */ || kind === 269 /* ImportEqualsDeclaration */ || kind === 270 /* ImportDeclaration */ || kind === 275 /* ExportAssignment */ || kind === 276 /* ExportDeclaration */; } // src/compiler/parser.ts @@ -17469,7 +17499,7 @@ return forEach(sourceFile.statements, isAnExternalModuleIndicatorNode) || getImportMetaIfNecessary(sourceFile); } function isAnExternalModuleIndicatorNode(node) { - return canHaveModifiers(node) && hasModifierOfKind(node, 93 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; + return canHaveModifiers(node) && hasModifierOfKind(node, 94 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { return sourceFile.flags & 4194304 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; @@ -17481,428 +17511,428 @@ return some(node.modifiers, (m) => m.kind === kind); } function isImportMeta(node) { - return isMetaProperty(node) && node.keywordToken === 100 /* ImportKeyword */ && node.name.escapedText === "meta"; + return isMetaProperty(node) && node.keywordToken === 101 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [163 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [164 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [165 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [166 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [300 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [301 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [301 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [302 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [166 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [167 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [169 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [170 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [168 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [169 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [299 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [300 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [257 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [258 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [205 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [206 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [178 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [179 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [182 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [183 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [181 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [182 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [176 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [177 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [171 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [177 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [178 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [172 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [170 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [171 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [173 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [174 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [174 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [175 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [175 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [176 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [259 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [260 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [215 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [216 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [216 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [217 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [172 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [173 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [180 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [181 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [179 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [180 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [183 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [184 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [184 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [185 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [185 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [186 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [186 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [187 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [189 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [190 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [191 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [190 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [191 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [192 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [192 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [193 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [202 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [203 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [298 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [299 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [193 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [195 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [196 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [194 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [196 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [197 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [197 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [198 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [198 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [199 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [199 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [200 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [203 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [204 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [206 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [204 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [205 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [207 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [207 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [208 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [208 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [209 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [209 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [210 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [210 /* CallExpression */]: forEachChildInCallOrNewExpression, - [211 /* NewExpression */]: forEachChildInCallOrNewExpression, - [212 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [211 /* CallExpression */]: forEachChildInCallOrNewExpression, + [212 /* NewExpression */]: forEachChildInCallOrNewExpression, + [213 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [213 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [214 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [214 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [215 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [217 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [218 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [218 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [219 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [219 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [220 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [222 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [226 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [227 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [220 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [221 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [223 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [223 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [224 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [231 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [232 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [232 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [233 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [235 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [236 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [233 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [234 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [224 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [225 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [227 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [228 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [238 /* Block */]: forEachChildInBlock, - [265 /* ModuleBlock */]: forEachChildInBlock, - [308 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [239 /* Block */]: forEachChildInBlock, + [266 /* ModuleBlock */]: forEachChildInBlock, + [309 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [240 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [241 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [258 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [259 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [241 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [242 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [242 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [243 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [243 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [244 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [244 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [245 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [245 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [246 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [246 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [247 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [247 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [248 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [248 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [249 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [250 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [249 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [250 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [251 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [251 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [252 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [252 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [253 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [266 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [267 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [292 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [293 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [293 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [294 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [253 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [254 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [254 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [255 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [255 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [256 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [295 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [296 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [167 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [168 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [260 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [228 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [261 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [261 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [229 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [262 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [262 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [263 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [263 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [264 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [302 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [303 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [264 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [265 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [268 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [269 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [269 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [270 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [270 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [271 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [296 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [297 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [297 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [298 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [267 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [268 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [271 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [272 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [277 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [278 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [272 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [276 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [275 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [273 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [277 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [276 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [273 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [278 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [274 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [274 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [279 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [275 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [225 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [226 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [236 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [237 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [200 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [201 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [201 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [202 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [164 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [165 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [294 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [295 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [230 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [231 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [280 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [281 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [280 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [358 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [282 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [285 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [286 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [282 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [283 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [289 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [283 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [284 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [290 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [288 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [289 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [290 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [291 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [291 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [292 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [284 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [285 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [187 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [188 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [312 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [317 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [319 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [320 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [188 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [189 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [313 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [319 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [318 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [320 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [322 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [323 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [324 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [350 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [351 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [313 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [314 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [314 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [315 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [344 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [351 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [333 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [345 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [352 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [334 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [332 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [333 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [331 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [332 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [348 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [349 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [349 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 312 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [350 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 313 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [341 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [342 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [345 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [346 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [348 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [347 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [344 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [354 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [353 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [343 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [327 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [327 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [328 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [329 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [325 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [328 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [329 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [330 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [326 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [330 /* JSDocTag */]: forEachChildInJSDocTag, - [335 /* JSDocClassTag */]: forEachChildInJSDocTag, - [336 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [337 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [338 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [340 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [331 /* JSDocTag */]: forEachChildInJSDocTag, + [336 /* JSDocClassTag */]: forEachChildInJSDocTag, + [337 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [338 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [339 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [340 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [335 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [341 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [357 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -17957,7 +17987,7 @@ return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 162 /* LastToken */) { + if (node === void 0 || node.kind <= 163 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -17992,7 +18022,7 @@ continue; return res; } - if (current.kind >= 163 /* FirstNode */) { + if (current.kind >= 164 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -18185,9 +18215,9 @@ case 22 /* OpenBracketToken */: expression2 = parseArrayLiteralExpression(); break; - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: expression2 = parseTokenNode(); break; case 40 /* MinusToken */: @@ -18370,13 +18400,13 @@ speculationHelper(() => { const savedContextFlags = contextFlags; contextFlags |= 32768 /* AwaitContext */; - scanner.setTextPos(nextStatement.pos); + scanner.resetTokenState(nextStatement.pos); nextToken(); while (token() !== 1 /* EndOfFileToken */) { - const startPos = scanner.getStartPos(); + const startPos = scanner.getTokenFullStart(); const statement = parseListElement(0 /* SourceElements */, parseStatement); statements.push(statement); - if (startPos === scanner.getStartPos()) { + if (startPos === scanner.getTokenFullStart()) { nextToken(); } if (pos >= 0) { @@ -18564,7 +18594,7 @@ return inContext(32768 /* AwaitContext */); } function parseErrorAtCurrentToken(message, arg0) { - return parseErrorAt(scanner.getTokenPos(), scanner.getTextPos(), message, arg0); + return parseErrorAt(scanner.getTokenStart(), scanner.getTokenEnd(), message, arg0); } function parseErrorAtPosition(start, length2, message, arg0) { const lastError = lastOrUndefined(parseDiagnostics); @@ -18583,10 +18613,10 @@ parseErrorAt(range.pos, range.end, message, arg0); } function scanError(message, length2) { - parseErrorAtPosition(scanner.getTextPos(), length2, message); + parseErrorAtPosition(scanner.getTokenEnd(), length2, message); } function getNodePos() { - return scanner.getStartPos(); + return scanner.getTokenFullStart(); } function hasPrecedingJSDocComment() { return scanner.hasPrecedingJSDocComment(); @@ -18603,13 +18633,16 @@ } function nextToken() { if (isKeyword(currentToken) && (scanner.hasUnicodeEscape() || scanner.hasExtendedUnicodeEscape())) { - parseErrorAt(scanner.getTokenPos(), scanner.getTextPos(), Diagnostics.Keywords_cannot_contain_escape_characters); + parseErrorAt(scanner.getTokenStart(), scanner.getTokenEnd(), Diagnostics.Keywords_cannot_contain_escape_characters); } return nextTokenWithoutCheck(); } function nextTokenJSDoc() { return currentToken = scanner.scanJsDocToken(); } + function nextJSDocCommentTextToken(inBackticks) { + return currentToken = scanner.scanJSDocCommentTextToken(inBackticks); + } function reScanGreaterToken() { return currentToken = scanner.reScanGreaterToken(); } @@ -18663,19 +18696,19 @@ if (token() === 79 /* Identifier */) { return true; } - return token() > 116 /* LastReservedWord */; + return token() > 117 /* LastReservedWord */; } function isIdentifier2() { if (token() === 79 /* Identifier */) { return true; } - if (token() === 125 /* YieldKeyword */ && inYieldContext()) { + if (token() === 126 /* YieldKeyword */ && inYieldContext()) { return false; } - if (token() === 133 /* AwaitKeyword */ && inAwaitContext()) { + if (token() === 134 /* AwaitKeyword */ && inAwaitContext()) { return false; } - return token() > 116 /* LastReservedWord */; + return token() > 117 /* LastReservedWord */; } function parseExpected(kind, diagnosticMessage, shouldAdvance = true) { if (token() === kind) { @@ -18716,7 +18749,7 @@ parseErrorForInvalidName(Diagnostics.Interface_name_cannot_be_0, Diagnostics.Interface_must_be_given_a_name, 18 /* OpenBraceToken */); return; case "is": - parseErrorAt(pos, scanner.getTextPos(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + parseErrorAt(pos, scanner.getTokenStart(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); return; case "module": case "namespace": @@ -18871,11 +18904,11 @@ } function createNodeArray(elements, pos, end, hasTrailingComma) { const array = factoryCreateNodeArray(elements, hasTrailingComma); - setTextRangePosEnd(array, pos, end != null ? end : scanner.getStartPos()); + setTextRangePosEnd(array, pos, end != null ? end : scanner.getTokenFullStart()); return array; } function finishNode(node, pos, end) { - setTextRangePosEnd(node, pos, end != null ? end : scanner.getStartPos()); + setTextRangePosEnd(node, pos, end != null ? end : scanner.getTokenFullStart()); if (contextFlags) { node.flags |= contextFlags; } @@ -18887,7 +18920,7 @@ } function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, arg0) { if (reportAtCurrentPosition) { - parseErrorAtPosition(scanner.getStartPos(), 0, diagnosticMessage, arg0); + parseErrorAtPosition(scanner.getTokenFullStart(), 0, diagnosticMessage, arg0); } else if (diagnosticMessage) { parseErrorAtCurrentToken(diagnosticMessage, arg0); } @@ -18910,7 +18943,7 @@ "", /*isSingleQuote*/ void 0 - ) : kind === 279 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 280 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -19015,22 +19048,22 @@ } function nextTokenCanFollowModifier() { switch (token()) { - case 85 /* ConstKeyword */: - return nextToken() === 92 /* EnumKeyword */; - case 93 /* ExportKeyword */: + case 86 /* ConstKeyword */: + return nextToken() === 93 /* EnumKeyword */; + case 94 /* ExportKeyword */: nextToken(); - if (token() === 88 /* DefaultKeyword */) { + if (token() === 89 /* DefaultKeyword */) { return lookAhead(nextTokenCanFollowDefaultKeyword); } - if (token() === 154 /* TypeKeyword */) { + if (token() === 155 /* TypeKeyword */) { return lookAhead(nextTokenCanFollowExportModifier); } return canFollowExportModifier(); - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); - case 124 /* StaticKeyword */: - case 137 /* GetKeyword */: - case 151 /* SetKeyword */: + case 125 /* StaticKeyword */: + case 138 /* GetKeyword */: + case 152 /* SetKeyword */: nextToken(); return canFollowModifier(); default: @@ -19038,7 +19071,7 @@ } } function canFollowExportModifier() { - return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 128 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier(); + return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 129 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier(); } function nextTokenCanFollowExportModifier() { nextToken(); @@ -19052,7 +19085,7 @@ } function nextTokenCanFollowDefaultKeyword() { nextToken(); - return token() === 84 /* ClassKeyword */ || token() === 98 /* FunctionKeyword */ || token() === 118 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 132 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); + return token() === 85 /* ClassKeyword */ || token() === 99 /* FunctionKeyword */ || token() === 119 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 127 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 133 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); } function isListElement(parsingContext2, inErrorRecovery) { const node = currentNode(parsingContext2); @@ -19065,7 +19098,7 @@ case 3 /* SwitchClauseStatements */: return !(token() === 26 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); case 2 /* SwitchClauses */: - return token() === 82 /* CaseKeyword */ || token() === 88 /* DefaultKeyword */; + return token() === 83 /* CaseKeyword */ || token() === 89 /* DefaultKeyword */; case 4 /* TypeMembers */: return lookAhead(isTypeMemberStart); case 5 /* ClassMembers */: @@ -19102,7 +19135,7 @@ case 10 /* ArrayBindingElements */: return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern(); case 19 /* TypeParameters */: - return token() === 101 /* InKeyword */ || token() === 85 /* ConstKeyword */ || isIdentifier2(); + return token() === 102 /* InKeyword */ || token() === 86 /* ConstKeyword */ || isIdentifier2(); case 15 /* ArrayLiteralMembers */: switch (token()) { case 27 /* CommaToken */: @@ -19139,7 +19172,7 @@ Debug.assert(token() === 18 /* OpenBraceToken */); if (nextToken() === 19 /* CloseBraceToken */) { const next = nextToken(); - return next === 27 /* CommaToken */ || next === 18 /* OpenBraceToken */ || next === 94 /* ExtendsKeyword */ || next === 117 /* ImplementsKeyword */; + return next === 27 /* CommaToken */ || next === 18 /* OpenBraceToken */ || next === 95 /* ExtendsKeyword */ || next === 118 /* ImplementsKeyword */; } return true; } @@ -19156,7 +19189,7 @@ return tokenIsIdentifierOrKeywordOrGreaterThan(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 117 /* ImplementsKeyword */ || token() === 94 /* ExtendsKeyword */) { + if (token() === 118 /* ImplementsKeyword */ || token() === 95 /* ExtendsKeyword */) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -19185,13 +19218,13 @@ case 24 /* AssertEntries */: return token() === 19 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: - return token() === 19 /* CloseBraceToken */ || token() === 82 /* CaseKeyword */ || token() === 88 /* DefaultKeyword */; + return token() === 19 /* CloseBraceToken */ || token() === 83 /* CaseKeyword */ || token() === 89 /* DefaultKeyword */; case 7 /* HeritageClauseElement */: - return token() === 18 /* OpenBraceToken */ || token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 18 /* OpenBraceToken */ || token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; case 8 /* VariableDeclarations */: return isVariableDeclaratorListTerminator(); case 19 /* TypeParameters */: - return token() === 31 /* GreaterThanToken */ || token() === 20 /* OpenParenToken */ || token() === 18 /* OpenBraceToken */ || token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 31 /* GreaterThanToken */ || token() === 20 /* OpenParenToken */ || token() === 18 /* OpenBraceToken */ || token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; case 11 /* ArgumentExpressions */: return token() === 21 /* CloseParenToken */ || token() === 26 /* SemicolonToken */; case 15 /* ArrayLiteralMembers */: @@ -19273,7 +19306,7 @@ if (!syntaxCursor || !isReusableParsingContext(parsingContext2) || parseErrorBeforeNextFinishedNode) { return void 0; } - const node = syntaxCursor.currentNode(pos != null ? pos : scanner.getStartPos()); + const node = syntaxCursor.currentNode(pos != null ? pos : scanner.getTokenFullStart()); if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { return void 0; } @@ -19290,7 +19323,7 @@ return node; } function consumeNode(node) { - scanner.setTextPos(node.end); + scanner.resetTokenState(node.end); nextToken(); return node; } @@ -19335,14 +19368,14 @@ function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 173 /* Constructor */: - case 178 /* IndexSignature */: - case 174 /* GetAccessor */: - case 175 /* SetAccessor */: - case 169 /* PropertyDeclaration */: - case 237 /* SemicolonClassElement */: + case 174 /* Constructor */: + case 179 /* IndexSignature */: + case 175 /* GetAccessor */: + case 176 /* SetAccessor */: + case 170 /* PropertyDeclaration */: + case 238 /* SemicolonClassElement */: return true; - case 171 /* MethodDeclaration */: + case 172 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -19353,8 +19386,8 @@ function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 292 /* CaseClause */: - case 293 /* DefaultClause */: + case 293 /* CaseClause */: + case 294 /* DefaultClause */: return true; } } @@ -19363,65 +19396,65 @@ function isReusableStatement(node) { if (node) { switch (node.kind) { - case 259 /* FunctionDeclaration */: - case 240 /* VariableStatement */: - case 238 /* Block */: - case 242 /* IfStatement */: - case 241 /* ExpressionStatement */: - case 254 /* ThrowStatement */: - case 250 /* ReturnStatement */: - case 252 /* SwitchStatement */: - case 249 /* BreakStatement */: - case 248 /* ContinueStatement */: - case 246 /* ForInStatement */: - case 247 /* ForOfStatement */: - case 245 /* ForStatement */: - case 244 /* WhileStatement */: - case 251 /* WithStatement */: - case 239 /* EmptyStatement */: - case 255 /* TryStatement */: - case 253 /* LabeledStatement */: - case 243 /* DoStatement */: - case 256 /* DebuggerStatement */: - case 269 /* ImportDeclaration */: - case 268 /* ImportEqualsDeclaration */: - case 275 /* ExportDeclaration */: - case 274 /* ExportAssignment */: - case 264 /* ModuleDeclaration */: - case 260 /* ClassDeclaration */: - case 261 /* InterfaceDeclaration */: - case 263 /* EnumDeclaration */: - case 262 /* TypeAliasDeclaration */: + case 260 /* FunctionDeclaration */: + case 241 /* VariableStatement */: + case 239 /* Block */: + case 243 /* IfStatement */: + case 242 /* ExpressionStatement */: + case 255 /* ThrowStatement */: + case 251 /* ReturnStatement */: + case 253 /* SwitchStatement */: + case 250 /* BreakStatement */: + case 249 /* ContinueStatement */: + case 247 /* ForInStatement */: + case 248 /* ForOfStatement */: + case 246 /* ForStatement */: + case 245 /* WhileStatement */: + case 252 /* WithStatement */: + case 240 /* EmptyStatement */: + case 256 /* TryStatement */: + case 254 /* LabeledStatement */: + case 244 /* DoStatement */: + case 257 /* DebuggerStatement */: + case 270 /* ImportDeclaration */: + case 269 /* ImportEqualsDeclaration */: + case 276 /* ExportDeclaration */: + case 275 /* ExportAssignment */: + case 265 /* ModuleDeclaration */: + case 261 /* ClassDeclaration */: + case 262 /* InterfaceDeclaration */: + case 264 /* EnumDeclaration */: + case 263 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 302 /* EnumMember */; + return node.kind === 303 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 177 /* ConstructSignature */: - case 170 /* MethodSignature */: - case 178 /* IndexSignature */: - case 168 /* PropertySignature */: - case 176 /* CallSignature */: + case 178 /* ConstructSignature */: + case 171 /* MethodSignature */: + case 179 /* IndexSignature */: + case 169 /* PropertySignature */: + case 177 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 257 /* VariableDeclaration */) { + if (node.kind !== 258 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 166 /* Parameter */) { + if (node.kind !== 167 /* Parameter */) { return false; } const parameter = node; @@ -19438,7 +19471,7 @@ function parsingContextErrors(context) { switch (context) { case 0 /* SourceElements */: - return token() === 88 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(93 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); + return token() === 89 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(94 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); case 1 /* BlockStatements */: return parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); case 2 /* SwitchClauses */: @@ -19504,14 +19537,14 @@ /*inErrorRecovery*/ false )) { - const startPos = scanner.getStartPos(); + const startPos = scanner.getTokenFullStart(); const result = parseListElement(kind, parseElement); if (!result) { parsingContext = saveParsingContext; return void 0; } list.push(result); - commaStart = scanner.getTokenPos(); + commaStart = scanner.getTokenStart(); if (parseOptional(27 /* CommaToken */)) { continue; } @@ -19523,7 +19556,7 @@ if (considerSemicolonAsDelimiter && token() === 26 /* SemicolonToken */ && !scanner.hasPrecedingLineBreak()) { nextToken(); } - if (startPos === scanner.getStartPos()) { + if (startPos === scanner.getTokenFullStart()) { nextToken(); } continue; @@ -19754,14 +19787,14 @@ } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 180 /* TypeReference */: + case 181 /* TypeReference */: return nodeIsMissing(node.typeName); - case 181 /* FunctionType */: - case 182 /* ConstructorType */: { + case 182 /* FunctionType */: + case 183 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 193 /* ParenthesizedType */: + case 194 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -19830,7 +19863,7 @@ function parseJSDocParameter() { const pos = getNodePos(); let name; - if (token() === 108 /* ThisKeyword */ || token() === 103 /* NewKeyword */) { + if (token() === 109 /* ThisKeyword */ || token() === 104 /* NewKeyword */) { name = parseIdentifierName(); parseExpected(58 /* ColonToken */); } @@ -19854,7 +19887,7 @@ function parseJSDocType() { scanner.setInJSDocType(true); const pos = getNodePos(); - if (parseOptional(142 /* ModuleKeyword */)) { + if (parseOptional(143 /* ModuleKeyword */)) { const moduleTag = factory2.createJSDocNamepathType( /*type*/ void 0 @@ -19888,7 +19921,7 @@ } function parseTypeQuery() { const pos = getNodePos(); - parseExpected(112 /* TypeOfKeyword */); + parseExpected(113 /* TypeOfKeyword */); const entityName = parseEntityName( /*allowReservedWords*/ true @@ -19907,7 +19940,7 @@ const name = parseIdentifier(); let constraint; let expression; - if (parseOptional(94 /* ExtendsKeyword */)) { + if (parseOptional(95 /* ExtendsKeyword */)) { if (isStartOfType() || !isStartOfExpression()) { constraint = parseType(); } else { @@ -19960,7 +19993,7 @@ /*allowDecorators*/ true )); - if (token() === 108 /* ThisKeyword */) { + if (token() === 109 /* ThisKeyword */) { const node2 = factory2.createParameterDeclaration( modifiers, /*dotDotDotToken*/ @@ -20053,8 +20086,8 @@ function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 177 /* ConstructSignature */) { - parseExpected(103 /* NewKeyword */); + if (kind === 178 /* ConstructSignature */) { + parseExpected(104 /* NewKeyword */); } const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); @@ -20064,7 +20097,7 @@ true ); parseTypeMemberSemicolon(); - const node = kind === 176 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 177 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -20127,7 +20160,7 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function isTypeMemberStart() { - if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 137 /* GetKeyword */ || token() === 151 /* SetKeyword */) { + if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 138 /* GetKeyword */ || token() === 152 /* SetKeyword */) { return true; } let idToken = false; @@ -20149,10 +20182,10 @@ } function parseTypeMember() { if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) { - return parseSignatureMember(176 /* CallSignature */); + return parseSignatureMember(177 /* CallSignature */); } - if (token() === 103 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(177 /* ConstructSignature */); + if (token() === 104 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { + return parseSignatureMember(178 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -20160,11 +20193,11 @@ /*allowDecorators*/ false ); - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 4 /* Type */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 4 /* Type */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 4 /* Type */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -20204,17 +20237,17 @@ function isStartOfMappedType() { nextToken(); if (token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { - return nextToken() === 146 /* ReadonlyKeyword */; + return nextToken() === 147 /* ReadonlyKeyword */; } - if (token() === 146 /* ReadonlyKeyword */) { + if (token() === 147 /* ReadonlyKeyword */) { nextToken(); } - return token() === 22 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 101 /* InKeyword */; + return token() === 22 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 102 /* InKeyword */; } function parseMappedTypeParameter() { const pos = getNodePos(); const name = parseIdentifierName(); - parseExpected(101 /* InKeyword */); + parseExpected(102 /* InKeyword */); const type = parseType(); return finishNode(factory2.createTypeParameterDeclaration( /*modifiers*/ @@ -20229,15 +20262,15 @@ const pos = getNodePos(); parseExpected(18 /* OpenBraceToken */); let readonlyToken; - if (token() === 146 /* ReadonlyKeyword */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { + if (token() === 147 /* ReadonlyKeyword */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { readonlyToken = parseTokenNode(); - if (readonlyToken.kind !== 146 /* ReadonlyKeyword */) { - parseExpected(146 /* ReadonlyKeyword */); + if (readonlyToken.kind !== 147 /* ReadonlyKeyword */) { + parseExpected(147 /* ReadonlyKeyword */); } } parseExpected(22 /* OpenBracketToken */); const typeParameter = parseMappedTypeParameter(); - const nameType = parseOptional(128 /* AsKeyword */) ? parseType() : void 0; + const nameType = parseOptional(129 /* AsKeyword */) ? parseType() : void 0; parseExpected(23 /* CloseBracketToken */); let questionToken; if (token() === 57 /* QuestionToken */ || token() === 39 /* PlusToken */ || token() === 40 /* MinusToken */) { @@ -20307,10 +20340,10 @@ } function parseModifiersForConstructorType() { let modifiers; - if (token() === 126 /* AbstractKeyword */) { + if (token() === 127 /* AbstractKeyword */) { const pos = getNodePos(); nextToken(); - const modifier = finishNode(factoryCreateToken(126 /* AbstractKeyword */), pos); + const modifier = finishNode(factoryCreateToken(127 /* AbstractKeyword */), pos); modifiers = createNodeArray([modifier], pos); } return modifiers; @@ -20319,7 +20352,7 @@ const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiersForConstructorType(); - const isConstructorType = parseOptional(103 /* NewKeyword */); + const isConstructorType = parseOptional(104 /* NewKeyword */); Debug.assert(!modifiers || isConstructorType, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers."); const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); @@ -20340,7 +20373,7 @@ if (negative) { nextToken(); } - let expression = token() === 110 /* TrueKeyword */ || token() === 95 /* FalseKeyword */ || token() === 104 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); + let expression = token() === 111 /* TrueKeyword */ || token() === 96 /* FalseKeyword */ || token() === 105 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); if (negative) { expression = finishNode(factory2.createPrefixUnaryExpression(40 /* MinusToken */, expression), pos); } @@ -20348,14 +20381,14 @@ } function isStartOfTypeOfImportType() { nextToken(); - return token() === 100 /* ImportKeyword */; + return token() === 101 /* ImportKeyword */; } function parseImportTypeAssertions() { const pos = getNodePos(); - const openBracePosition = scanner.getTokenPos(); + const openBracePosition = scanner.getTokenStart(); parseExpected(18 /* OpenBraceToken */); const multiLine = scanner.hasPrecedingLineBreak(); - parseExpected(130 /* AssertKeyword */); + parseExpected(131 /* AssertKeyword */); parseExpected(58 /* ColonToken */); const clause = parseAssertClause( /*skipAssertKeyword*/ @@ -20375,8 +20408,8 @@ function parseImportType() { sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); - const isTypeOf = parseOptional(112 /* TypeOfKeyword */); - parseExpected(100 /* ImportKeyword */); + const isTypeOf = parseOptional(113 /* TypeOfKeyword */); + parseExpected(101 /* ImportKeyword */); parseExpected(20 /* OpenParenToken */); const type = parseType(); let assertions; @@ -20394,16 +20427,16 @@ } function parseNonArrayType() { switch (token()) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 153 /* SymbolKeyword */: - case 134 /* BooleanKeyword */: - case 155 /* UndefinedKeyword */: - case 144 /* NeverKeyword */: - case 149 /* ObjectKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 154 /* SymbolKeyword */: + case 135 /* BooleanKeyword */: + case 156 /* UndefinedKeyword */: + case 145 /* NeverKeyword */: + case 150 /* ObjectKeyword */: return tryParse(parseKeywordAndNoDot) || parseTypeReference(); case 66 /* AsteriskEqualsToken */: scanner.reScanAsteriskEqualsToken(); @@ -20413,7 +20446,7 @@ scanner.reScanQuestionToken(); case 57 /* QuestionToken */: return parseJSDocUnknownOrNullableType(); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseJSDocFunctionType(); case 53 /* ExclamationToken */: return parseJSDocNonNullableType(); @@ -20421,26 +20454,26 @@ case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 104 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 105 /* NullKeyword */: return parseLiteralTypeNode(); case 40 /* MinusToken */: return lookAhead(nextTokenIsNumericOrBigIntLiteral) ? parseLiteralTypeNode( /*negative*/ true ) : parseTypeReference(); - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return parseTokenNode(); - case 108 /* ThisKeyword */: { + case 109 /* ThisKeyword */: { const thisKeyword = parseThisTypeNode(); - if (token() === 140 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 141 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - case 112 /* TypeOfKeyword */: + case 113 /* TypeOfKeyword */: return lookAhead(isStartOfTypeOfImportType) ? parseImportType() : parseTypeQuery(); case 18 /* OpenBraceToken */: return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); @@ -20448,9 +20481,9 @@ return parseTupleType(); case 20 /* OpenParenToken */: return parseParenthesizedType(); - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return parseImportType(); - case 129 /* AssertsKeyword */: + case 130 /* AssertsKeyword */: return lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine) ? parseAssertsTypePredicate() : parseTypeReference(); case 15 /* TemplateHead */: return parseTemplateType(); @@ -20460,44 +20493,44 @@ } function isStartOfType(inStartOfParameter) { switch (token()) { - case 131 /* AnyKeyword */: - case 157 /* UnknownKeyword */: - case 152 /* StringKeyword */: - case 148 /* NumberKeyword */: - case 160 /* BigIntKeyword */: - case 134 /* BooleanKeyword */: - case 146 /* ReadonlyKeyword */: - case 153 /* SymbolKeyword */: - case 156 /* UniqueKeyword */: - case 114 /* VoidKeyword */: - case 155 /* UndefinedKeyword */: - case 104 /* NullKeyword */: - case 108 /* ThisKeyword */: - case 112 /* TypeOfKeyword */: - case 144 /* NeverKeyword */: + case 132 /* AnyKeyword */: + case 158 /* UnknownKeyword */: + case 153 /* StringKeyword */: + case 149 /* NumberKeyword */: + case 161 /* BigIntKeyword */: + case 135 /* BooleanKeyword */: + case 147 /* ReadonlyKeyword */: + case 154 /* SymbolKeyword */: + case 157 /* UniqueKeyword */: + case 115 /* VoidKeyword */: + case 156 /* UndefinedKeyword */: + case 105 /* NullKeyword */: + case 109 /* ThisKeyword */: + case 113 /* TypeOfKeyword */: + case 145 /* NeverKeyword */: case 18 /* OpenBraceToken */: case 22 /* OpenBracketToken */: case 29 /* LessThanToken */: case 51 /* BarToken */: case 50 /* AmpersandToken */: - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: case 10 /* StringLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: - case 149 /* ObjectKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: + case 150 /* ObjectKeyword */: case 41 /* AsteriskToken */: case 57 /* QuestionToken */: case 53 /* ExclamationToken */: case 25 /* DotDotDotToken */: - case 138 /* InferKeyword */: - case 100 /* ImportKeyword */: - case 129 /* AssertsKeyword */: + case 139 /* InferKeyword */: + case 101 /* ImportKeyword */: + case 130 /* AssertsKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: return true; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return !inStartOfParameter; case 40 /* MinusToken */: return !inStartOfParameter && lookAhead(nextTokenIsNumericOrBigIntLiteral); @@ -20561,7 +20594,7 @@ return finishNode(factory2.createTypeOperatorNode(operator, parseTypeOperatorOrHigher()), pos); } function tryParseConstraintOfInferType() { - if (parseOptional(94 /* ExtendsKeyword */)) { + if (parseOptional(95 /* ExtendsKeyword */)) { const constraint = disallowConditionalTypesAnd(parseType); if (inDisallowConditionalTypesContext() || token() !== 57 /* QuestionToken */) { return constraint; @@ -20582,17 +20615,17 @@ } function parseInferType() { const pos = getNodePos(); - parseExpected(138 /* InferKeyword */); + parseExpected(139 /* InferKeyword */); return finishNode(factory2.createInferTypeNode(parseTypeParameterOfInferType()), pos); } function parseTypeOperatorOrHigher() { const operator = token(); switch (operator) { - case 141 /* KeyOfKeyword */: - case 156 /* UniqueKeyword */: - case 146 /* ReadonlyKeyword */: + case 142 /* KeyOfKeyword */: + case 157 /* UniqueKeyword */: + case 147 /* ReadonlyKeyword */: return parseTypeOperator(operator); - case 138 /* InferKeyword */: + case 139 /* InferKeyword */: return parseInferType(); } return allowConditionalTypesAnd(parsePostfixTypeOrHigher); @@ -20633,7 +20666,7 @@ } function nextTokenIsNewKeyword() { nextToken(); - return token() === 103 /* NewKeyword */; + return token() === 104 /* NewKeyword */; } function isStartOfFunctionTypeOrConstructorType() { if (token() === 29 /* LessThanToken */) { @@ -20642,7 +20675,7 @@ if (token() === 20 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType)) { return true; } - return token() === 103 /* NewKeyword */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); + return token() === 104 /* NewKeyword */ || token() === 127 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); } function skipParameterStart() { if (isModifierKind(token())) { @@ -20651,7 +20684,7 @@ false ); } - if (isIdentifier2() || token() === 108 /* ThisKeyword */) { + if (isIdentifier2() || token() === 109 /* ThisKeyword */) { nextToken(); return true; } @@ -20697,16 +20730,16 @@ } function parseTypePredicatePrefix() { const id = parseIdentifier(); - if (token() === 140 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 141 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { nextToken(); return id; } } function parseAssertsTypePredicate() { const pos = getNodePos(); - const assertsModifier = parseExpectedToken(129 /* AssertsKeyword */); - const parameterName = token() === 108 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); - const type = parseOptional(140 /* IsKeyword */) ? parseType() : void 0; + const assertsModifier = parseExpectedToken(130 /* AssertsKeyword */); + const parameterName = token() === 109 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); + const type = parseOptional(141 /* IsKeyword */) ? parseType() : void 0; return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); } function parseType() { @@ -20718,7 +20751,7 @@ } const pos = getNodePos(); const type = parseUnionTypeOrHigher(); - if (!inDisallowConditionalTypesContext() && !scanner.hasPrecedingLineBreak() && parseOptional(94 /* ExtendsKeyword */)) { + if (!inDisallowConditionalTypesContext() && !scanner.hasPrecedingLineBreak() && parseOptional(95 /* ExtendsKeyword */)) { const extendsType = disallowConditionalTypesAnd(parseType); parseExpected(57 /* QuestionToken */); const trueType = allowConditionalTypesAnd(parseType); @@ -20733,11 +20766,11 @@ } function isStartOfLeftHandSideExpression() { switch (token()) { - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: @@ -20746,14 +20779,14 @@ case 20 /* OpenParenToken */: case 22 /* OpenBracketToken */: case 18 /* OpenBraceToken */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 103 /* NewKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 104 /* NewKeyword */: case 43 /* SlashToken */: case 68 /* SlashEqualsToken */: case 79 /* Identifier */: return true; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return lookAhead(nextTokenIsOpenParenOrLessThanOrDot); default: return isIdentifier2(); @@ -20768,14 +20801,14 @@ case 40 /* MinusToken */: case 54 /* TildeToken */: case 53 /* ExclamationToken */: - case 89 /* DeleteKeyword */: - case 112 /* TypeOfKeyword */: - case 114 /* VoidKeyword */: + case 90 /* DeleteKeyword */: + case 113 /* TypeOfKeyword */: + case 115 /* VoidKeyword */: case 45 /* PlusPlusToken */: case 46 /* MinusMinusToken */: case 29 /* LessThanToken */: - case 133 /* AwaitKeyword */: - case 125 /* YieldKeyword */: + case 134 /* AwaitKeyword */: + case 126 /* YieldKeyword */: case 80 /* PrivateIdentifier */: case 59 /* AtToken */: return true; @@ -20787,7 +20820,7 @@ } } function isStartOfExpressionStatement() { - return token() !== 18 /* OpenBraceToken */ && token() !== 98 /* FunctionKeyword */ && token() !== 84 /* ClassKeyword */ && token() !== 59 /* AtToken */ && isStartOfExpression(); + return token() !== 18 /* OpenBraceToken */ && token() !== 99 /* FunctionKeyword */ && token() !== 85 /* ClassKeyword */ && token() !== 59 /* AtToken */ && isStartOfExpression(); } function parseExpression() { const saveDecoratorContext = inDecoratorContext(); @@ -20848,7 +20881,7 @@ return parseConditionalExpressionRest(expr, pos, allowReturnTypeInArrowFunction); } function isYieldExpression() { - if (token() === 125 /* YieldKeyword */) { + if (token() === 126 /* YieldKeyword */) { if (inYieldContext()) { return true; } @@ -20931,7 +20964,7 @@ ) : tryParse(() => parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction)); } function isParenthesizedArrowFunctionExpression() { - if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 132 /* AsyncKeyword */) { + if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */ || token() === 133 /* AsyncKeyword */) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } if (token() === 38 /* EqualsGreaterThanToken */) { @@ -20940,7 +20973,7 @@ return 0 /* False */; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { nextToken(); if (scanner.hasPrecedingLineBreak()) { return 0 /* False */; @@ -20969,13 +21002,13 @@ if (second === 25 /* DotDotDotToken */) { return 1 /* True */; } - if (isModifierKind(second) && second !== 132 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { - if (nextToken() === 128 /* AsKeyword */) { + if (isModifierKind(second) && second !== 133 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { + if (nextToken() === 129 /* AsKeyword */) { return 0 /* False */; } return 1 /* True */; } - if (!isIdentifier2() && second !== 108 /* ThisKeyword */) { + if (!isIdentifier2() && second !== 109 /* ThisKeyword */) { return 0 /* False */; } switch (nextToken()) { @@ -20995,14 +21028,14 @@ return 0 /* False */; } else { Debug.assert(first2 === 29 /* LessThanToken */); - if (!isIdentifier2() && token() !== 85 /* ConstKeyword */) { + if (!isIdentifier2() && token() !== 86 /* ConstKeyword */) { return 0 /* False */; } if (languageVariant === 1 /* JSX */) { const isArrowFunctionInJsx = lookAhead(() => { - parseOptional(85 /* ConstKeyword */); + parseOptional(86 /* ConstKeyword */); const third = nextToken(); - if (third === 94 /* ExtendsKeyword */) { + if (third === 95 /* ExtendsKeyword */) { const fourth = nextToken(); switch (fourth) { case 63 /* EqualsToken */: @@ -21026,7 +21059,7 @@ } } function parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { - const tokenPos = scanner.getTokenPos(); + const tokenPos = scanner.getTokenStart(); if (notParenthesizedArrow == null ? void 0 : notParenthesizedArrow.has(tokenPos)) { return void 0; } @@ -21041,7 +21074,7 @@ return result; } function tryParseAsyncSimpleArrowFunctionExpression(allowReturnTypeInArrowFunction) { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { const pos = getNodePos(); const asyncModifier = parseModifiersForArrowFunction(); @@ -21052,7 +21085,7 @@ return void 0; } function isUnParenthesizedAsyncArrowFunctionWorker() { - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { nextToken(); if (scanner.hasPrecedingLineBreak() || token() === 38 /* EqualsGreaterThanToken */) { return 0 /* False */; @@ -21100,7 +21133,7 @@ return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 193 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 194 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -21122,7 +21155,7 @@ if (token() === 18 /* OpenBraceToken */) { return parseFunctionBlock(isAsync ? 2 /* Await */ : 0 /* None */); } - if (token() !== 26 /* SemicolonToken */ && token() !== 98 /* FunctionKeyword */ && token() !== 84 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { + if (token() !== 26 /* SemicolonToken */ && token() !== 99 /* FunctionKeyword */ && token() !== 85 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { return parseFunctionBlock(16 /* IgnoreMissingOpenBrace */ | (isAsync ? 2 /* Await */ : 0 /* None */)); } const savedTopLevel = topLevel; @@ -21163,7 +21196,7 @@ return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 101 /* InKeyword */ || t === 162 /* OfKeyword */; + return t === 102 /* InKeyword */ || t === 163 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -21173,16 +21206,16 @@ if (!consumeCurrentOperator) { break; } - if (token() === 101 /* InKeyword */ && inDisallowInContext()) { + if (token() === 102 /* InKeyword */ && inDisallowInContext()) { break; } - if (token() === 128 /* AsKeyword */ || token() === 150 /* SatisfiesKeyword */) { + if (token() === 129 /* AsKeyword */ || token() === 151 /* SatisfiesKeyword */) { if (scanner.hasPrecedingLineBreak()) { break; } else { const keywordKind = token(); nextToken(); - leftOperand = keywordKind === 150 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); + leftOperand = keywordKind === 151 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); } } else { leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence), pos); @@ -21191,7 +21224,7 @@ return leftOperand; } function isBinaryOperator2() { - if (inDisallowInContext() && token() === 101 /* InKeyword */) { + if (inDisallowInContext() && token() === 102 /* InKeyword */) { return false; } return getBinaryOperatorPrecedence(token()) > 0; @@ -21222,7 +21255,7 @@ return finishNode(factory2.createVoidExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos); } function isAwaitExpression2() { - if (token() === 133 /* AwaitKeyword */) { + if (token() === 134 /* AwaitKeyword */) { if (inAwaitContext()) { return true; } @@ -21245,7 +21278,7 @@ if (token() === 42 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 213 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 214 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { parseErrorAt(pos, end, Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, tokenToString(unaryOperator)); @@ -21260,11 +21293,11 @@ case 54 /* TildeToken */: case 53 /* ExclamationToken */: return parsePrefixUnaryExpression(); - case 89 /* DeleteKeyword */: + case 90 /* DeleteKeyword */: return parseDeleteExpression(); - case 112 /* TypeOfKeyword */: + case 113 /* TypeOfKeyword */: return parseTypeOfExpression(); - case 114 /* VoidKeyword */: + case 115 /* VoidKeyword */: return parseVoidExpression(); case 29 /* LessThanToken */: if (languageVariant === 1 /* JSX */) { @@ -21274,7 +21307,7 @@ ); } return parseTypeAssertion(); - case 133 /* AwaitKeyword */: + case 134 /* AwaitKeyword */: if (isAwaitExpression2()) { return parseAwaitExpression(); } @@ -21288,10 +21321,10 @@ case 40 /* MinusToken */: case 54 /* TildeToken */: case 53 /* ExclamationToken */: - case 89 /* DeleteKeyword */: - case 112 /* TypeOfKeyword */: - case 114 /* VoidKeyword */: - case 133 /* AwaitKeyword */: + case 90 /* DeleteKeyword */: + case 113 /* TypeOfKeyword */: + case 115 /* VoidKeyword */: + case 134 /* AwaitKeyword */: return false; case 29 /* LessThanToken */: if (languageVariant !== 1 /* JSX */) { @@ -21323,20 +21356,20 @@ function parseLeftHandSideExpressionOrHigher() { const pos = getNodePos(); let expression; - if (token() === 100 /* ImportKeyword */) { + if (token() === 101 /* ImportKeyword */) { if (lookAhead(nextTokenIsOpenParenOrLessThan)) { sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; expression = parseTokenNode(); } else if (lookAhead(nextTokenIsDot)) { nextToken(); nextToken(); - expression = finishNode(factory2.createMetaProperty(100 /* ImportKeyword */, parseIdentifierName()), pos); + expression = finishNode(factory2.createMetaProperty(101 /* ImportKeyword */, parseIdentifierName()), pos); sourceFlags |= 4194304 /* PossiblyContainsImportMeta */; } else { expression = parseMemberExpressionOrHigher(); } } else { - expression = token() === 106 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); + expression = token() === 107 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); } return parseCallExpressionRest(pos, expression); } @@ -21378,11 +21411,11 @@ const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 283 /* JsxOpeningElement */) { + if (opening.kind === 284 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 281 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 282 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -21406,10 +21439,10 @@ } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 286 /* JsxOpeningFragment */) { + } else if (opening.kind === 287 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 282 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 283 /* JsxSelfClosingElement */); result = opening; } if (inExpressionContext && token() === 29 /* LessThanToken */) { @@ -21482,7 +21515,7 @@ if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 281 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 282 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -21529,7 +21562,7 @@ function parseJsxElementName() { const pos = getNodePos(); scanJsxIdentifier(); - let expression = token() === 108 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); + let expression = token() === 109 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName(); while (parseOptional(24 /* DotToken */)) { expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot( /*allowIdentifierNames*/ @@ -21732,7 +21765,7 @@ continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 230 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 231 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -21792,7 +21825,7 @@ } } if (typeArguments || token() === 20 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 231 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -21856,11 +21889,11 @@ case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return parseLiteralNode(); - case 108 /* ThisKeyword */: - case 106 /* SuperKeyword */: - case 104 /* NullKeyword */: - case 110 /* TrueKeyword */: - case 95 /* FalseKeyword */: + case 109 /* ThisKeyword */: + case 107 /* SuperKeyword */: + case 105 /* NullKeyword */: + case 111 /* TrueKeyword */: + case 96 /* FalseKeyword */: return parseTokenNode(); case 20 /* OpenParenToken */: return parseParenthesizedExpression(); @@ -21868,18 +21901,18 @@ return parseArrayLiteralExpression(); case 18 /* OpenBraceToken */: return parseObjectLiteralExpression(); - case 132 /* AsyncKeyword */: + case 133 /* AsyncKeyword */: if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { break; } return parseFunctionExpression(); case 59 /* AtToken */: return parseDecoratedExpression(); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassExpression(); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionExpression(); - case 103 /* NewKeyword */: + case 104 /* NewKeyword */: return parseNewExpressionOrNewDotTarget(); case 43 /* SlashToken */: case 68 /* SlashEqualsToken */: @@ -21925,7 +21958,7 @@ } function parseArrayLiteralExpression() { const pos = getNodePos(); - const openBracketPosition = scanner.getTokenPos(); + const openBracketPosition = scanner.getTokenStart(); const openBracketParsed = parseExpected(22 /* OpenBracketToken */); const multiLine = scanner.hasPrecedingLineBreak(); const elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); @@ -21946,11 +21979,11 @@ /*allowDecorators*/ true ); - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 0 /* None */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -21985,7 +22018,7 @@ } function parseObjectLiteralExpression() { const pos = getNodePos(); - const openBracePosition = scanner.getTokenPos(); + const openBracePosition = scanner.getTokenStart(); const openBraceParsed = parseExpected(18 /* OpenBraceToken */); const multiLine = scanner.hasPrecedingLineBreak(); const properties = parseDelimitedList( @@ -22009,7 +22042,7 @@ /*allowDecorators*/ false ); - parseExpected(98 /* FunctionKeyword */); + parseExpected(99 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */; @@ -22031,10 +22064,10 @@ } function parseNewExpressionOrNewDotTarget() { const pos = getNodePos(); - parseExpected(103 /* NewKeyword */); + parseExpected(104 /* NewKeyword */); if (parseOptional(24 /* DotToken */)) { const name = parseIdentifierName(); - return finishNode(factory2.createMetaProperty(103 /* NewKeyword */, name), pos); + return finishNode(factory2.createMetaProperty(104 /* NewKeyword */, name), pos); } const expressionPos = getNodePos(); let expression = parseMemberExpressionRest( @@ -22044,7 +22077,7 @@ false ); let typeArguments; - if (expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (expression.kind === 231 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -22057,7 +22090,7 @@ function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - const openBracePosition = scanner.getTokenPos(); + const openBracePosition = scanner.getTokenStart(); const openBraceParsed = parseExpected(18 /* OpenBraceToken */, diagnosticMessage); if (openBraceParsed || ignoreMissingOpenBrace) { const multiLine = scanner.hasPrecedingLineBreak(); @@ -22113,22 +22146,22 @@ function parseIfStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(99 /* IfKeyword */); - const openParenPosition = scanner.getTokenPos(); + parseExpected(100 /* IfKeyword */); + const openParenPosition = scanner.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); const thenStatement = parseStatement(); - const elseStatement = parseOptional(91 /* ElseKeyword */) ? parseStatement() : void 0; + const elseStatement = parseOptional(92 /* ElseKeyword */) ? parseStatement() : void 0; return withJSDoc(finishNode(factoryCreateIfStatement(expression, thenStatement, elseStatement), pos), hasJSDoc); } function parseDoStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(90 /* DoKeyword */); + parseExpected(91 /* DoKeyword */); const statement = parseStatement(); - parseExpected(115 /* WhileKeyword */); - const openParenPosition = scanner.getTokenPos(); + parseExpected(116 /* WhileKeyword */); + const openParenPosition = scanner.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -22138,8 +22171,8 @@ function parseWhileStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(115 /* WhileKeyword */); - const openParenPosition = scanner.getTokenPos(); + parseExpected(116 /* WhileKeyword */); + const openParenPosition = scanner.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -22149,12 +22182,12 @@ function parseForOrForInOrForOfStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(97 /* ForKeyword */); - const awaitToken = parseOptionalToken(133 /* AwaitKeyword */); + parseExpected(98 /* ForKeyword */); + const awaitToken = parseOptionalToken(134 /* AwaitKeyword */); parseExpected(20 /* OpenParenToken */); let initializer; if (token() !== 26 /* SemicolonToken */) { - if (token() === 113 /* VarKeyword */ || token() === 119 /* LetKeyword */ || token() === 85 /* ConstKeyword */) { + if (token() === 114 /* VarKeyword */ || token() === 120 /* LetKeyword */ || token() === 86 /* ConstKeyword */) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -22164,14 +22197,14 @@ } } let node; - if (awaitToken ? parseExpected(162 /* OfKeyword */) : parseOptional(162 /* OfKeyword */)) { + if (awaitToken ? parseExpected(163 /* OfKeyword */) : parseOptional(163 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ true )); parseExpected(21 /* CloseParenToken */); node = factoryCreateForOfStatement(awaitToken, initializer, expression, parseStatement()); - } else if (parseOptional(101 /* InKeyword */)) { + } else if (parseOptional(102 /* InKeyword */)) { const expression = allowInAnd(parseExpression); parseExpected(21 /* CloseParenToken */); node = factory2.createForInStatement(initializer, expression, parseStatement()); @@ -22188,16 +22221,16 @@ function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 249 /* BreakStatement */ ? 81 /* BreakKeyword */ : 86 /* ContinueKeyword */); + parseExpected(kind === 250 /* BreakStatement */ ? 82 /* BreakKeyword */ : 87 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 249 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 250 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(105 /* ReturnKeyword */); + parseExpected(106 /* ReturnKeyword */); const expression = canParseSemicolon() ? void 0 : allowInAnd(parseExpression); parseSemicolon(); return withJSDoc(finishNode(factory2.createReturnStatement(expression), pos), hasJSDoc); @@ -22205,8 +22238,8 @@ function parseWithStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(116 /* WithKeyword */); - const openParenPosition = scanner.getTokenPos(); + parseExpected(117 /* WithKeyword */); + const openParenPosition = scanner.getTokenStart(); const openParenParsed = parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition); @@ -22216,7 +22249,7 @@ function parseCaseClause() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(82 /* CaseKeyword */); + parseExpected(83 /* CaseKeyword */); const expression = allowInAnd(parseExpression); parseExpected(58 /* ColonToken */); const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); @@ -22224,13 +22257,13 @@ } function parseDefaultClause() { const pos = getNodePos(); - parseExpected(88 /* DefaultKeyword */); + parseExpected(89 /* DefaultKeyword */); parseExpected(58 /* ColonToken */); const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); return finishNode(factory2.createDefaultClause(statements), pos); } function parseCaseOrDefaultClause() { - return token() === 82 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + return token() === 83 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseCaseBlock() { const pos = getNodePos(); @@ -22242,7 +22275,7 @@ function parseSwitchStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(107 /* SwitchKeyword */); + parseExpected(108 /* SwitchKeyword */); parseExpected(20 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpected(21 /* CloseParenToken */); @@ -22252,7 +22285,7 @@ function parseThrowStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(109 /* ThrowKeyword */); + parseExpected(110 /* ThrowKeyword */); let expression = scanner.hasPrecedingLineBreak() ? void 0 : allowInAnd(parseExpression); if (expression === void 0) { identifierCount++; @@ -22266,15 +22299,15 @@ function parseTryStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(111 /* TryKeyword */); + parseExpected(112 /* TryKeyword */); const tryBlock = parseBlock( /*ignoreMissingOpenBrace*/ false ); - const catchClause = token() === 83 /* CatchKeyword */ ? parseCatchClause() : void 0; + const catchClause = token() === 84 /* CatchKeyword */ ? parseCatchClause() : void 0; let finallyBlock; - if (!catchClause || token() === 96 /* FinallyKeyword */) { - parseExpected(96 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); + if (!catchClause || token() === 97 /* FinallyKeyword */) { + parseExpected(97 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); finallyBlock = parseBlock( /*ignoreMissingOpenBrace*/ false @@ -22284,7 +22317,7 @@ } function parseCatchClause() { const pos = getNodePos(); - parseExpected(83 /* CatchKeyword */); + parseExpected(84 /* CatchKeyword */); let variableDeclaration; if (parseOptional(20 /* OpenParenToken */)) { variableDeclaration = parseVariableDeclaration(); @@ -22301,7 +22334,7 @@ function parseDebuggerStatement() { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(87 /* DebuggerKeyword */); + parseExpected(88 /* DebuggerKeyword */); parseSemicolon(); return withJSDoc(finishNode(factory2.createDebuggerStatement(), pos), hasJSDoc); } @@ -22330,11 +22363,11 @@ } function nextTokenIsClassKeywordOnSameLine() { nextToken(); - return token() === 84 /* ClassKeyword */ && !scanner.hasPrecedingLineBreak(); + return token() === 85 /* ClassKeyword */ && !scanner.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token() === 98 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); + return token() === 99 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine() { nextToken(); @@ -22343,48 +22376,48 @@ function isDeclaration2() { while (true) { switch (token()) { - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: return true; - case 118 /* InterfaceKeyword */: - case 154 /* TypeKeyword */: + case 119 /* InterfaceKeyword */: + case 155 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 146 /* ReadonlyKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 147 /* ReadonlyKeyword */: nextToken(); if (scanner.hasPrecedingLineBreak()) { return false; } continue; - case 159 /* GlobalKeyword */: + case 160 /* GlobalKeyword */: nextToken(); - return token() === 18 /* OpenBraceToken */ || token() === 79 /* Identifier */ || token() === 93 /* ExportKeyword */; - case 100 /* ImportKeyword */: + return token() === 18 /* OpenBraceToken */ || token() === 79 /* Identifier */ || token() === 94 /* ExportKeyword */; + case 101 /* ImportKeyword */: nextToken(); return token() === 10 /* StringLiteral */ || token() === 41 /* AsteriskToken */ || token() === 18 /* OpenBraceToken */ || tokenIsIdentifierOrKeyword(token()); - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: let currentToken2 = nextToken(); - if (currentToken2 === 154 /* TypeKeyword */) { + if (currentToken2 === 155 /* TypeKeyword */) { currentToken2 = lookAhead(nextToken); } - if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 88 /* DefaultKeyword */ || currentToken2 === 128 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) { + if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 89 /* DefaultKeyword */ || currentToken2 === 129 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) { return true; } continue; - case 124 /* StaticKeyword */: + case 125 /* StaticKeyword */: nextToken(); continue; default: @@ -22400,45 +22433,45 @@ case 59 /* AtToken */: case 26 /* SemicolonToken */: case 18 /* OpenBraceToken */: - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 98 /* FunctionKeyword */: - case 84 /* ClassKeyword */: - case 92 /* EnumKeyword */: - case 99 /* IfKeyword */: - case 90 /* DoKeyword */: - case 115 /* WhileKeyword */: - case 97 /* ForKeyword */: - case 86 /* ContinueKeyword */: - case 81 /* BreakKeyword */: - case 105 /* ReturnKeyword */: - case 116 /* WithKeyword */: - case 107 /* SwitchKeyword */: - case 109 /* ThrowKeyword */: - case 111 /* TryKeyword */: - case 87 /* DebuggerKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 99 /* FunctionKeyword */: + case 85 /* ClassKeyword */: + case 93 /* EnumKeyword */: + case 100 /* IfKeyword */: + case 91 /* DoKeyword */: + case 116 /* WhileKeyword */: + case 98 /* ForKeyword */: + case 87 /* ContinueKeyword */: + case 82 /* BreakKeyword */: + case 106 /* ReturnKeyword */: + case 117 /* WithKeyword */: + case 108 /* SwitchKeyword */: + case 110 /* ThrowKeyword */: + case 112 /* TryKeyword */: + case 88 /* DebuggerKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return true; - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThanOrDot); - case 85 /* ConstKeyword */: - case 93 /* ExportKeyword */: + case 86 /* ConstKeyword */: + case 94 /* ExportKeyword */: return isStartOfDeclaration(); - case 132 /* AsyncKeyword */: - case 136 /* DeclareKeyword */: - case 118 /* InterfaceKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 154 /* TypeKeyword */: - case 159 /* GlobalKeyword */: + case 133 /* AsyncKeyword */: + case 137 /* DeclareKeyword */: + case 119 /* InterfaceKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 155 /* TypeKeyword */: + case 160 /* GlobalKeyword */: return true; - case 127 /* AccessorKeyword */: - case 123 /* PublicKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 124 /* StaticKeyword */: - case 146 /* ReadonlyKeyword */: + case 128 /* AccessorKeyword */: + case 124 /* PublicKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 125 /* StaticKeyword */: + case 147 /* ReadonlyKeyword */: return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); default: return isStartOfExpression(); @@ -22460,14 +22493,14 @@ /*ignoreMissingOpenBrace*/ false ); - case 113 /* VarKeyword */: + case 114 /* VarKeyword */: return parseVariableStatement( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 119 /* LetKeyword */: + case 120 /* LetKeyword */: if (isLetDeclaration()) { return parseVariableStatement( getNodePos(), @@ -22477,66 +22510,66 @@ ); } break; - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionDeclaration( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassDeclaration( getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ void 0 ); - case 99 /* IfKeyword */: + case 100 /* IfKeyword */: return parseIfStatement(); - case 90 /* DoKeyword */: + case 91 /* DoKeyword */: return parseDoStatement(); - case 115 /* WhileKeyword */: + case 116 /* WhileKeyword */: return parseWhileStatement(); - case 97 /* ForKeyword */: + case 98 /* ForKeyword */: return parseForOrForInOrForOfStatement(); - case 86 /* ContinueKeyword */: - return parseBreakOrContinueStatement(248 /* ContinueStatement */); - case 81 /* BreakKeyword */: - return parseBreakOrContinueStatement(249 /* BreakStatement */); - case 105 /* ReturnKeyword */: + case 87 /* ContinueKeyword */: + return parseBreakOrContinueStatement(249 /* ContinueStatement */); + case 82 /* BreakKeyword */: + return parseBreakOrContinueStatement(250 /* BreakStatement */); + case 106 /* ReturnKeyword */: return parseReturnStatement(); - case 116 /* WithKeyword */: + case 117 /* WithKeyword */: return parseWithStatement(); - case 107 /* SwitchKeyword */: + case 108 /* SwitchKeyword */: return parseSwitchStatement(); - case 109 /* ThrowKeyword */: + case 110 /* ThrowKeyword */: return parseThrowStatement(); - case 111 /* TryKeyword */: - case 83 /* CatchKeyword */: - case 96 /* FinallyKeyword */: + case 112 /* TryKeyword */: + case 84 /* CatchKeyword */: + case 97 /* FinallyKeyword */: return parseTryStatement(); - case 87 /* DebuggerKeyword */: + case 88 /* DebuggerKeyword */: return parseDebuggerStatement(); case 59 /* AtToken */: return parseDeclaration(); - case 132 /* AsyncKeyword */: - case 118 /* InterfaceKeyword */: - case 154 /* TypeKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: - case 136 /* DeclareKeyword */: - case 85 /* ConstKeyword */: - case 92 /* EnumKeyword */: - case 93 /* ExportKeyword */: - case 100 /* ImportKeyword */: - case 121 /* PrivateKeyword */: - case 122 /* ProtectedKeyword */: - case 123 /* PublicKeyword */: - case 126 /* AbstractKeyword */: - case 127 /* AccessorKeyword */: - case 124 /* StaticKeyword */: - case 146 /* ReadonlyKeyword */: - case 159 /* GlobalKeyword */: + case 133 /* AsyncKeyword */: + case 119 /* InterfaceKeyword */: + case 155 /* TypeKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: + case 137 /* DeclareKeyword */: + case 86 /* ConstKeyword */: + case 93 /* EnumKeyword */: + case 94 /* ExportKeyword */: + case 101 /* ImportKeyword */: + case 122 /* PrivateKeyword */: + case 123 /* ProtectedKeyword */: + case 124 /* PublicKeyword */: + case 127 /* AbstractKeyword */: + case 128 /* AccessorKeyword */: + case 125 /* StaticKeyword */: + case 147 /* ReadonlyKeyword */: + case 160 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -22545,7 +22578,7 @@ return parseExpressionOrLabeledStatement(); } function isDeclareModifier(modifier) { - return modifier.kind === 136 /* DeclareKeyword */; + return modifier.kind === 137 /* DeclareKeyword */; } function parseDeclaration() { const pos = getNodePos(); @@ -22578,33 +22611,33 @@ } function parseDeclarationWorker(pos, hasJSDoc, modifiersIn) { switch (token()) { - case 113 /* VarKeyword */: - case 119 /* LetKeyword */: - case 85 /* ConstKeyword */: + case 114 /* VarKeyword */: + case 120 /* LetKeyword */: + case 86 /* ConstKeyword */: return parseVariableStatement(pos, hasJSDoc, modifiersIn); - case 98 /* FunctionKeyword */: + case 99 /* FunctionKeyword */: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); - case 84 /* ClassKeyword */: + case 85 /* ClassKeyword */: return parseClassDeclaration(pos, hasJSDoc, modifiersIn); - case 118 /* InterfaceKeyword */: + case 119 /* InterfaceKeyword */: return parseInterfaceDeclaration(pos, hasJSDoc, modifiersIn); - case 154 /* TypeKeyword */: + case 155 /* TypeKeyword */: return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); - case 92 /* EnumKeyword */: + case 93 /* EnumKeyword */: return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 159 /* GlobalKeyword */: - case 142 /* ModuleKeyword */: - case 143 /* NamespaceKeyword */: + case 160 /* GlobalKeyword */: + case 143 /* ModuleKeyword */: + case 144 /* NamespaceKeyword */: return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); - case 100 /* ImportKeyword */: + case 101 /* ImportKeyword */: return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiersIn); - case 93 /* ExportKeyword */: + case 94 /* ExportKeyword */: nextToken(); switch (token()) { - case 88 /* DefaultKeyword */: + case 89 /* DefaultKeyword */: case 63 /* EqualsToken */: return parseExportAssignment(pos, hasJSDoc, modifiersIn); - case 128 /* AsKeyword */: + case 129 /* AsKeyword */: return parseNamespaceExportDeclaration(pos, hasJSDoc, modifiersIn); default: return parseExportDeclaration(pos, hasJSDoc, modifiersIn); @@ -22612,7 +22645,7 @@ default: if (modifiersIn) { const missing = createMissingNode( - 279 /* MissingDeclaration */, + 280 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -22722,12 +22755,12 @@ const pos = getNodePos(); let flags = 0; switch (token()) { - case 113 /* VarKeyword */: + case 114 /* VarKeyword */: break; - case 119 /* LetKeyword */: + case 120 /* LetKeyword */: flags |= 1 /* Let */; break; - case 85 /* ConstKeyword */: + case 86 /* ConstKeyword */: flags |= 2 /* Const */; break; default: @@ -22735,7 +22768,7 @@ } nextToken(); let declarations; - if (token() === 162 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 163 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -22763,7 +22796,7 @@ function parseFunctionDeclaration(pos, hasJSDoc, modifiers) { const savedAwaitContext = inAwaitContext(); const modifierFlags = modifiersToFlags(modifiers); - parseExpected(98 /* FunctionKeyword */); + parseExpected(99 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; @@ -22786,8 +22819,8 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseConstructorName() { - if (token() === 135 /* ConstructorKeyword */) { - return parseExpected(135 /* ConstructorKeyword */); + if (token() === 136 /* ConstructorKeyword */) { + return parseExpected(136 /* ConstructorKeyword */); } if (token() === 10 /* StringLiteral */ && lookAhead(nextToken) === 20 /* OpenParenToken */) { return tryParse(() => { @@ -22881,7 +22914,7 @@ false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 174 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 175 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -22910,7 +22943,7 @@ return true; } if (idToken !== void 0) { - if (!isKeyword(idToken) || idToken === 151 /* SetKeyword */ || idToken === 137 /* GetKeyword */) { + if (!isKeyword(idToken) || idToken === 152 /* SetKeyword */ || idToken === 138 /* GetKeyword */) { return true; } switch (token()) { @@ -22928,7 +22961,7 @@ return false; } function parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers) { - parseExpectedToken(124 /* StaticKeyword */); + parseExpectedToken(125 /* StaticKeyword */); const body = parseClassStaticBlockBody(); const node = withJSDoc(finishNode(factory2.createClassStaticBlockDeclaration(body), pos), hasJSDoc); node.modifiers = modifiers; @@ -22948,7 +22981,7 @@ return body; } function parseDecoratorExpression() { - if (inAwaitContext() && token() === 133 /* AwaitKeyword */) { + if (inAwaitContext() && token() === 134 /* AwaitKeyword */) { const pos = getNodePos(); const awaitExpression = parseIdentifier(Diagnostics.Expression_expected); nextToken(); @@ -22973,13 +23006,13 @@ function tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock) { const pos = getNodePos(); const kind = token(); - if (token() === 85 /* ConstKeyword */ && permitConstAsModifier) { + if (token() === 86 /* ConstKeyword */ && permitConstAsModifier) { if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { return void 0; } - } else if (stopOnStartOfClassStaticBlock && token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + } else if (stopOnStartOfClassStaticBlock && token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return void 0; - } else if (hasSeenStaticModifier && token() === 124 /* StaticKeyword */) { + } else if (hasSeenStaticModifier && token() === 125 /* StaticKeyword */) { return void 0; } else { if (!parseAnyContextualModifier()) { @@ -22998,7 +23031,7 @@ } } while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 124 /* StaticKeyword */) + if (modifier.kind === 125 /* StaticKeyword */) hasSeenStaticModifier = true; list = append(list, modifier); hasLeadingModifier = true; @@ -23011,7 +23044,7 @@ } if (hasTrailingDecorator) { while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 124 /* StaticKeyword */) + if (modifier.kind === 125 /* StaticKeyword */) hasSeenStaticModifier = true; list = append(list, modifier); } @@ -23020,10 +23053,10 @@ } function parseModifiersForArrowFunction() { let modifiers; - if (token() === 132 /* AsyncKeyword */) { + if (token() === 133 /* AsyncKeyword */) { const pos = getNodePos(); nextToken(); - const modifier = finishNode(factoryCreateToken(132 /* AsyncKeyword */), pos); + const modifier = finishNode(factoryCreateToken(133 /* AsyncKeyword */), pos); modifiers = createNodeArray([modifier], pos); } return modifiers; @@ -23043,16 +23076,16 @@ /*stopOnStartOfClassStaticBlock*/ true ); - if (token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } - if (parseContextualModifier(137 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */); + if (parseContextualModifier(138 /* GetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* GetAccessor */, 0 /* None */); } - if (parseContextualModifier(151 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */); + if (parseContextualModifier(152 /* SetKeyword */)) { + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* SetAccessor */, 0 /* None */); } - if (token() === 135 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); if (constructorDeclaration) { return constructorDeclaration; @@ -23097,11 +23130,11 @@ /*allowDecorators*/ true ); - if (token() === 84 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 228 /* ClassExpression */); + if (token() === 85 /* ClassKeyword */) { + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 229 /* ClassExpression */); } const missing = createMissingNode( - 279 /* MissingDeclaration */, + 280 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -23116,15 +23149,15 @@ hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 228 /* ClassExpression */ + 229 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 260 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 261 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); - parseExpected(84 /* ClassKeyword */); + parseExpected(85 /* ClassKeyword */); const name = parseNameOfClassDeclarationOrExpression(); const typeParameters = parseTypeParameters(); if (some(modifiers, isExportModifier)) @@ -23141,14 +23174,14 @@ members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 260 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 261 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { return isBindingIdentifier() && !isImplementsClause() ? createIdentifier(isBindingIdentifier()) : void 0; } function isImplementsClause() { - return token() === 117 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 118 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses() { if (isHeritageClause2()) { @@ -23159,7 +23192,7 @@ function parseHeritageClause() { const pos = getNodePos(); const tok = token(); - Debug.assert(tok === 94 /* ExtendsKeyword */ || tok === 117 /* ImplementsKeyword */); + Debug.assert(tok === 95 /* ExtendsKeyword */ || tok === 118 /* ImplementsKeyword */); nextToken(); const types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); return finishNode(factory2.createHeritageClause(tok, types), pos); @@ -23167,7 +23200,7 @@ function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 230 /* ExpressionWithTypeArguments */) { + if (expression.kind === 231 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -23177,13 +23210,13 @@ return token() === 29 /* LessThanToken */ ? parseBracketedList(20 /* TypeArguments */, parseType, 29 /* LessThanToken */, 31 /* GreaterThanToken */) : void 0; } function isHeritageClause2() { - return token() === 94 /* ExtendsKeyword */ || token() === 117 /* ImplementsKeyword */; + return token() === 95 /* ExtendsKeyword */ || token() === 118 /* ImplementsKeyword */; } function parseClassMembers() { return parseList(5 /* ClassMembers */, parseClassElement); } function parseInterfaceDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(118 /* InterfaceKeyword */); + parseExpected(119 /* InterfaceKeyword */); const name = parseIdentifier(); const typeParameters = parseTypeParameters(); const heritageClauses = parseHeritageClauses(); @@ -23192,11 +23225,11 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(154 /* TypeKeyword */); + parseExpected(155 /* TypeKeyword */); const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(63 /* EqualsToken */); - const type = token() === 139 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); + const type = token() === 140 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); parseSemicolon(); const node = factory2.createTypeAliasDeclaration(modifiers, name, typeParameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -23209,7 +23242,7 @@ return withJSDoc(finishNode(factory2.createEnumMember(name, initializer), pos), hasJSDoc); } function parseEnumDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(92 /* EnumKeyword */); + parseExpected(93 /* EnumKeyword */); const name = parseIdentifier(); let members; if (parseExpected(18 /* OpenBraceToken */)) { @@ -23249,7 +23282,7 @@ function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; let name; - if (token() === 159 /* GlobalKeyword */) { + if (token() === 160 /* GlobalKeyword */) { name = parseIdentifier(); flags |= 1024 /* GlobalAugmentation */; } else { @@ -23267,12 +23300,12 @@ } function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; - if (token() === 159 /* GlobalKeyword */) { + if (token() === 160 /* GlobalKeyword */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); - } else if (parseOptional(143 /* NamespaceKeyword */)) { + } else if (parseOptional(144 /* NamespaceKeyword */)) { flags |= 16 /* Namespace */; } else { - parseExpected(142 /* ModuleKeyword */); + parseExpected(143 /* ModuleKeyword */); if (token() === 10 /* StringLiteral */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); } @@ -23280,7 +23313,7 @@ return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiersIn, flags); } function isExternalModuleReference2() { - return token() === 147 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); + return token() === 148 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { return nextToken() === 20 /* OpenParenToken */; @@ -23292,8 +23325,8 @@ return nextToken() === 43 /* SlashToken */; } function parseNamespaceExportDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(128 /* AsKeyword */); - parseExpected(143 /* NamespaceKeyword */); + parseExpected(129 /* AsKeyword */); + parseExpected(144 /* NamespaceKeyword */); const name = parseIdentifier(); parseSemicolon(); const node = factory2.createNamespaceExportDeclaration(name); @@ -23301,14 +23334,14 @@ return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(100 /* ImportKeyword */); - const afterImportPos = scanner.getStartPos(); + parseExpected(101 /* ImportKeyword */); + const afterImportPos = scanner.getTokenFullStart(); let identifier; if (isIdentifier2()) { identifier = parseIdentifier(); } let isTypeOnly = false; - if (token() !== 158 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { + if (token() !== 159 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { isTypeOnly = true; identifier = isIdentifier2() ? parseIdentifier() : void 0; } @@ -23320,11 +23353,11 @@ token() === 41 /* AsteriskToken */ || // import * token() === 18 /* OpenBraceToken */) { importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(158 /* FromKeyword */); + parseExpected(159 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); let assertClause; - if (token() === 130 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 131 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { assertClause = parseAssertClause(); } parseSemicolon(); @@ -23344,9 +23377,9 @@ function parseAssertClause(skipAssertKeyword) { const pos = getNodePos(); if (!skipAssertKeyword) { - parseExpected(130 /* AssertKeyword */); + parseExpected(131 /* AssertKeyword */); } - const openBracePosition = scanner.getTokenPos(); + const openBracePosition = scanner.getTokenStart(); if (parseExpected(18 /* OpenBraceToken */)) { const multiLine = scanner.hasPrecedingLineBreak(); const elements = parseDelimitedList( @@ -23385,7 +23418,7 @@ return token() === 41 /* AsteriskToken */ || token() === 18 /* OpenBraceToken */; } function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 27 /* CommaToken */ || token() === 158 /* FromKeyword */; + return token() === 27 /* CommaToken */ || token() === 159 /* FromKeyword */; } function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { parseExpected(63 /* EqualsToken */); @@ -23398,7 +23431,7 @@ function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(27 /* CommaToken */)) { - namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(272 /* NamedImports */); + namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(273 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -23410,7 +23443,7 @@ } function parseExternalModuleReference() { const pos = getNodePos(); - parseExpected(147 /* RequireKeyword */); + parseExpected(148 /* RequireKeyword */); parseExpected(20 /* OpenParenToken */); const expression = parseModuleSpecifier(); parseExpected(21 /* CloseParenToken */); @@ -23428,35 +23461,35 @@ function parseNamespaceImport() { const pos = getNodePos(); parseExpected(41 /* AsteriskToken */); - parseExpected(128 /* AsKeyword */); + parseExpected(129 /* AsKeyword */); const name = parseIdentifier(); return finishNode(factory2.createNamespaceImport(name), pos); } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 272 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); + const node = kind === 273 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(278 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(279 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(273 /* ImportSpecifier */); + return parseImportOrExportSpecifier(274 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); let checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - let checkIdentifierStart = scanner.getTokenPos(); - let checkIdentifierEnd = scanner.getTextPos(); + let checkIdentifierStart = scanner.getTokenStart(); + let checkIdentifierEnd = scanner.getTokenEnd(); let isTypeOnly = false; let propertyName; let canParseAsKeyword = true; let name = parseIdentifierName(); if (name.escapedText === "type") { - if (token() === 128 /* AsKeyword */) { + if (token() === 129 /* AsKeyword */) { const firstAs = parseIdentifierName(); - if (token() === 128 /* AsKeyword */) { + if (token() === 129 /* AsKeyword */) { const secondAs = parseIdentifierName(); if (tokenIsIdentifierOrKeyword(token())) { isTypeOnly = true; @@ -23481,20 +23514,20 @@ name = parseNameWithKeywordCheck(); } } - if (canParseAsKeyword && token() === 128 /* AsKeyword */) { + if (canParseAsKeyword && token() === 129 /* AsKeyword */) { propertyName = name; - parseExpected(128 /* AsKeyword */); + parseExpected(129 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 273 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 274 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 273 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 274 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - checkIdentifierStart = scanner.getTokenPos(); - checkIdentifierEnd = scanner.getTextPos(); + checkIdentifierStart = scanner.getTokenStart(); + checkIdentifierEnd = scanner.getTokenEnd(); return parseIdentifierName(); } } @@ -23510,22 +23543,22 @@ let exportClause; let moduleSpecifier; let assertClause; - const isTypeOnly = parseOptional(154 /* TypeKeyword */); + const isTypeOnly = parseOptional(155 /* TypeKeyword */); const namespaceExportPos = getNodePos(); if (parseOptional(41 /* AsteriskToken */)) { - if (parseOptional(128 /* AsKeyword */)) { + if (parseOptional(129 /* AsKeyword */)) { exportClause = parseNamespaceExport(namespaceExportPos); } - parseExpected(158 /* FromKeyword */); + parseExpected(159 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(276 /* NamedExports */); - if (token() === 158 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner.hasPrecedingLineBreak()) { - parseExpected(158 /* FromKeyword */); + exportClause = parseNamedImportsOrExports(277 /* NamedExports */); + if (token() === 159 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner.hasPrecedingLineBreak()) { + parseExpected(159 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } } - if (moduleSpecifier && token() === 130 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (moduleSpecifier && token() === 131 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { assertClause = parseAssertClause(); } parseSemicolon(); @@ -23543,7 +23576,7 @@ if (parseOptional(63 /* EqualsToken */)) { isExportEquals = true; } else { - parseExpected(88 /* DefaultKeyword */); + parseExpected(89 /* DefaultKeyword */); } const expression = parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ @@ -23741,16 +23774,12 @@ while (true) { switch (token()) { case 59 /* AtToken */: - if (state === 0 /* BeginningOfLine */ || state === 1 /* SawAsterisk */) { - removeTrailingWhitespace(comments); - if (!commentsPos) - commentsPos = getNodePos(); - addTag(parseTag(indent2)); - state = 0 /* BeginningOfLine */; - margin = void 0; - } else { - pushComment(scanner.getTokenText()); - } + removeTrailingWhitespace(comments); + if (!commentsPos) + commentsPos = getNodePos(); + addTag(parseTag(indent2)); + state = 0 /* BeginningOfLine */; + margin = void 0; break; case 4 /* NewLineTrivia */: comments.push(scanner.getTokenText()); @@ -23759,29 +23788,33 @@ break; case 41 /* AsteriskToken */: const asterisk = scanner.getTokenText(); - if (state === 1 /* SawAsterisk */ || state === 2 /* SavingComments */) { + if (state === 1 /* SawAsterisk */) { state = 2 /* SavingComments */; pushComment(asterisk); } else { + Debug.assert(state === 0 /* BeginningOfLine */); state = 1 /* SawAsterisk */; indent2 += asterisk.length; } break; case 5 /* WhitespaceTrivia */: + Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text"); const whitespace = scanner.getTokenText(); - if (state === 2 /* SavingComments */) { - comments.push(whitespace); - } else if (margin !== void 0 && indent2 + whitespace.length > margin) { + if (margin !== void 0 && indent2 + whitespace.length > margin) { comments.push(whitespace.slice(margin - indent2)); } indent2 += whitespace.length; break; case 1 /* EndOfFileToken */: break loop; + case 81 /* JSDocCommentTextToken */: + state = 2 /* SavingComments */; + pushComment(scanner.getTokenValue()); + break; case 18 /* OpenBraceToken */: state = 2 /* SavingComments */; - const commentEnd = scanner.getStartPos(); - const linkStart = scanner.getTextPos() - 1; + const commentEnd = scanner.getTokenFullStart(); + const linkStart = scanner.getTokenEnd() - 1; const link = parseJSDocLink(linkStart); if (link) { if (!linkEnd) { @@ -23790,7 +23823,7 @@ parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd != null ? linkEnd : start, commentEnd)); parts.push(link); comments = []; - linkEnd = scanner.getTextPos(); + linkEnd = scanner.getTokenEnd(); break; } default: @@ -23798,16 +23831,23 @@ pushComment(scanner.getTokenText()); break; } - nextTokenJSDoc(); + if (state === 2 /* SavingComments */) { + nextJSDocCommentTextToken( + /*inBackticks*/ + false + ); + } else { + nextTokenJSDoc(); + } } - removeTrailingWhitespace(comments); - if (parts.length && comments.length) { - parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd != null ? linkEnd : start, commentsPos)); + const trimmedComments = trimStringEnd(comments.join("")); + if (parts.length && trimmedComments.length) { + parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd != null ? linkEnd : start, commentsPos)); } if (parts.length && tags) Debug.assertIsDefined(commentsPos, "having parsed tags implies that the end of the comment span should be set"); const tagsArray = tags && createNodeArray(tags, tagsPos, tagsEnd); - return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : comments.length ? comments.join("") : void 0, tagsArray), start, end); + return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : trimmedComments.length ? trimmedComments : void 0, tagsArray), start, end); }); function removeLeadingNewlines(comments2) { while (comments2.length && (comments2[0] === "\n" || comments2[0] === "\r")) { @@ -23815,8 +23855,16 @@ } } function removeTrailingWhitespace(comments2) { - while (comments2.length && comments2[comments2.length - 1].trim() === "") { - comments2.pop(); + while (comments2.length) { + const trimmed = trimStringEnd(comments2[comments2.length - 1]); + if (trimmed === "") { + comments2.pop(); + } else if (trimmed.length < comments2[comments2.length - 1].length) { + comments2[comments2.length - 1] = trimmed; + break; + } else { + break; + } } } function isNextNonwhitespaceTokenEndOfFile() { @@ -23864,7 +23912,7 @@ } function parseTag(margin) { Debug.assert(token() === 59 /* AtToken */); - const start2 = scanner.getTokenPos(); + const start2 = scanner.getTokenStart(); nextTokenJSDoc(); const tagName = parseJSDocIdentifierName( /*message*/ @@ -23963,7 +24011,6 @@ const parts2 = []; let linkEnd2; let state = 0 /* BeginningOfLine */; - let previousWhitespace = true; let margin; function pushComment(text) { if (!margin) { @@ -23988,34 +24035,29 @@ indent2 = 0; break; case 59 /* AtToken */: - if (state === 3 /* SavingBackticks */ || state === 2 /* SavingComments */ && (!previousWhitespace || lookAhead(isNextJSDocTokenWhitespace))) { - comments2.push(scanner.getTokenText()); - break; - } - scanner.setTextPos(scanner.getTextPos() - 1); + scanner.resetTokenState(scanner.getTokenEnd() - 1); + break loop; case 1 /* EndOfFileToken */: break loop; case 5 /* WhitespaceTrivia */: - if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { - pushComment(scanner.getTokenText()); - } else { - const whitespace = scanner.getTokenText(); - if (margin !== void 0 && indent2 + whitespace.length > margin) { - comments2.push(whitespace.slice(margin - indent2)); - } - indent2 += whitespace.length; + Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text"); + const whitespace = scanner.getTokenText(); + if (margin !== void 0 && indent2 + whitespace.length > margin) { + comments2.push(whitespace.slice(margin - indent2)); + state = 2 /* SavingComments */; } + indent2 += whitespace.length; break; case 18 /* OpenBraceToken */: state = 2 /* SavingComments */; - const commentEnd = scanner.getStartPos(); - const linkStart = scanner.getTextPos() - 1; + const commentEnd = scanner.getTokenFullStart(); + const linkStart = scanner.getTokenEnd() - 1; const link = parseJSDocLink(linkStart); if (link) { parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 != null ? linkEnd2 : commentsPos2, commentEnd)); parts2.push(link); comments2 = []; - linkEnd2 = scanner.getTextPos(); + linkEnd2 = scanner.getTokenEnd(); } else { pushComment(scanner.getTokenText()); } @@ -24028,6 +24070,12 @@ } pushComment(scanner.getTokenText()); break; + case 81 /* JSDocCommentTextToken */: + if (state !== 3 /* SavingBackticks */) { + state = 2 /* SavingComments */; + } + pushComment(scanner.getTokenValue()); + break; case 41 /* AsteriskToken */: if (state === 0 /* BeginningOfLine */) { state = 1 /* SawAsterisk */; @@ -24041,24 +24089,23 @@ pushComment(scanner.getTokenText()); break; } - previousWhitespace = token() === 5 /* WhitespaceTrivia */; - tok = nextTokenJSDoc(); + if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { + tok = nextJSDocCommentTextToken(state === 3 /* SavingBackticks */); + } else { + tok = nextTokenJSDoc(); + } } removeLeadingNewlines(comments2); - removeTrailingWhitespace(comments2); + const trimmedComments = trimStringEnd(comments2.join("")); if (parts2.length) { - if (comments2.length) { - parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 != null ? linkEnd2 : commentsPos2)); + if (trimmedComments.length) { + parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 != null ? linkEnd2 : commentsPos2)); } - return createNodeArray(parts2, commentsPos2, scanner.getTextPos()); - } else if (comments2.length) { - return comments2.join(""); + return createNodeArray(parts2, commentsPos2, scanner.getTokenEnd()); + } else if (trimmedComments.length) { + return trimmedComments; } } - function isNextJSDocTokenWhitespace() { - const next = nextTokenJSDoc(); - return next === 5 /* WhitespaceTrivia */ || next === 4 /* NewLineTrivia */; - } function parseJSDocLink(start2) { const linkType = tryParse(parseJSDocLinkPrefix); if (!linkType) { @@ -24084,7 +24131,7 @@ nextTokenJSDoc(); } const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain; - return finishNode(create(name, text.join("")), start2, scanner.getTextPos()); + return finishNode(create(name, text.join("")), start2, scanner.getTokenEnd()); } function parseJSDocLinkPrefix() { skipWhitespaceOrAsterisk(); @@ -24137,9 +24184,9 @@ } function isObjectOrObjectArrayTypeReference(node) { switch (node.kind) { - case 149 /* ObjectKeyword */: + case 150 /* ObjectKeyword */: return true; - case 185 /* ArrayType */: + case 186 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -24169,26 +24216,26 @@ let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { - if (child.kind === 344 /* JSDocParameterTag */ || child.kind === 351 /* JSDocPropertyTag */) { + if (child.kind === 345 /* JSDocParameterTag */ || child.kind === 352 /* JSDocPropertyTag */) { children = append(children, child); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 185 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 186 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } } function parseReturnTag(start2, tagName, indent2, indentText) { if (some(tags, isJSDocReturnTag)) { - parseErrorAt(tagName.pos, scanner.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText); + parseErrorAt(tagName.pos, scanner.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText); } const typeExpression = tryParseTypeExpression(); return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2); } function parseTypeTag(start2, tagName, indent2, indentText) { if (some(tags, isJSDocTypeTag)) { - parseErrorAt(tagName.pos, scanner.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText); + parseErrorAt(tagName.pos, scanner.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText); } const typeExpression = parseJSDocTypeExpression( /*mayOmitBraces*/ @@ -24211,10 +24258,10 @@ function parseAuthorTag(start2, tagName, indent2, indentText) { const commentStart = getNodePos(); const textOnly = parseAuthorNameAndEmail(); - let commentEnd = scanner.getStartPos(); + let commentEnd = scanner.getTokenFullStart(); const comments2 = parseTrailingTagComments(start2, commentEnd, indent2, indentText); if (!comments2) { - commentEnd = scanner.getStartPos(); + commentEnd = scanner.getTokenFullStart(); } const allParts = typeof comments2 !== "string" ? createNodeArray(concatenate([finishNode(textOnly, commentStart, commentEnd)], comments2), commentStart) : textOnly.text + comments2; return finishNode(factory2.createJSDocAuthorTag(tagName, allParts), start2); @@ -24230,7 +24277,7 @@ break; } else if (token2 === 31 /* GreaterThanToken */ && inEmail) { comments2.push(scanner.getTokenText()); - scanner.setTextPos(scanner.getTokenPos() + 1); + scanner.resetTokenState(scanner.getTokenEnd()); break; } comments2.push(scanner.getTokenText()); @@ -24309,7 +24356,7 @@ let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent2))) { hasChildren = true; - if (child.kind === 347 /* JSDocTypeTag */) { + if (child.kind === 348 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -24324,7 +24371,7 @@ } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 185 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 186 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -24338,7 +24385,7 @@ return finishNode(typedefTag, start2, end2); } function parseJSDocTypeNameWithNamespace(nested) { - const pos = scanner.getTokenPos(); + const start2 = scanner.getTokenStart(); if (!tokenIsIdentifierOrKeyword(token())) { return void 0; } @@ -24355,7 +24402,7 @@ body, nested ? 4 /* NestedNamespace */ : void 0 ); - return finishNode(jsDocNamespaceNode, pos); + return finishNode(jsDocNamespaceNode, start2); } if (nested) { typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */; @@ -24376,7 +24423,7 @@ const returnTag = tryParse(() => { if (parseOptionalJsdoc(59 /* AtToken */)) { const tag = parseTag(indent2); - if (tag && tag.kind === 345 /* JSDocReturnTag */) { + if (tag && tag.kind === 346 /* JSDocReturnTag */) { return tag; } } @@ -24431,7 +24478,7 @@ case 59 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent2); - if (child && (child.kind === 344 /* JSDocParameterTag */ || child.kind === 351 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 345 /* JSDocParameterTag */ || child.kind === 352 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -24458,7 +24505,7 @@ } function tryParseChildTag(target, indent2) { Debug.assert(token() === 59 /* AtToken */); - const start2 = scanner.getStartPos(); + const start2 = scanner.getTokenFullStart(); nextTokenJSDoc(); const tagName = parseJSDocIdentifierName(); skipWhitespace(); @@ -24558,11 +24605,11 @@ ); } identifierCount++; - const pos = scanner.getTokenPos(); - const end2 = scanner.getTextPos(); + const start2 = scanner.getTokenStart(); + const end2 = scanner.getTokenEnd(); const originalKeywordKind = token(); const text = internIdentifier(scanner.getTokenValue()); - const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), pos, end2); + const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), start2, end2); nextTokenJSDoc(); return result; } @@ -25151,7 +25198,7 @@ if (lhs.kind === 79 /* Identifier */) { return lhs.escapedText === rhs.escapedText; } - if (lhs.kind === 108 /* ThisKeyword */) { + if (lhs.kind === 109 /* ThisKeyword */) { return true; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -26817,7 +26864,7 @@ var _a2; const rootExpression = (_a2 = sourceFile.statements[0]) == null ? void 0 : _a2.expression; const knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : void 0; - if (rootExpression && rootExpression.kind !== 207 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 208 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -26861,7 +26908,7 @@ function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 299 /* PropertyAssignment */) { + if (element.kind !== 300 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -26919,19 +26966,19 @@ function convertPropertyValueToJson(valueExpression, option) { let invalidReported; switch (valueExpression.kind) { - case 110 /* TrueKeyword */: + case 111 /* TrueKeyword */: reportInvalidOptionValue(option && option.type !== "boolean" && (option.type !== "listOrElement" || option.element.type !== "boolean")); return validateValue( /*value*/ true ); - case 95 /* FalseKeyword */: + case 96 /* FalseKeyword */: reportInvalidOptionValue(option && option.type !== "boolean" && (option.type !== "listOrElement" || option.element.type !== "boolean")); return validateValue( /*value*/ false ); - case 104 /* NullKeyword */: + case 105 /* NullKeyword */: reportInvalidOptionValue(option && option.name === "extends"); return validateValue( /*value*/ @@ -26962,13 +27009,13 @@ case 8 /* NumericLiteral */: reportInvalidOptionValue(option && option.type !== "number" && (option.type !== "listOrElement" || option.element.type !== "number")); return validateValue(Number(valueExpression.text)); - case 221 /* PrefixUnaryExpression */: + case 222 /* PrefixUnaryExpression */: if (valueExpression.operator !== 40 /* MinusToken */ || valueExpression.operand.kind !== 8 /* NumericLiteral */) { break; } reportInvalidOptionValue(option && option.type !== "number" && (option.type !== "listOrElement" || option.element.type !== "number")); return validateValue(-Number(valueExpression.operand.text)); - case 207 /* ObjectLiteralExpression */: + case 208 /* ObjectLiteralExpression */: reportInvalidOptionValue(option && option.type !== "object" && (option.type !== "listOrElement" || option.element.type !== "object")); const objectLiteralExpression = valueExpression; if (option) { @@ -26990,7 +27037,7 @@ void 0 )); } - case 206 /* ArrayLiteralExpression */: + case 207 /* ArrayLiteralExpression */: reportInvalidOptionValue(option && option.type !== "list" && option.type !== "listOrElement"); return validateValue(convertArrayLiteralExpressionToJson( valueExpression.elements, @@ -28956,7 +29003,7 @@ return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 259 /* FunctionDeclaration */ && declaration.kind !== 171 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 260 /* FunctionDeclaration */ && declaration.kind !== 172 /* MethodDeclaration */ || !!declaration.body; } var JsxNames; ((JsxNames2) => { @@ -29197,21 +29244,21 @@ return updated; } var visitEachChildTable = { - [163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [164 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [165 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [165 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29220,7 +29267,7 @@ nodeVisitor(node.default, visitor, isTypeNode) ); }, - [166 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [167 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29231,14 +29278,14 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [168 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29247,7 +29294,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [170 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { var _a2, _b; return context.factory.updatePropertyDeclaration( node, @@ -29259,7 +29306,7 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [170 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29270,7 +29317,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29283,7 +29330,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [173 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [174 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29291,7 +29338,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [174 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [175 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29301,7 +29348,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29310,7 +29357,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [172 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [173 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -29318,7 +29365,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -29326,7 +29373,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [177 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -29334,7 +29381,7 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [178 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29343,7 +29390,7 @@ ); }, // Types - [179 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -29351,14 +29398,14 @@ nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [181 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -29366,7 +29413,7 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29375,56 +29422,56 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [185 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [187 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [189 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [190 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [190 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [191 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -29433,13 +29480,13 @@ Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [193 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -29449,14 +29496,14 @@ node.isTypeOf ); }, - [298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [200 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -29465,26 +29512,26 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [194 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [198 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -29495,20 +29542,20 @@ nodesVisitor(node.members, visitor, isTypeElement) ); }, - [198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [202 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -29516,19 +29563,19 @@ ); }, // Binding patterns - [203 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [204 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [204 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [205 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [206 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -29538,19 +29585,19 @@ ); }, // Expression - [206 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [207 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [209 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29562,7 +29609,7 @@ Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [210 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29574,7 +29621,7 @@ Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [211 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29588,7 +29635,7 @@ nodesVisitor(node.arguments, visitor, isExpression) ); }, - [211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [212 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29596,7 +29643,7 @@ nodesVisitor(node.arguments, visitor, isExpression) ); }, - [212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [213 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -29604,20 +29651,20 @@ Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [214 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [216 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29629,7 +29676,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [216 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [217 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29640,43 +29687,43 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [219 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [220 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [224 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -29684,7 +29731,7 @@ Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [225 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -29694,27 +29741,27 @@ Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [229 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29724,28 +29771,28 @@ nodesVisitor(node.members, visitor, isClassElement) ); }, - [230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [232 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -29754,14 +29801,14 @@ Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29769,26 +29816,26 @@ ); }, // Element - [238 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [239 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [240 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [241 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [242 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [243 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29796,21 +29843,21 @@ nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [243 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [245 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -29819,7 +29866,7 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -29827,7 +29874,7 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [248 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -29836,52 +29883,52 @@ visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [249 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [250 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -29889,7 +29936,7 @@ nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [258 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -29898,13 +29945,13 @@ nodeVisitor(node.initializer, visitor, isExpression) ); }, - [258 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [259 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [259 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [260 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29916,7 +29963,7 @@ visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [260 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [261 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29926,7 +29973,7 @@ nodesVisitor(node.members, visitor, isClassElement) ); }, - [261 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [262 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29936,7 +29983,7 @@ nodesVisitor(node.members, visitor, isTypeElement) ); }, - [262 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [263 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29945,7 +29992,7 @@ Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29953,7 +30000,7 @@ nodesVisitor(node.members, visitor, isEnumMember) ); }, - [264 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29961,25 +30008,25 @@ nodeVisitor(node.body, visitor, isModuleBody) ); }, - [265 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [266 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [266 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [267 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [269 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29988,7 +30035,7 @@ Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [270 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29997,21 +30044,21 @@ nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [296 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [297 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [298 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -30019,25 +30066,25 @@ nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [273 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [273 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -30045,14 +30092,14 @@ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [275 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -30062,13 +30109,13 @@ nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [276 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [277 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [278 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -30077,14 +30124,14 @@ ); }, // Module references - [280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -30092,7 +30139,7 @@ Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -30100,7 +30147,7 @@ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -30108,13 +30155,13 @@ Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -30122,52 +30169,52 @@ Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [289 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [290 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [293 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [294 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [294 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [295 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [295 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -30175,28 +30222,28 @@ ); }, // Property assignments - [299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -30204,20 +30251,20 @@ ); }, // Top-level nodes - [308 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [309 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [357 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [358 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) diff --recursive --unified --new-file --exclude test --exclude Makefile 5.1.0-dev.20230307/package.json 5.1.0-dev.20230308/package.json --- 5.1.0-dev.20230307/package.json 1985-10-26 09:15:00 +++ 5.1.0-dev.20230308/package.json 1985-10-26 09:15:00 @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "5.1.0-dev.20230307", + "version": "5.1.0-dev.20230308", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ @@ -111,5 +111,6 @@ "volta": { "node": "14.21.1", "npm": "8.19.3" - } + }, + "gitHead": "746a6feb2e7ba6987b6c72db538dd498b35cd461" }